PageSourceSearch

https://gis.nbs.gov.so/arcgis/apps/sites/assets/chunk.87342.7abd8273e922d0665005.js

js nbs.gov.so collected 2026-09-24 18:48:46 UTC 2,498,335 bytes, 52 lines download raw bytes

1(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[87342],{77399:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,c){(c=c||{}).arrayMerge=c.arrayMerge||i,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var u=Array.isArray(r);return u===Array.isArray(e)?u?c.arrayMerge(e,r,c):function(e,t,r){var i={};return r.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=n(e[t],r)})),s(t).forEach((function(s){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(o(e,s)&&r.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a}(s,r)(e[s],t[s],r):i[s]=n(t[s],r))})),i}(e,r,c):n(r,c)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return a(e,r,t)}),{})};var c=a;e.exports=c},739005:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Configuration:()=>L,EmailApi:()=>S,NotificationSpecsApi:()=>O,SubscriptionsApi:()=>U,UsersApi:()=>G});var n=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))};const i="http://localhost".replace(/\/+$/,"");class s{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return null!=this.configuration.basePath?this.configuration.basePath:i}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||h}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return"function"==typeof e?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return"function"==typeof e?e:()=>n(this,void 0,void 0,(function*(){return e}))}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const o=new s;class a{constructor(e=o){this.configuration=e,this.fetchApi=(e,t)=>n(this,void 0,void 0,(function*(){let r,n={url:e,init:t};for(const e of this.middleware)e.pre&&(n=(yield e.pre(Object.assign({fetch:this.fetchApi},n)))||n);try{r=yield(this.configuration.fetchApi||fetch)(n.url,n.init)}catch(e){for(const t of this.middleware)t.onError&&(r=(yield t.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:e,response:r?r.clone():void 0}))||r);if(void 0===r)throw e instanceof Error?new d(e,"The request failed and the interceptors did not return an alternative response"):e}for(const e of this.middleware)e.post&&(r=(yield e.post({fetch:this.fetchApi,url:n.url,init:n.init,response:r.clone()}))||r);return r})),this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map((e=>({pre:e})));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map((e=>({post:e})));return this.withMiddleware(...t)}request(e,t){return n(this,void 0,void 0,(function*(){const{url:r,init:n}=yield this.createFetchParams(e,t),i=yield this.fetchApi(r,n);if(i&&i.status>=200&&i.status<300)return i;throw new l(i,"Response returned an error code")}))}createFetchParams(e,t){return n(this,void 0,void 0,(function*(){let r=this.configuration.basePath+e.path;void 0!==e.query&&0!==Object.keys(e.query).length&&(r+="?"+this.configuration.queryParamsStringify(e.query));const i=Object.assign({},this.configuration.headers,e.headers);
1Object.keys(i).forEach((e=>void 0===i[e]?delete i[e]:{}));const s="function"==typeof t?t:()=>n(this,void 0,void 0,(function*(){return t})),o={method:e.method,headers:i,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e}));return{url:r,init:Object.assign(Object.assign({},a),{body:u(a.body)||a.body instanceof URLSearchParams||c(a.body)?a.body:JSON.stringify(a.body)})}}))}clone(){const e=new(0,this.constructor)(this.configuration);return e.middleware=this.middleware.slice(),e}}function c(e){return"undefined"!=typeof Blob&&e instanceof Blob}function u(e){return"undefined"!=typeof FormData&&e instanceof FormData}class l extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class d extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class p extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}function h(e,t=""){return Object.keys(e).map((r=>m(r,e[r],t))).filter((e=>e.length>0)).join("&")}function m(e,t,r=""){const n=r+(r.length?`[${e}]`:e);if(t instanceof Array){const e=t.map((e=>encodeURIComponent(String(e)))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${e}`}return t instanceof Set?m(e,Array.from(t),r):t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?h(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class f{constructor(e,t=(e=>e)){this.raw=e,this.transformer=t}value(){return n(this,void 0,void 0,(function*(){return this.transformer(yield this.raw.json())}))}}class g{constructor(e){this.raw=e}value(){return n(this,void 0,void 0,(function*(){}))}}function y(e){if(void 0!==e)return null===e?null:{to:e.to,cc:e.cc,bcc:e.bcc,subject:e.subject,htmlBody:e.htmlBody,textBody:e.textBody,from:e.from,replyTo:e.replyTo}}function b(e){return function(e,t){return null==e?e:{httpStatusCode:e.httpStatusCode,requestId:e.requestId,attempts:e.attempts,totalRetryDelay:e.totalRetryDelay}}(e)}var v=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))};class w extends a{createEmailRaw(e,t){return v(this,void 0,void 0,(function*(){if(null===e.createEmailDto||void 0===e.createEmailDto)throw new p("createEmailDto","Required parameter requestParameters.createEmailDto was null or undefined when calling createEmail.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/email",method:"POST",headers:r,query:{},body:y(e.createEmailDto)},t);return new f(n,(e=>function(e,t){return null==e?e:{$metadata:b(e.$metadata),messageId:e.MessageId}}(e)))}))}createEmail(e,t){return v(this,void 0,void 0,(function*(){const r=yield this.createEmailRaw(e,t);return yield r.value()}))}}class S extends w{constructor(e){super(e)}}function E(e){if(void 0!==e)return null===e?null:{name:e.name,description:e.description}}function T(e){return function(e,t){return null==e?e:{id:e.id,name:e.name,description:e.description,createdById:e.createdById,updatedAt:new Date(e.updatedAt),createdAt:new Date(e.createdAt)}}(e)}function I(e){if(void 0!==e)return null===e?null:{name:e.name,description:e.description}}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))};class A extends a{createNotificationSpecRaw(e,t){return C(this,void 0,void 0,(function*(){if(null===e.createNotificationSpecDto||void 0===e.createNotificationSpecDto)throw new p("createNotificationSpecDto","Required parameter requestParameters.createNotificationSpecDto was null or undefined when calling createNotificationSpec.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/notification-specs",method:"POST",headers:r,query:{},body:E(e.createNotificationSpecDto)},t);return new f(n,(e=>T(e)))}))}createNotificationSpec(e,t){return C(this,void 0,void 0,(function*(){const r=yield this.createNotificationSpecRaw(e,t);return yield r.value()}))}deleteNotificationSpecRaw(e,t){return C(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling deleteNotificationSpec.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/notification-specs/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:r,query:{}},t);return new f(n,(e=>T(e)))}))}deleteNotificationSpec(e,t){return C(this,void 0,void 0,(function*(){const r=yield this.deleteNotificationSpecRaw(e,t);return yield r.value()}))}getNotificationSpecRaw(e,t){return C(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling getNotificationSpec.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/notification-specs/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"GET",headers:r,query:{}},t);return new f(n,(e=>T(e)))}))}getNotificationSpec(e,t){return C(this,void 0,void 0,(function*(){const r=yield this.getNotificationSpecRaw(e,t);return yield r.value()}))}getNotificationSpecsRaw(e){return C(this,void 0,void 0,(function*(){const t={};this.configuration&&this.configuration.apiKey&&(t.Authorization=this.configuration.apiKey("Authorization"));const r=yield this.request({path:"/api/newsletters/v1/notification-specs",method:"GET",headers:t,query:{}},e);return new f(r,(e=>e.map(T)))}))}getNotificationSpecs(e){return C(this,void 0,void 0,(function*(){const t=yield this.getNotificationSpecsRaw(e);return yield t.value()}))}updateNotificationSpecRaw(e,t){return C(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling updateNotificationSpec.");if(null===e.updateNotificationSpecDto||void 0===e.updateNotificationSpecDto)throw new p("updateNotificationSpecDto","Required parameter requestParameters.updateNotificationSpecDto was null or undefined when calling updateNotificationSpec.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/notification-specs/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:r,query:{},body:I(e.updateNotificationSpecDto)},t);return new f(n,(e=>T(e)))}))}updateNotificationSpec(e,t){return C(this,void 0,void 0,(function*(){const r=yield this.updateNotificationSpecRaw(e,t);return yield r.value()}))}}class O extends A{constructor(e){super(e)}}function _(e){if(void 0!==e)return null===e?null:{userId:e.userId,notificationSpecName:e.notificationSpecName,metadata:e.metadata,cadence:e.cadence,deliveryMethod:e.deliveryMethod}}function D(e){return function(e,t){return null==e?e:{id:e.id,userId:e.userId,notificationSpecId:e.notificationSpecId,metadata:e.metadata,cadence:e.cadence,lastDelivery:new Date(e.lastDelivery),deliveryMethod:e.deliveryMethod,active:e.active,updatedAt:new Date(e.updatedAt),createdAt:new Date(e.createdAt),notificationSpec:e.notificationSpec,user:e.user}}(e)}function P(e){if(void 0!==e)return null===e?null:{notificationSpecName:e.notificationSpecName,metadata:e.metadata,cadence:e.cadence,deliveryMethod:e.deliveryMethod,agoId:e.agoId,username:e.username,firstName:e.firstName,lastName:e.lastName,email:e.email,deleted:e.deleted,optedOut:e.optedOut}}function k(e){if(void 0!==e)return null===e?null:{cadence:e.cadence,deliveryMethod:e.deliveryMethod,active:e.active,lastDelivery:e.lastDelivery,userId:e.userId}}var x=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))};class R extends a{createSubscriptionRaw(e,t){return x(this,void 0,void 0,(function*(){if(null===e.createSubscriptionDto||void 0===e.createSubscriptionDto)throw new p("createSubscriptionDto","Required parameter requestParameters.createSubscriptionDto was null or undefined when calling createSubscription.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/subscriptions",method:"POST",headers:r,query:{},body:_(e.createSubscriptionDto)},t);return new f(n,(e=>D(e)))}))}createSubscription(e,t){return x(this,void 0,void 0,(function*(){const r=yield this.createSubscriptionRaw(e,t);return yield r.value()}))}deleteSubscriptionRaw(e,t){return x(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling deleteSubscription.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/subscriptions/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"DELETE",headers:r,query:{}},t);return new f(n,(e=>D(e)))}))}deleteSubscription(e,t){return x(this,void 0,void 0,(function*(){const r=yield this.deleteSubscriptionRaw(e,t);return yield r.value()}))}getSubscriptionRaw(e,t){return x(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling getSubscription.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/subscriptions/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"GET",headers:r,query:{}},t);return new f(n,(e=>D(e)))}))}getSubscription(e,t){return x(this,void 0,void 0,(function*(){const r=yield this.get
1SubscriptionRaw(e,t);return yield r.value()}))}getSubscriptionsRaw(e,t){return x(this,void 0,void 0,(function*(){const r={};e.names&&(r.names=e.names),void 0!==e.cadence&&(r.cadence=e.cadence),void 0!==e.userId&&(r.userId=e.userId),void 0!==e.active&&(r.active=e.active);const n={};this.configuration&&this.configuration.apiKey&&(n.Authorization=this.configuration.apiKey("Authorization"));const i=yield this.request({path:"/api/newsletters/v1/subscriptions",method:"GET",headers:n,query:r},t);return new f(i,(e=>e.map(D)))}))}getSubscriptions(e={},t){return x(this,void 0,void 0,(function*(){const r=yield this.getSubscriptionsRaw(e,t);return yield r.value()}))}resubscribeRaw(e){return x(this,void 0,void 0,(function*(){const t={};this.configuration&&this.configuration.apiKey&&(t.Authorization=this.configuration.apiKey("Authorization"));const r=yield this.request({path:"/api/newsletters/v1/subscriptions/resubscribe",method:"GET",headers:t,query:{}},e);return new g(r)}))}resubscribe(e){return x(this,void 0,void 0,(function*(){yield this.resubscribeRaw(e)}))}subscribeRaw(e,t){return x(this,void 0,void 0,(function*(){if(null===e.subscribeDto||void 0===e.subscribeDto)throw new p("subscribeDto","Required parameter requestParameters.subscribeDto was null or undefined when calling subscribe.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/subscriptions/subscribe",method:"POST",headers:r,query:{},body:P(e.subscribeDto)},t);return new f(n,(e=>D(e)))}))}subscribe(e,t){return x(this,void 0,void 0,(function*(){const r=yield this.subscribeRaw(e,t);return yield r.value()}))}unsubscribeRaw(e){return x(this,void 0,void 0,(function*(){const t={};this.configuration&&this.configuration.apiKey&&(t.Authorization=this.configuration.apiKey("Authorization"));const r=yield this.request({path:"/api/newsletters/v1/subscriptions/unsubscribe",method:"GET",headers:t,query:{}},e);return new g(r)}))}unsubscribe(e){return x(this,void 0,void 0,(function*(){yield this.unsubscribeRaw(e)}))}updateSubscriptionRaw(e,t){return x(this,void 0,void 0,(function*(){if(null===e.id||void 0===e.id)throw new p("id","Required parameter requestParameters.id was null or undefined when calling updateSubscription.");if(null===e.updateSubscriptionDto||void 0===e.updateSubscriptionDto)throw new p("updateSubscriptionDto","Required parameter requestParameters.updateSubscriptionDto was null or undefined when calling updateSubscription.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/subscriptions/{id}".replace("{id}",encodeURIComponent(String(e.id))),method:"PATCH",headers:r,query:{},body:k(e.updateSubscriptionDto)},t);return new f(n,(e=>D(e)))}))}updateSubscription(e,t){return x(this,void 0,void 0,(function*(){const r=yield this.updateSubscriptionRaw(e,t);return yield r.value()}))}}class U extends R{constructor(e){super(e)}}function M(e){if(void 0!==e)return null===e?null:{agoId:e.agoId,username:e.username,firstName:e.firstName,lastName:e.lastName,email:e.email,deleted:e.deleted,optedOut:e.optedOut}}function N(e){return function(e,t){return null==e?e:{agoId:e.agoId,username:e.username,firstName:e.firstName,lastName:e.lastName,email:e.email,deleted:e.deleted,optedOut:e.optedOut,updatedAt:new Date(e.updatedAt),createdAt:new Date(e.createdAt)}}(e)}function j(e){if(void 0!==e)return null===e?null:{username:e.username,firstName:e.firstName,lastName:e.lastName,email:e.email,deleted:e.deleted,optedOut:e.optedOut}}var $=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))};class F extends a{createUserRaw(e,t){return $(this,void 0,void 0,(function*(){if(null===e.createUserDto||void 0===e.createUserDto)throw new p("createUserDto","Required parameter requestParameters.createUserDto was null or undefined when calling createUser.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/users",method:"POST",headers:r,query:{},body:M(e.createUserDto)},t);return new f(n,(e=>N(e)))}))}createUser(e,t){return $(this,void 0,void 0,(function*(){const r=yield this.createUserRaw(e,t);return yield r.value()}))}deleteUserRaw(e,t){return $(this,void 0,void 0,(function*(){if(null===e.userId||void 0===e.userId)throw new p("userId","Required parameter requestParameters.userId was null or undefined when calling deleteUser.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/users/{userId}".replace("{userId}
1",encodeURIComponent(String(e.userId))),method:"DELETE",headers:r,query:{}},t);return new f(n,(e=>N(e)))}))}deleteUser(e,t){return $(this,void 0,void 0,(function*(){const r=yield this.deleteUserRaw(e,t);return yield r.value()}))}getUserRaw(e,t){return $(this,void 0,void 0,(function*(){if(null===e.userId||void 0===e.userId)throw new p("userId","Required parameter requestParameters.userId was null or undefined when calling getUser.");const r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/users/{userId}".replace("{userId}",encodeURIComponent(String(e.userId))),method:"GET",headers:r,query:{}},t);return new f(n,(e=>N(e)))}))}getUser(e,t){return $(this,void 0,void 0,(function*(){const r=yield this.getUserRaw(e,t);return yield r.value()}))}getUsersRaw(e){return $(this,void 0,void 0,(function*(){const t={};this.configuration&&this.configuration.apiKey&&(t.Authorization=this.configuration.apiKey("Authorization"));const r=yield this.request({path:"/api/newsletters/v1/users",method:"GET",headers:t,query:{}},e);return new f(r,(e=>e.map(N)))}))}getUsers(e){return $(this,void 0,void 0,(function*(){const t=yield this.getUsersRaw(e);return yield t.value()}))}updateUserRaw(e,t){return $(this,void 0,void 0,(function*(){if(null===e.userId||void 0===e.userId)throw new p("userId","Required parameter requestParameters.userId was null or undefined when calling updateUser.");if(null===e.updateUserDto||void 0===e.updateUserDto)throw new p("updateUserDto","Required parameter requestParameters.updateUserDto was null or undefined when calling updateUser.");const r={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const n=yield this.request({path:"/api/newsletters/v1/users/{userId}".replace("{userId}",encodeURIComponent(String(e.userId))),method:"PATCH",headers:r,query:{},body:j(e.updateUserDto)},t);return new f(n,(e=>N(e)))}))}updateUser(e,t){return $(this,void 0,void 0,(function*(){const r=yield this.updateUserRaw(e,t);return yield r.value()}))}}class G extends F{constructor(e){super(e)}getUsers(e){return console.log("DEPRECATED"),super.getUsers(e)}}class L extends s{constructor(e){super(e)}}},174570:e=>{function t(e,t,r,n,i,s,o){try{var a=e[s](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(i,s){var o=e.apply(r,n);function a(e){t(o,i,s,a,c,"next",e)}function c(e){t(o,i,s,a,c,"throw",e)}a(void 0)}))}}},527518:e=>{e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},577865:(e,t,r)=>{var n=r(527518);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},223265:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},727076:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,s=Object.create(i.prototype),o=new O(n||[]);return s._invoke=function(e,t,r){var n=l;return function(i,s){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw s;return D()}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var a=I(o,r);if(a){if(a===m)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?h:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,o),s}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function f(){}function g(){}function y(){}var b={};b[s]=function(){return this};
vendor: 4,540 bytes, line 1
1var v=Object.getPrototypeOf,w=v&&v(v(_([])));w&&w!==r&&n.call(w,s)&&(b=w);var S=y.prototype=f.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function T(e){function t(r,i,s,o){var a=u(e[r],e,i);if("throw"!==a.type){var c=a.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,s,o)}),(function(e){t("throw",e,s,o)})):Promise.resolve(l).then((function(e){c.value=e,s(c)}),(function(e){return t("throw",e,s,o)}))}o(a.arg)}var r;this._invoke=function(e,n){function i(){return new Promise((function(r,i){t(e,n,r,i)}))}return r=r?r.then(i,i):i()}}function I(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=u(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(e){if(e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:D}}function D(){return{value:t,done:!0}}return g.prototype=S.constructor=y,y.constructor=g,y[a]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},E(T.prototype),T.prototype[o]=function(){return this},e.AsyncIterator=T,e.async=function(t,r,n,i){var s=new T(c(t,r,n,i));return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},E(S),S[a]="Generator",S[s]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=e,o.arg=t,s?(this.method="next",this.next=s.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
1if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},444920:(e,t,r)=>{e.exports=r(727076)},351918:(e,t,r)=>{"use strict";(t=e.exports=r(202394).default).default=t},202394:(e,t)=>{"use strict";t.default=function(){function e(t,r,n,i){this.message=t,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),{SyntaxError:e,parse:function(t){var r,n=arguments.length>1?arguments[1]:{},i={},s={start:ke},o=ke,a=function(e){return{type:"messageFormatPattern",elements:e,location:Oe()}},c=function(e){var t,r,n,i,s,o="";for(t=0,n=e.length;t<n;t+=1)for(r=0,s=(i=e[t]).length;r<s;r+=1)o+=i[r];return o},u=function(e){return{type:"messageTextElement",value:e,location:Oe()}},l=/^[^ \t\n\r,.+={}#]/,d={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},p="{",h={type:"literal",value:"{",description:'"{"'},m=",",f={type:"literal",value:",",description:'","'},g="}",y={type:"literal",value:"}",description:'"}"'},b=function(e,t){return{type:"argumentElement",id:e,format:t&&t[2],location:Oe()}},v="number",w={type:"literal",value:"number",description:'"number"'},S="date",E={type:"literal",value:"date",description:'"date"'},T="time",I={type:"literal",value:"time",description:'"time"'},C="shortNumber",A={type:"literal",value:"shortNumber",description:'"shortNumber"'},O=function(e,t){return{type:e+"Format",style:t&&t[2],location:Oe()}},_="plural",D={type:"literal",value:"plural",description:'"plural"'},P=function(e){return{type:e.type,ordinal:!1,offset:e.offset||0,options:e.options,location:Oe()}},k="selectordinal",x={type:"literal",value:"selectordinal",description:'"selectordinal"'},R=function(e){return{type:e.type,ordinal:!0,offset:e.offset||0,options:e.options,location:Oe()}},U="select",M={type:"literal",value:"select",description:'"select"'},N=function(e){return{type:"selectFormat",options:e,location:Oe()}},j="=",$={type:"literal",value:"=",description:'"="'},F=function(e,t){return{type:"optionalFormatPattern",selector:e,value:t,location:Oe()}},G="offset:",L={type:"literal",value:"offset:",description:'"offset:"'},H=function(e){return e},B=function(e,t){return{type:"pluralFormat",offset:e,options:t,location:Oe()}},W={type:"other",description:"whitespace"},q=/^[ \t\n\r]/,V={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},K={type:"other",description:"optionalWhitespace"},z=/^[0-9]/,Y={type:"class",value:"[0-9]",description:"[0-9]"},J=/^[0-9a-f]/i,Q={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},Z="0",X={type:"literal",value:"0",description:'"0"'},ee=/^[1-9]/,te={type:"class",value:"[1-9]",description:"[1-9]"},re=function(e){return parseInt(e,10)},ne=/^[^{}\\\0-\x1F� \t\n\r]/,ie={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},se="\\\\",oe={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},ae=function(){return"\\"},ce="\\#",ue={type:"literal",value:"\\#",description:'"\\\\#"'},le=function(){return"\\#"},de="\\{",pe={type:"literal",value:"\\{",description:'"\\\\{"'},he=function(){return"{"},me="\\}",fe={type:"literal",value:"\\}",description:'"\\\\}"'},ge=function(){return"}"},ye="\\u",be={type:"literal",value:"\\u",description:'"\\\\u"'},ve=function(e){return String.fromCharCode(parseInt(e,16))},we=function(e){return e.join("")},Se=0,Ee=0,Te=[{line:1,column:1,seenCR:!1}],Ie=0,Ce=[],Ae=0;if("startRule"in n){if(!(n.startRule in s))throw new Error("Can't start parsing from rule \""+n.startRule+'".');o=s[n.startRule]}function Oe(){return De(Ee,Se)}function _e(e){var r,n,i=Te[e];if(i)return i;for(r=e-1;!Te[r];)r--;for(i={line:(i=Te[r]).line,column:i.column,seenCR:i.seenCR};r<e;)"\n"===(n=t.charAt(r))?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),r++;return Te[e]=i,i}function De(e,t){var r=_e(e),n=_e(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function Pe(e){Se<Ie||(Se>Ie&&(Ie=Se,Ce=[]),Ce.push(e))}function ke(){return xe()}function xe(){var e,t,r;for(e=Se,t=[],r=Re();r!==i;)t.push(r),r=Re();return t!==i&&(Ee=e,t=a(t)),t}function Re(){var e;return(e=function(){var e,r;return e=Se,r=function(){var e,r,n,s,o,a;if(e=Se,r=[],n=Se,(s=je())!==i&&(o=He())!==i&&(a=je())!==i?n=s=[s,o,a]:(Se=n,n=i),n!==i)for(;n!==i;)r.push(n),n=Se,(s=je())!==i&&(o=He())!==i&&(a=je())!==i?n=s=[s,o,a]:(Se=n,n=i);else r=i;return r!==i&&(Ee=e,r=c(r)),(e=r)===i&&(e=Se,e=(r=Ne())!==i?t.substring(e,Se):r),e}(),r!==i&&(Ee=e,r=u(r)),r}())===i&&(e=function(){var e,r,n,s,o,a,c;return e=Se,123===t.charCodeAt(Se)?(r=p,Se++):(r=i,0===Ae&&Pe(h)),r!==i&&je()!==i?(n=function(){var e,r,n;if((e=Ge())===i){if(e=Se,r=[],l.test(t.charAt(Se))?(n=t.charAt(Se),Se++):(n=i,0===Ae&&Pe(d)),n!==i)for(;n!==i;)r.push(n),l.test(t.charAt(Se))?(n=t.charAt(Se),Se++):(n=i,0===Ae&&Pe(d));else r=i;e=r!==i?t.substring(e,Se):r}return e}(),n!==i&&je()!==i?(s=Se,44===t.charCodeAt(Se)?(o=m,Se++):(o=i,0===Ae&&Pe(f)),o!==i&&(a=je())!==i?(c=function(){var e;return e=function(){var e,r,n,s,o,a;return e=Se,t.substr(Se,6)===v?(r=v,Se+=6):(r=i,0===Ae&&Pe(w)),r
1===i&&(t.substr(Se,4)===S?(r=S,Se+=4):(r=i,0===Ae&&Pe(E)),r===i&&(t.substr(Se,4)===T?(r=T,Se+=4):(r=i,0===Ae&&Pe(I)),r===i&&(t.substr(Se,11)===C?(r=C,Se+=11):(r=i,0===Ae&&Pe(A))))),r!==i&&je()!==i?(n=Se,44===t.charCodeAt(Se)?(s=m,Se++):(s=i,0===Ae&&Pe(f)),s!==i&&(o=je())!==i&&(a=He())!==i?n=s=[s,o,a]:(Se=n,n=i),n===i&&(n=null),n!==i?(Ee=e,e=r=O(r,n)):(Se=e,e=i)):(Se=e,e=i),e}(),e===i&&(e=function(){var e,r,n,s;return e=Se,t.substr(Se,6)===_?(r=_,Se+=6):(r=i,0===Ae&&Pe(D)),r!==i&&je()!==i?(44===t.charCodeAt(Se)?(n=m,Se++):(n=i,0===Ae&&Pe(f)),n!==i&&je()!==i&&(s=Me())!==i?(Ee=e,e=r=P(s)):(Se=e,e=i)):(Se=e,e=i),e}(),e===i&&(e=function(){var e,r,n,s;return e=Se,t.substr(Se,13)===k?(r=k,Se+=13):(r=i,0===Ae&&Pe(x)),r!==i&&je()!==i?(44===t.charCodeAt(Se)?(n=m,Se++):(n=i,0===Ae&&Pe(f)),n!==i&&je()!==i&&(s=Me())!==i?(Ee=e,e=r=R(s)):(Se=e,e=i)):(Se=e,e=i),e}(),e===i&&(e=function(){var e,r,n,s,o;if(e=Se,t.substr(Se,6)===U?(r=U,Se+=6):(r=i,0===Ae&&Pe(M)),r!==i)if(je()!==i)if(44===t.charCodeAt(Se)?(n=m,Se++):(n=i,0===Ae&&Pe(f)),n!==i)if(je()!==i){if(s=[],(o=Ue())!==i)for(;o!==i;)s.push(o),o=Ue();else s=i;s!==i?(Ee=e,e=r=N(s)):(Se=e,e=i)}else Se=e,e=i;else Se=e,e=i;else Se=e,e=i;else Se=e,e=i;return e}()))),e}(),c!==i?s=o=[o,a,c]:(Se=s,s=i)):(Se=s,s=i),s===i&&(s=null),s!==i&&(o=je())!==i?(125===t.charCodeAt(Se)?(a=g,Se++):(a=i,0===Ae&&Pe(y)),a!==i?(Ee=e,e=r=b(n,s)):(Se=e,e=i)):(Se=e,e=i)):(Se=e,e=i)):(Se=e,e=i),e}()),e}function Ue(){var e,r,n,s,o;return e=Se,je()!==i?(r=function(){var e,r,n,s;return e=Se,r=Se,61===t.charCodeAt(Se)?(n=j,Se++):(n=i,0===Ae&&Pe($)),n!==i&&(s=Ge())!==i?r=n=[n,s]:(Se=r,r=i),(e=r!==i?t.substring(e,Se):r)===i&&(e=He()),e}(),r!==i&&je()!==i?(123===t.charCodeAt(Se)?(n=p,Se++):(n=i,0===Ae&&Pe(h)),n!==i&&je()!==i&&(s=xe())!==i&&je()!==i?(125===t.charCodeAt(Se)?(o=g,Se++):(o=i,0===Ae&&Pe(y)),o!==i?(Ee=e,e=F(r,s)):(Se=e,e=i)):(Se=e,e=i)):(Se=e,e=i)):(Se=e,e=i),e}function Me(){var e,r,n,s;if(e=Se,r=function(){var e,r,n;return e=Se,t.substr(Se,7)===G?(r=G,Se+=7):(r=i,0===Ae&&Pe(L)),r!==i&&je()!==i&&(n=Ge())!==i?(Ee=e,e=r=H(n)):(Se=e,e=i),e}(),r===i&&(r=null),r!==i)if(je()!==i){if(n=[],(s=Ue())!==i)for(;s!==i;)n.push(s),s=Ue();else n=i;n!==i?(Ee=e,e=r=B(r,n)):(Se=e,e=i)}else Se=e,e=i;else Se=e,e=i;return e}function Ne(){var e,r;if(Ae++,e=[],q.test(t.charAt(Se))?(r=t.charAt(Se),Se++):(r=i,0===Ae&&Pe(V)),r!==i)for(;r!==i;)e.push(r),q.test(t.charAt(Se))?(r=t.charAt(Se),Se++):(r=i,0===Ae&&Pe(V));else e=i;return Ae--,e===i&&(r=i,0===Ae&&Pe(W)),e}function je(){var e,r,n;for(Ae++,e=Se,r=[],n=Ne();n!==i;)r.push(n),n=Ne();return e=r!==i?t.substring(e,Se):r,Ae--,e===i&&(r=i,0===Ae&&Pe(K)),e}function $e(){var e;return z.test(t.charAt(Se))?(e=t.charAt(Se),Se++):(e=i,0===Ae&&Pe(Y)),e}function Fe(){var e;return J.test(t.charAt(Se))?(e=t.charAt(Se),Se++):(e=i,0===Ae&&Pe(Q)),e}function Ge(){var e,r,n,s,o,a;if(e=Se,48===t.charCodeAt(Se)?(r=Z,Se++):(r=i,0===Ae&&Pe(X)),r===i){if(r=Se,n=Se,ee.test(t.charAt(Se))?(s=t.charAt(Se),Se++):(s=i,0===Ae&&Pe(te)),s!==i){for(o=[],a=$e();a!==i;)o.push(a),a=$e();o!==i?n=s=[s,o]:(Se=n,n=i)}else Se=n,n=i;r=n!==i?t.substring(r,Se):n}return r!==i&&(Ee=e,r=re(r)),r}function Le(){var e,r,n,s,o,a,c,u;return ne.test(t.charAt(Se))?(e=t.charAt(Se),Se++):(e=i,0===Ae&&Pe(ie)),e===i&&(e=Se,t.substr(Se,2)===se?(r=se,Se+=2):(r=i,0===Ae&&Pe(oe)),r!==i&&(Ee=e,r=ae()),(e=r)===i&&(e=Se,t.substr(Se,2)===ce?(r=ce,Se+=2):(r=i,0===Ae&&Pe(ue)),r!==i&&(Ee=e,r=le()),(e=r)===i&&(e=Se,t.substr(Se,2)===de?(r=de,Se+=2):(r=i,0===Ae&&Pe(pe)),r!==i&&(Ee=e,r=he()),(e=r)===i&&(e=Se,t.substr(Se,2)===me?(r=me,Se+=2):(r=i,0===Ae&&Pe(fe)),r!==i&&(Ee=e,r=ge()),(e=r)===i&&(e=Se,t.substr(Se,2)===ye?(r=ye,Se+=2):(r=i,0===Ae&&Pe(be)),r!==i?(n=Se,s=Se,(o=Fe())!==i&&(a=Fe())!==i&&(c=Fe())!==i&&(u=Fe())!==i?s=o=[o,a,c,u]:(Se=s,s=i),(n=s!==i?t.substring(n,Se):s)!==i?(Ee=e,e=r=ve(n)):(Se=e,e=i)):(Se=e,e=i)))))),e}function He(){var e,t,r;if(e=Se,t=[],(r=Le())!==i)for(;r!==i;)t.push(r),r=Le();else t=i;return t!==i&&(Ee=e,t=we(t)),t}if((r=o())!==i&&Se===t.length)return r;throw r!==i&&Se<t.length&&Pe({type:"end",description:"end of input"}),function(t,r,n,i){return null!==r&&function(e){var t=1;for(e.sort((function(e,t){return e.description<t.description?-1:e.description>
1t.description?1:0}));t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}(r),new e(function(e,t){var r,n=new Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r].description;return"Expected "+(e.length>1?n.slice(0,-1).join(", ")+" or "+n[e.length-1]:n[0])+" but "+(t?'"'+function(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,(function(e){return"\\x0"+t(e)})).replace(/[\x10-\x1F\x80-\xFF]/g,(function(e){return"\\x"+t(e)})).replace(/[\u0100-\u0FFF]/g,(function(e){return"\\u0"+t(e)})).replace(/[\u1000-\uFFFF]/g,(function(e){return"\\u"+t(e)}))}(t)+'"':"end of input")+" found."}(r,n),r,n,i)}(0,Ce,Ie<t.length?t.charAt(Ie):null,Ie<t.length?De(Ie,Ie+1):De(Ie,Ie))}}}()},781832:(e,t,r)=>{"use strict";var n=r(733161).Z;r(496076),(t=e.exports=n).default=t},591061:(e,t,r)=>{"use strict";var n=r(928719),i=r(697188);function s(e,t,r){this.locales=e,this.formats=t,this.pluralFn=r}function o(e){this.id=e}function a(e,t,r,n,i){this.id=e,this.useOrdinal=t,this.offset=r,this.options=n,this.pluralFn=i}function c(e,t,r,n){this.id=e,this.offset=t,this.numberFormat=r,this.string=n}function u(e,t){this.id=e,this.options=t}function l(e,t){this.__locales__=e,this.__options__=t,this.__localeData__=n.default.__localeData__}t.default=s,s.prototype.compile=function(e){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(e)},s.prototype.compileMessage=function(e){if(!e||"messageFormatPattern"!==e.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var t,r,n,i=e.elements,s=[];for(t=0,r=i.length;t<r;t+=1)switch((n=i[t]).type){case"messageTextElement":s.push(this.compileMessageText(n));break;case"argumentElement":s.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return s},s.prototype.compileMessageText=function(e){return this.currentPlural&&/(^|[^\\])#/g.test(e.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new c(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,e.value)):e.value.replace(/\\#/g,"#")},s.prototype.compileArgument=function(e){var t=e.format;if(!t)return new o(e.id);var r,n=this.formats,i=this.locales,s=this.pluralFn;switch(t.type){case"numberFormat":return r=n.number[t.style],{id:e.id,format:new Intl.NumberFormat(i,r).format};case"shortNumberFormat":var c=new l(i,r=n.shortNumber[t.style]);return{id:e.id,format:c.format.bind(c)};case"dateFormat":return r=n.date[t.style],{id:e.id,format:new Intl.DateTimeFormat(i,r).format};case"timeFormat":return r=n.time[t.style],{id:e.id,format:new Intl.DateTimeFormat(i,r).format};case"pluralFormat":return r=this.compileOptions(e),new a(e.id,t.ordinal,t.offset,r,s);case"selectFormat":return r=this.compileOptions(e),new u(e.id,r);default:throw new Error("Message element does not have a valid format type")}},s.prototype.compileOptions=function(e){var t,r,n,i=e.format,s=i.options,o={};for(this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===i.type?e:null,t=0,r=s.length;t<r;t+=1)o[(n=s[t]).selector]=this.compileMessage(n.value);return this.currentPlural=this.pluralStack.pop(),o},o.prototype.format=function(e){return e||"number"==typeof e?"string"==typeof e?e:String(e):""},a.prototype.getOption=function(e){var t=this.options;return t["="+e]||t[this.pluralFn(e-this.offset,this.useOrdinal)]||t.other},c.prototype.format=function(e){var t=this.numberFormat.format(e-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+t).replace(/\\#/g,"#")},u.prototype.getOption=function(e){var t=this.options;return t[e]||t.other},l.prototype.format=function(e,t){return i.compactFormat(e,this.__locales__,this.__localeData__,this.__options__)}},928719:(e,t,r)=>{"use strict";var n=r(343012),i=r(921705),s=r(591061),o=r(351918);function a(e,t,r){var n="string"==typeof e?a.__parse(e):e;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(a.formats,r),i.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var s=this._findPluralRuleFunction(this._locale),o=this._compilePattern(n,t,r,s),c=this;
1this.format=function(t){try{return c._format(o,t)}catch(t){throw t.variableId?new Error("The intl string context variable '"+t.variableId+"' was not provided to the string '"+e+"'"):t}}}t.default=a,i.defineProperty(a,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},shortNumber:{},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),i.defineProperty(a,"__localeData__",{value:i.objCreate(null)}),i.defineProperty(a,"__addLocaleData",{value:function(e){if(!e||!e.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");a.__localeData__[e.locale.toLowerCase()]=e}}),i.defineProperty(a,"__parse",{value:o.default.parse}),i.defineProperty(a,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),a.prototype.resolvedOptions=function(){return{locale:this._locale}},a.prototype._compilePattern=function(e,t,r,n){return new s.default(t,r,n).compile(e)},a.prototype._findPluralRuleFunction=function(e){for(var t=a.__localeData__,r=t[e.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&t[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+e)},a.prototype._format=function(e,t){var r,i,s,o,a,c,u="";for(r=0,i=e.length;r<i;r+=1)if("string"!=typeof(s=e[r])){if(o=s.id,!t||!n.hop.call(t,o))throw(c=new Error("A value must be provided for: "+o)).variableId=o,c;a=t[o],s.options?u+=this._format(s.getOption(a),t):u+=s.format(a)}else u+=s;return u},a.prototype._mergeFormats=function(e,t){var r,s,o={};for(r in e)n.hop.call(e,r)&&(o[r]=s=i.objCreate(e[r]),t&&n.hop.call(t,r)&&n.extend(s,t[r]));return o},a.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(a.defaultLocale);var t,r,n,i,s=a.__localeData__;for(t=0,r=e.length;t<r;t+=1)for(n=e[t].toLowerCase().split("-");n.length;){if(i=s[n.join("-")])return i.locale;n.pop()}var o=e.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+e.join(", ")+", or the default locale: "+o)}},560760:(e,t)=>{"use strict";t.default={locale:"en",pluralRuleFunction:function(e,t){var r=String(e).split("."),n=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),o=i&&r[0].slice(-2);return t?1==s&&11!=o?"one":2==s&&12!=o?"two":3==s&&13!=o?"few":"other":1==e&&n?"one":"other"},numbers:{decimal:{long:[[1e3,{one:["0 thousand",1],other:["0 thousand",1]}],[1e4,{one:["00 thousand",2],other:["00 thousand",2]}],[1e5,{one:["000 thousand",3],other:["000 thousand",3]}],[1e6,{one:["0 million",1],other:["0 million",1]}],[1e7,{one:["00 million",2],other:["00 million",2]}],[1e8,{one:["000 million",3],other:["000 million",3]}],[1e9,{one:["0 billion",1],other:["0 billion",1]}],[1e10,{one:["00 billion",2],other:["00 billion",2]}],[1e11,{one:["000 billion",3],other:["000 billion",3]}],[1e12,{one:["0 trillion",1],other:["0 trillion",1]}],[1e13,{one:["00 trillion",2],other:["00 trillion",2]}],[1e14,{one:["000 trillion",3],other:["000 trillion",3]}]],short:[[1e3,{one:["0K",1],other:["0K",1]}],[1e4,{one:["00K",2],other:["00K",2]}],[1e5,{one:["000K",3],other:["000K",3]}],[1e6,{one:["0M",1],other:["0M",1]}],[1e7,{one:["00M",2],other:["00M",2]}],[1e8,{one:["000M",3],other:["000M",3]}],[1e9,{one:["0B",1],other:["0B",1]}],[1e10,{one:["00B",2],other:["00B",2]}],[1e11,{one:["000B",3],other:["000B",3]}],[1e12,{one:["0T",1],other:["0T",1]}],[1e13,{one:["00T",2],other:["00T",2]}],[1e14,{one:["000T",3],other:["000T",3]}]]}}}},921705:(e,t,r)=>{"use strict";var n=r(343012),i=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),s=(!i&&Object.prototype.__defineGetter__,i?Object.defineProperty:function(e,t,r){"get"in r&&e.__defineGetter__?e.__defineGetter__(t,r.get):n.hop.call(e,t)&&!("value"in r)||(e[t]=r.value)}),o=Object.create||function(e,t){var r,i;function o(){}for(i in o.prototype=e,r=new o,t)n.hop.call(t,i)&&s(r,i,t[i]);return r};t.defineProperty=s,t.objCreate=o},733161:(e,t,r)=>{"use strict";var n=r(928719),i=r(560760);n.default.__addLocaleData(i.default),n.default.defaultLocale="en",t.Z=n.default},343012:(e,t)=>
1{"use strict";t.extend=function(e){var t,n,i,s,o=Array.prototype.slice.call(arguments,1);for(t=0,n=o.length;t<n;t+=1)if(i=o[t])for(s in i)r.call(i,s)&&(e[s]=i[s]);return e};var r=Object.prototype.hasOwnProperty;t.hop=r},661387:(e,t,r)=>{"use strict";var n=r(275925).Z;r(49316),(t=e.exports=n).default=t},463594:(e,t,r)=>{"use strict";var n=r(781832),i=r(87362),s=r(265117);t.default=c;var o=["second","second-short","minute","minute-short","hour","hour-short","day","day-short","month","month-short","year","year-short"],a=["best fit","numeric"];function c(e,t){t=t||{},s.isArray(e)&&(e=e.concat()),s.defineProperty(this,"_locale",{value:this._resolveLocale(e)}),s.defineProperty(this,"_options",{value:{style:this._resolveStyle(t.style),units:this._isValidUnits(t.units)&&t.units}}),s.defineProperty(this,"_locales",{value:e}),s.defineProperty(this,"_fields",{value:this._findFields(this._locale)}),s.defineProperty(this,"_messages",{value:s.objCreate(null)});var r=this;this.format=function(e,t){return r._format(e,t)}}s.defineProperty(c,"__localeData__",{value:s.objCreate(null)}),s.defineProperty(c,"__addLocaleData",{value:function(e){if(!e||!e.locale)throw new Error("Locale data provided to IntlRelativeFormat is missing a `locale` property value")
2;c.__localeData__[e.locale.toLowerCase()]=e,n.default.__addLocaleData(e)}}),s.defineProperty(c,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),s.defineProperty(c,"thresholds",{enumerable:!0,value:{second:45,"second-short":45,minute:45,"minute-short":45,hour:22,"hour-short":22,day:26,"day-short":26,month:11,"month-short":11}}),c.prototype.resolvedOptions=function(){return{locale:this._locale,style:this._options.style,units:this._options.units}},c.prototype._compileMessage=function(e){var t,r=this._locales,i=(this._locale,this._fields[e].relativeTime),s="",o="";for(t in i.future)i.future.hasOwnProperty(t)&&(s+=" "+t+" {"+i.future[t].replace("{0}","#")+"}");for(t in i.past)i.past.hasOwnProperty(t)&&(o+=" "+t+" {"+i.past[t].replace("{0}","#")+"}");var a="{when, select, future {{0, plural, "+s+"}}past {{0, plural, "+o+"}}}";return new n.default(a,r)},c.prototype._getMessage=function(e){var t=this._messages;return t[e]||(t[e]=this._compileMessage(e)),t[e]},c.prototype._getRelativeUnits=function(e,t){var r=this._fields[t];if(r.relative)return r.relative[e]},c.prototype._findFields=function(e){for(var t=c.__localeData__,r=t[e.toLowerCase()];r;){if(r.fields)return r.fields;r=r.parentLocale&&t[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlRelativeFormat is missing `fields` for :"+e)},c.prototype._format=function(e,t){var r=t&&void 0!==t.now?t.now:s.dateNow();if(void 0===e&&(e=r),!isFinite(r))throw new RangeError("The `now` option provided to IntlRelativeFormat#format() is not in valid range.");if(!isFinite(e))throw new RangeError("The date value provided to IntlRelativeFormat#format() is not in valid range.");var n=i.default(r,e),o=this._options.units||this._selectUnits(n),a=n[o];if("numeric"!==this._options.style){var c=this._getRelativeUnits(a,o);if(c)return c}return this._getMessage(o).format({0:Math.abs(a),when:a<0?"past":"future"})},c.prototype._isValidUnits=function(e){if(!e||s.arrIndexOf.call(o,e)>=0)return!0;if("string"==typeof e){var t=/s$/.test(e)&&e.substr(0,e.length-1);if(t&&s.arrIndexOf.call(o,t)>=0)throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, did you mean: '+t)}throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, it must be one of: "'+o.join('", "')+'"')},c.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(c.defaultLocale);var t,r,n,i,s=c.__localeData__;for(t=0,r=e.length;t<r;t+=1)for(n=e[t].toLowerCase().split("-");n.length;){if(i=s[n.join("-")])return i.locale;n.pop()}var o=e.pop();throw new Error("No locale data has been added to IntlRelativeFormat for: "+e.join(", ")+", or the default locale: "+o)},c.prototype._resolveStyle=function(e){if(!e)return a[0];if(s.arrIndexOf.call(a,e)>=0)return e;throw new Error('"'+e+'" is not a valid IntlRelativeFormat `style` value, it must be one of: "'+a.join('", "')+'"')},c.prototype._selectUnits=function(e){var t,r,n,i=o.filter((function(e){return e.indexOf("-short")<1}));for(t=0,r=i.length;t<r&&(n=i[t],!(Math.abs(e[n])<c.thresholds[n]));t+=1);return n}},87362:(e,t)=>
2{"use strict";var r=Math.round;t.default=function(e,t){var n=r((t=+t)-(e=+e)),i=r(n/1e3),s=r(i/60),o=r(s/60),a=r(o/24),c=r(a/7),u=400*a/146097,l=r(12*u),d=r(u);return{millisecond:n,second:i,"second-short":i,minute:s,"minute-short":s,hour:o,"hour-short":o,day:a,"day-short":a,week:c,"week-short":c,month:l,"month-short":l,year:d,"year-short":d}}},452806:(e,t)=>{"use strict";t.default={locale:"en",pluralRuleFunction:function(e,t){var r=String(e).split("."),n=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),o=i&&r[0].slice(-2);return t?1==s&&11!=o?"one":2==s&&12!=o?"two":3==s&&13!=o?"few":"other":1==e&&n?"one":"other"},fields:{year:{displayName:"year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},"year-short":{displayName:"yr.",relative:{0:"this yr.",1:"next yr.","-1":"last yr."},relativeTime:{future:{one:"in {0} yr.",other:"in {0} yr."},past:{one:"{0} yr. ago",other:"{0} yr. ago"}}},month:{displayName:"month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},"month-short":{displayName:"mo.",relative:{0:"this mo.",1:"next mo.","-1":"last mo."},relativeTime:{future:{one:"in {0} mo.",other:"in {0} mo."},past:{one:"{0} mo. ago",other:"{0} mo. ago"}}},day:{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},"day-short":{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"hour",relative:{0:"this hour"},relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},"hour-short":{displayName:"hr.",relative:{0:"this hour"},relativeTime:{future:{one:"in {0} hr.",other:"in {0} hr."},past:{one:"{0} hr. ago",other:"{0} hr. ago"}}},minute:{displayName:"minute",relative:{0:"this minute"},relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},"minute-short":{displayName:"min.",relative:{0:"this minute"},relativeTime:{future:{one:"in {0} min.",other:"in {0} min."},past:{one:"{0} min. ago",other:"{0} min. ago"}}},second:{displayName:"second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}},"second-short":{displayName:"sec.",relative:{0:"now"},relativeTime:{future:{one:"in {0} sec.",other:"in {0} sec."},past:{one:"{0} sec. ago",other:"{0} sec. ago"}}}}}},265117:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),s=(!i&&Object.prototype.__defineGetter__,i?Object.defineProperty:function(e,t,n){"get"in n&&e.__defineGetter__?e.__defineGetter__(t,n.get):r.call(e,t)&&!("value"in n)||(e[t]=n.value)}),o=Object.create||function(e,t){var n,i;function o(){}for(i in o.prototype=e,n=new o,t)r.call(t,i)&&s(n,i,t[i]);return n},a=Array.prototype.indexOf||function(e,t){var r=this;if(!r.length)return-1;for(var n=t||0,i=r.length;n<i;n++)if(r[n]===e)return n;return-1},c=Array.isArray||function(e){return"[object Array]"===n.call(e)},u=Date.now||function(){return(new Date).getTime()};t.defineProperty=s,t.objCreate=o,t.arrIndexOf=a,t.isArray=c,t.dateNow=u},275925:(e,t,r)=>{"use strict";var n=r(463594),i=r(452806);n.default.__addLocaleData(i.default),n.default.defaultLocale="en",t.Z=n.default},268280:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arcgisToGeoJSON:()=>u,geojsonToArcGIS:()=>d});var n=function(e,t,r,n){var i=(n[0]-r[0])*(e[1]-r[1])-(n[1]-r[1])*(e[0]-r[0]),s=(t[0]-e[0])*(e[1]-r[1])-(t[1]-e[1])*(e[0]-r[0]),o=(n[1]-r[1])*(t[0]-e[0])-(n[0]-r[0])*(t[1]-e[1]);if(0!==o){var a=i/o,c=s/o;if(a>=0&&a<=1&&c>=0&&c<=1)return!0}return!1},i=function(e,t){for(var r=0;r<e.length-1;r++)for(var i=0;i<t.length-1;i++)if(n(e[r],e[r+1],t[i],t[i+1]))return!0;return!1},s=function(e){return function(e,t){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(e[0],e[e.length-1])||e.push(e[0]),e},o=function(e){for(var t,r=0,n=0,i=e.length,s=e[n];n<i-1;n++)r+=((t=e[n+1])[0]-s[0])*(t[1]+s[1]),s=t;return r>=0},a=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},c=function(e,t){var r=i(e,t),n=function(e,t){for(var r=!1,n=-1,i=e.length,s=i-1;++n<i;s=n)(e[n][1]<=t[1]&&t[1]<e[s][1]||e[s][1]<=t[1]&&t[1]<e[n][1])&&t[0]<(e[s][0]-e[n][0])*(t[1]-e[n][1])/(e[s][1]-e[n][1])+e[n][0]&&(r=!r);return r}(e,t[0]);return!(r||!n)},u=function e(t,r){var n={};if(t.features){n.type="FeatureCollection",n.features=[];for(var u=0;u<t.features.length;u++)n.features.push(e(t.features[u],r))}if("number"==typeof t.x&&"number"==typeof t.y&&(n.type="Point",n.coordinates=[t.x,t.y],"number"==typeof t.z&&n.coordinates.push(t.z)),t.points&&(n.type="MultiPoint",n.coordinates=t.points.slice(0)),t.paths&&(1===t.paths.length?(n.type="LineString",n.coordinates=t.paths[0].slice(0)):(n.type="MultiLineString",n.coordinates=t.paths.slice(0))),t.rings&&(n=function(e){for(var t,r,n,a=[],u=[],l=0;l<e.length;l++){var d=s(e[l].slice(0));
2if(!(d.length<4))if(o(d)){var p=[d.slice().reverse()];a.push(p)}else u.push(d.slice().reverse())}for(var h=[];u.length;){n=u.pop();var m=!1;for(t=a.length-1;t>=0;t--)if(r=a[t][0],c(r,n)){a[t].push(n),m=!0;break}m||h.push(n)}for(;h.length;){n=h.pop();var f=!1;for(t=a.length-1;t>=0;t--)if(r=a[t][0],i(r,n)){a[t].push(n),f=!0;break}f||a.push([n.reverse()])}return 1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}(t.rings.slice(0))),"number"==typeof t.xmin&&"number"==typeof t.ymin&&"number"==typeof t.xmax&&"number"==typeof t.ymax&&(n.type="Polygon",n.coordinates=[[[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax]]]),(t.geometry||t.attributes)&&(n.type="Feature",n.geometry=t.geometry?e(t.geometry):null,n.properties=t.attributes?a(t.attributes):null,t.attributes))try{n.id=function(e,t){for(var r=t?[t,"OBJECTID","FID"]:["OBJECTID","FID"],n=0;n<r.length;n++){var i=r[n];if(i in e&&("string"==typeof e[i]||"number"==typeof e[i]))return e[i]}throw Error("No valid id attribute found")}(t.attributes,r)}catch(e){}return JSON.stringify(n.geometry)===JSON.stringify({})&&(n.geometry=null),t.spatialReference&&t.spatialReference.wkid&&4326!==t.spatialReference.wkid&&console.warn("Object converted in non-standard crs - "+JSON.stringify(t.spatialReference)),n},l=function(e){var t=[],r=e.slice(0),n=s(r.shift().slice(0));if(n.length>=4){o(n)||n.reverse(),t.push(n);for(var i=0;i<r.length;i++){var a=s(r[i].slice(0));a.length>=4&&(o(a)&&a.reverse(),t.push(a))}}return t},d=function e(t,r){r=r||"OBJECTID";var n,i={wkid:4326},s={};switch(t.type){case"Point":s.x=t.coordinates[0],s.y=t.coordinates[1],s.spatialReference=i;break;case"MultiPoint":s.points=t.coordinates.slice(0),s.spatialReference=i;break;case"LineString":s.paths=[t.coordinates.slice(0)],s.spatialReference=i;break;case"MultiLineString":s.paths=t.coordinates.slice(0),s.spatialReference=i;break;case"Polygon":s.rings=l(t.coordinates.slice(0)),s.spatialReference=i;break;case"MultiPolygon":s.rings=function(e){for(var t=[],r=0;r<e.length;r++)for(var n=l(e[r]),i=n.length-1;i>=0;i--){var s=n[i].slice(0);t.push(s)}return t}(t.coordinates.slice(0)),s.spatialReference=i;break;case"Feature":t.geometry&&(s.geometry=e(t.geometry,r)),s.attributes=t.properties?a(t.properties):{},t.id&&(s.attributes[r]=t.id);break;case"FeatureCollection":for(s=[],n=0;n<t.features.length;n++)s.push(e(t.features[n],r));break;case"GeometryCollection":for(s=[],n=0;n<t.geometries.length;n++)s.push(e(t.geometries[n],r))}return s}},336253:(e,t,r)=>{"use strict";r.d(t,{M7:()=>p,Mq:()=>m,me:()=>d});var n=r(170209),i=r(453672),s=r(264263),o=r(518944),a=r(665975),c=r(788052),u=r(496157),l=r(248802);const d="/apps/sites",p="home",h={qaext:["da45c26e67764c79840928cd8d05561a"],devext:[],production:["e3db35f7de63451f8243415445694761"],enterprise:[],"enterprise-k8s":[]};class m{constructor(e){this._portalUrl="https://www.arcgis.com",this._featureFlags={},this._trustedOrgIds=[],this._trustedOrgs=[],this._userResourceTokens=[],this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,this._serviceStatus=e.serviceStatus,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.portalSettings&&(this._portalSettings=e.portalSettings),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties),e.trustedOrgIds&&(this._trustedOrgIds=e.trustedOrgIds),e.trustedOrgs&&(this._trustedOrgs=e.trustedOrgs),this._featureFlags=e.featureFlags||{},this._userResourceTokens=e.userResourceTokens||[],this._userHubSettings=e.userHubSettings||{schemaVersion:1}}get session(){return this._authentication}get isAuthenticated(){return!!this._authentication}get featureFlags(){return this._featureFlags}get isAlphaOrg(){var e,t;let r=!1;const n=(null===(e=this._properties)||void 0===e?void 0:e.alphaOrgs)||[],i=null===(t=this._portalSelf)||void 0===t?void 0:t.id;return n.length&&i&&(r=n.includes(i)),r}get isBetaOrg(){var e,t;let r=!1;const n=(null===(e=this._properties)||void 0===e?void 0:e.betaOrgs)||[],i=null===(t=this._portalSelf)||void 0===t?void 0:t.id;return n.length&&i&&(r=n.includes(i)),r}get environment(){return(0,a.G)(this._portalUrl)}get userRequestOptions(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}}get requestOptions(){let e={portal:this.sharingApiUrl};return this.isAuthenticated&&(e={authentication:this._authentication,portal:this.sharingApiUrl}),e}get hubRequestOptions(){return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl,portal:this.sharingApiUrl}}get portalUrl(){return this.isAuthenticated?this.isPortal||!this._portalSelf.urlKey?`https://${this._portalSelf.portalHostname}`:`https://${this._portalSelf.urlKey}.${this._portalSelf.customBaseUrl}`:this._portalUrl}get hubHomeUrl(){if(this.isPortal)return`${this.portalUrl}${d}/#/${p}`;if(this.isAuthenticated){const e=this._hubUrl.replace("https://","");return`https://${this._portalSelf.urlKey}.${e}`}return this._hubUrl}get hubLicense(){return this.isPortal?"enterprise-sites":this.hubEnabled?"hub-premium":"hub-basic"}get serviceStatus(){return this._serviceStatus}get sharingApiUrl(){return`${this.portalUrl}/sharing/rest`}get hubUrl(){return this._hubUrl}get isPortal(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")}get discussionsServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/discussions/v1`}get hubSearchServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/v3/datasets`}get domainServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/v3/domains`}get ogcApiUrl(){if(this._hubUrl)return`${this._hubUrl.replace("hub","opendata")}/api/search/v1`}get eventsConfig(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.events")}get hubEnabled(){return(0,o.t)(this._portalSelf,"portalProperties.hub.enabled",!1)}get communityOrgId(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")}get enterpriseOrgId(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.enterpriseOrg.orgId")}get communityOrgHostname(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")}get communityOrgUrl(){if(this.communityOrgHostname)return`https://${this.communityOrgHostname}`}get helperServices(){if(this._portalSelf)return this._portalSelf.helperServices}get currentUser(){return this._currentUser}get portal(){return this._portalSelf}get portalSettings(){return this._portalSettings}get properties(){return this._properties}get trustedOrgIds(){return this._trustedOrgIds}get trustedOrgs(){return this._trustedOrgs}get isCommunityOrg(){let e=!1;return this._portalSelf&&(e="community"===(0,s.W)(this._portalSelf,"portalProperties.hub.settings.orgType")),e}get isOrgAdmin(){const{_currentUser:e}=this;let t=!1;return e&&(t="org_admin"===e.role&&!e.roleId),t}get userResourceTokens(){return this._userResourceTokens}get userHubSettings(){return this._userHubSettings}get orgThumbnailUrl(){var e;return(0,l.S)(this.portal,null===(e=this.session)||void 0===e?void 0:e.token)}get survey123Url(){var e;return`https://survey123${null!==(e={qaext:"qa",devext:"dev"}[this.environment])&&void 0!==e?e:""}.arcgis.com`}tokenFor(e){const t=this._userResourceTokens.find((t=>t.app===e));if(t)return t.token}refreshUser(){const e={authentication:this.session,portal:this.sharingApiUrl,username:this.session.username};return(0,n.PR)(e).then((e=>{this._currentUser=e}))}get history(){return this._userHubSettings.history||{entries:[]}}get resourceGroupIDs(){return h[this.environment]}checkPermission(e,t){return(0,u.P)(e,this,t)}async addToHistory(e){if(!this.isAuthenticated)return;if(!this.checkPermission("hub:feature:history").access)return;const t=(0,i.j)(e,this.history);return this._userHubSettings.history=t,this.updateUserHubSettings(this._userHubSettings)}async clearHistory(){if(this.isAuthenticated&&this.checkPermission("hub:feature:history").access)return this._userHubSettings.history={entries:[]},this.updateUserHubSettings(this._userHubSettings)}async removeFromHistory(e){if(!this.isAuthenticated)return;if(!this.checkPermission("hub:feature:history").access)return;const t=(0,i.g)(e,this.history);return this._userHubSettings.history=t,this.updateUserHubSettings(this._userHubSettings)}async updateUserHubSettings(e){if(!this._authentication)throw new Error("Cannot update user hub settings without an authenticated user");await(0,c.zL)(e,this,!0),this._userHubSettings=e,Object.keys((0,o.t)(e,"features",{}
2)).forEach((t=>{const r=(0,s.W)(e,`features.${t}`);this._featureFlags[`hub:feature:${t}`]=r}))}}},127981:(e,t,r)=>{"use strict";r.d(t,{SF:()=>w,c0:()=>E,kl:()=>T,wO:()=>I});var n=r(170209),i=r(348753),s=r(336253),o=r(20837),a=r(974195),c=r(554799),u=r(507707),l=r(275261),d=r(285581),p=r(788052),h=r(323379),m=r(264263),f=r(518944),g=r(984177),y=r(48714);const b=["portalUrl","serviceStatus","featureFlags","properties","resourceConfigs","trustedOrgIds","trustedOrgs"],v=["resourceTokens","portal","currentUser","portalSettings"];class w{constructor(e){this._portalUrl="https://www.arcgis.com",this._properties={},this._featureFlags={},this._trustedOrgIds=[],this._trustedOrgs=[],this._resourceConfigs=[],this._userResourceTokens=[],this.id=(new Date).getTime(),c.Y.debug(`ArcGISContextManager:ctor: Creating ${this.id}`),e.properties&&(this._properties=e.properties),this._properties.alphaOrgs||(this._properties.alphaOrgs=[...I]),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest",""),this._hubUrl=(0,o.G)(this._portalUrl)):e.portalUrl?(this._portalUrl=e.portalUrl,this._hubUrl=(0,o.G)(this._portalUrl)):this._hubUrl=(0,o.G)(this._portalUrl),e.portal&&(this._portal=(0,u.kI)(e.portal)),e.portalSettings&&(this._portalSettings=(0,u.kI)(e.portalSettings)),e.currentUser&&(this._currentUser=(0,u.kI)(e.currentUser)),e.serviceStatus&&(this._serviceStatus=e.serviceStatus),e.featureFlags&&(this._featureFlags=(0,u.kI)(e.featureFlags)),e.serviceFlags&&(this._serviceFlags=(0,u.kI)(e.serviceFlags)),e.trustedOrgIds&&(this._trustedOrgIds=(0,u.kI)(e.trustedOrgIds)),e.trustedOrgs&&(this._trustedOrgs=(0,u.kI)(e.trustedOrgs)),e.resourceConfigs&&(this._resourceConfigs=(0,u.kI)(e.resourceConfigs)),e.resourceTokens&&(this._userResourceTokens=(0,u.kI)(e.resourceTokens)),e.userHubSettings&&(this._userHubSettings=(0,u.kI)(e.userHubSettings))}static async create(e={}){const t=new w(e);return await t.initialize(),t}static async deserialize(e){const t=(0,l.z)(e),r=JSON.parse(t);let n={};if(b.forEach((e=>{n=(0,u.fE)(e,(0,m.W)(r,e),n)})),r.session){const e=i.$l.deserialize(r.session);e.tokenExpires.getTime()>Date.now()&&(v.forEach((e=>{n=(0,u.fE)(e,(0,m.W)(r,e),n)})),n.authentication=e)}return w.create(n)}serialize(){let e={};return b.forEach((t=>{e=(0,u.fE)(t,(0,m.W)(this,`_${t}`),e)})),this._authentication&&(e.session=this._authentication.serialize(),v.forEach((t=>{e=(0,u.fE)(t,(0,m.W)(this,`_${t}`),e)}))),(0,l.J)(JSON.stringify(e))}async setAuthentication(e){this._authentication=e,this._portalUrl=e.portal.replace("/sharing/rest",""),await this.initialize()}setProperties(e){this._properties=e,this._context=new s.Mq(this.contextOpts)}clearAuthentication(){this._context.isPortal||(this._portalUrl=(0,a.D)(this._portalUrl)),this._authentication=null,this._portal=null,this._currentUser=null,this._userResourceTokens=[],this._context=new s.Mq(this.contextOpts)}get context(){return this._context}async updateUserHubSettings(e){if(!this._authentication)throw new Error("Cannot update user hub settings without an authenticated user");await(0,p.zL)(e,this.context,!0),this._userHubSettings=e,Object.keys((0,f.t)(e,"features",{})).forEach((t=>{const r=(0,m.W)(e,`features.${t}`);this._featureFlags[`hub:feature:${t}`]=r})),this._context=new s.Mq(this.contextOpts)}async initialize(){const e=[],t=[];if(this._serviceStatus||(e.push(async function(e){let t=E;return(0,y.e)(e)&&(t=T),Promise.resolve(t)}(this._portalUrl)),t.push("serviceStatus")),this._authentication){const r=await this._authentication.getToken(this._authentication.portal);if(this._portal||(e.push(async function(e){const t=await(0,n.AW)({authentication:e}),r=await S(t.id,e);return t.limits=r,t}(this._authentication)),t.push("portal")),!this._portalSettings){const r=(0,d.D)(n.HZ,{});e.push(r("self",{authentication:this._authentication})),t.push("portalSettings")}if(this._portal&&!this._portal.limits&&(e.push(S(this._portal.id,this._authentication)),t.push("portalLimits")),!this._currentUser){const r=this._authentication.username;e.push((0,n.PR)({username:r,authentication:this._authentication})),t.push("user")}this._trustedOrgs.length||(e.push(async function(e,t){const r=(0,d.D)(i.WY,{trustedOrgs:[]});return(await r(`${e}/sharing/rest/portals/self/trustedOrgs?f=json`,{params:{token:t.token}})).trustedOrgs}(this._portalUrl,this._authentication)),t.push("trustedOrgs")),!this._userResourceTokens.length&&this._resourceConfigs.length&&(e.push(async function(e,t,r){const n=(0,d.D)(i.Ov,null),s=e.map((e=>n(t,e.clientId,r).then((t=>{if(t)return Object.assign(Object.assign({},e),{token:t})}))));return(await Promise.all(s)).filter((e=>!!e))}(this._resourceConfigs,r,this._portalUrl+"/sharing/rest")),t.push("tokens")),this._userResourceTokens.push({app:"self",token:r,clientId:this._authentication.clientId||"self"})}let r;try{r=await Promise.all(e)}catch(e){const t=`ArcGISContextManager failed while initializing for "${this._authentication.username}" using ${this._authentication.portal}.`;throw c.Y.error(t),console.error(t),e}t.forEach(((e,t)=>{const n=r[t];switch(e){case"portal":this._portal=n;break;case"portalSettings":this._portalSettings=n;break;case"portalLimits":this._portal.limits=n;break;case"user":this._currentUser=n;break;case"trustedOrgs":this._trustedOrgs=n,this._trustedOrgIds=this._trustedOrgs.map((e=>e.to.orgId));break;case"tokens":this._userResourceTokens=[...this._userResourceTokens,...n];break;case"serviceStatus":const e=n;
2this._serviceFlags&&Object.keys(this._serviceFlags).forEach((t=>{e[t]&&(e[t]=this._serviceFlags[t])})),this._serviceStatus=e}}));const o=this._userResourceTokens.find((e=>"hubforarcgis"===e.app));this._authentication&&o&&(this._userHubSettings=await(0,h.Z)(this._authentication.username,this._portalUrl,o.token),Object.keys((0,f.t)(this._userHubSettings,"features",{})).forEach((e=>{const t=(0,m.W)(this._userHubSettings,`features.${e}`);this._featureFlags[`hub:feature:${e}`]=t}))),c.Y.debug(`ArcGISContextManager-${this.id}: updating context`),this._context=new s.Mq(this.contextOpts)}get contextOpts(){const e=["hubUrl",...b];let t={id:this.id,portalUrl:this._portalUrl};return e.forEach((e=>{t=(0,u.fE)(e,(0,m.W)(this,`_${e}`),t)})),this._authentication&&(["currentUser","userResourceTokens","userHubSettings","portalSettings"].forEach((e=>{t=(0,u.fE)(e,(0,m.W)(this,`_${e}`),t)})),t.authentication=this._authentication),t.portalSelf=this._portal,t}}async function S(e,t){return(await Promise.all([{type:"Groups",name:"MaxNumUserGroups",fallback:512}].map((async r=>{try{return await(0,g.w)(e,r.type,r.name,{authentication:t,portal:t.portal})}catch(e){return{type:r.type,name:r.name,limitValue:r.fallback}}})))).reduce(((e,t)=>(e[t.name]=t.limitValue,e)),{})}const E={portal:"online",discussions:"online",events:"online",metrics:"online",notifications:"online","hub-search":"online",domains:"online","hub-downloads":"online","hub-ai-assistant":"online"},T={portal:"online",discussions:"not-available",events:"not-available",metrics:"not-available",notifications:"not-available","hub-search":"not-available",domains:"not-available","hub-downloads":"not-available","hub-ai-assistant":"not-available"},I=["CrA5hYOKgL3Vwan8","zj227gjeSqEyG4HF","bkrWlSKcjUDFDtgw","vIu5NCxQFilhVymO","97KLIFOSt5CxbiRI","MiFBHFxEZWumnKCx","8HRYeOqprj872mxP","Xj56SBi2udA78cC9","uFEMdY4VMonzH8sG","LjjARY1mkhxulWPq","q2ikdtW0bkt5EgtQ","yHYVvboBBOdmcKci"]},841741:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(518944),i=r(66647);class s extends i.Z{constructor(e,t,r){super(e,t=t||"UNKNOWN_ERROR",r=(0,n.t)(r,"rootCause",r)),this.name="HubError",this.stack=(0,n.t)(r,"stack",(new Error).stack)}}},66647:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(518944);class i extends Error{constructor(e,t,r){t=t||"UNKNOWN_ERROR",r=(0,n.t)(r,"rootCause",r),super(t),this.operation=e,this.name="OperationError",this.rootCause=r,Object.setPrototypeOf(this,i.prototype),this.stack=(0,n.t)(r,"stack",(new Error).stack)}}},615503:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(507707),i=r(518944);class s{constructor(){this.operations=[]}startOperation(e){const t=(0,n.kI)(e);t.startedAt=(new Date).getTime(),t.state="working",this.operations.push(t)}start(e,t){const r={type:e,id:(0,i.t)(t,"id",(0,n.Mc)(`${e}_`)),inputs:(0,i.t)(t,"inputs",{}),cleanup:(0,i.t)(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(r),r.id}getOperation(e){return this.operations.find((t=>t.id===e))}getOperations(){return this.operations}finish(e,t){const 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=(0,n.kI)(t))}merge(e){this.operations=[...this.operations,...e.operations]}getCompleted(){return(0,n.kI)(this.operations.filter((e=>"completed"===e.state)))}getWorking(){return(0,n.kI)(this.operations.filter((e=>"working"===e.state)))}toString(){return this.operations.sort(((e,t)=>e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0)).map(o).join("\n")}serialize(){return{operations:(0,n.kI)(this.getOperations())}}}function o(e){let t=`${e.startedAt} : Operation ${e.id} started with inputs ${JSON.stringify(e.inputs)} but was not completed`;return"completed"===e.state&&(t=`${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}},894952:(e,t,r)=>{"use strict";r.d(t,{ol:()=>l,F5:()=>a,J2:()=>u,hZ:()=>p,Af:()=>d,Lb:()=>o});var n=r(264263),i=r(507707),s=r(72090);function o(e){const{privileges:t=[]}=e;return(0,s.q)(t,"portal:user:createItem")}function a(e,t){let r=!1;if(o(t)){const s=e.initiative?(0,n.W)(e,"initiative.item.properties.collaborationGroupId"):(0,n.W)(e,"site.properties.collaborationGroupId"),{groups:o=[]}=t;r=!!s&&!!(0,i.zP)(o,"id",s)}return r}var c=r(709638);function u(e,t){let r=!1;const{itemControl:i,owner:a,orgId:u}=e,{roleId:l,role:d,username:p,groups:h,orgId:m}=t,f=(0,s.q)(["admin","update"],i)||!!a&&a===p||!(!u||u!==m)&&!l&&"org_admin"===d,g=o(t);if(g&&f)r=!0;else if(g){const t=[...(0,n.W)(e,"groupIds")||[],(0,n.W)(e,"properties.collaborationGroupId")],i=e=>(0,c.A)(e)&&(0,s.q)(t,e.id);r=h.some(i)}return r}const l=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function d(e,t){let r=!1;const i=(0,n.W)(e,"properties.isDefaultHubHome"),a=o(t);if(!i&&a)r=u(e,t);else if(a){const n=t.orgId,i=e.orgId;if(n&&n===i){const e=t.privileges||[];r=l.every((t=>(0,s.q)(e,t)))}}return r}function p(e,t){let r=!1;return!(0,n.W)(e,"properties.isDefaultHubHome")&&o(t)&&(r=u(e,t)),r}},641675:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(737720),i=r(670452);function s(e){return e&&e.hubApiUrl||(0,i.k)((0,n.i)(e))}},767263:(e,t,r)=>{"use strict";r.d(t,{g:()=>h,ZH:()=>j,Cq:()=>p,QF:()=>S,Z0:()=>_,G4:()=>U,cO:()=>D,cT:()=>A,h9:()=>P,Ts:()=>O,Um:()=>R,UQ:()=>j,$c:()=>N});var n=r(170209),i=r(264263),s=r(178491),o=r(841807),a=r(457530);const c={children:[],parents:["initiative"]},u={children:["project"],parents:[]},l=e=>{let t={children:[],parents:[]};switch(e){case"initiative":t=u;break;case"project":t=c;break;default:throw new Error(`getAssociationHierarchy: Invalid type for associations: ${e}.`)}return t},d=(e,t)=>{try{const r=l(e),n=l(t);return r.children.includes(t)?n.parents.includes(e):!!r.parents.includes(t)&&n.children.includes(e)}catch(e){return!1}},p=async(e,t,r,c)=>{const u=(0,o.Q)(e);if(!d(u,t))throw new Error(`breakAssociation: Association between ${u} and ${t} is not supported.`);if(l(u).children.includes(t)){const o=(0,i.W)(e,"associations.groupId"),{owner:a}=await(0,s.z)(t,r,c);try{await(0,n.lF)({id:r,groupId:o,authentication:c.session,owner:a})}catch(e){throw new Error(`breakAssociation: there was an error unsharing ${r} from ${o}: ${e}`)}}else e.typeKeywords=function(e,t,r){const n=`ref|${t}|${r}`;return e.filter((e=>e!==n))}(e.typeKeywords,t,r),await(0,a.T)(u,e,c)},h=50;var m=r(575374),f=r(958157),g=r(225684),y=r(568008);function b(e,t){return{targetEntity:"string"==typeof e?(0,y.x)(e):(0,y.x)(e[0]),filters:[Object.assign(Object.assign({},t.length&&{operation:"AND"}),{predicates:[Object.assign({type:e},t.length&&{id:t})]})]}}const v=(e,t)=>
2(0,i.W)(e,"typeKeywords").reduce(((e,r)=>{const n=t?`ref|${t}|`:"ref|";if(r.startsWith(n)){const t=r.split("|")[2];e.push(t)}return e}),[]),w=(e,t)=>e.reduce(((e,r)=>{const n=r.typeKeywords.find((e=>e.startsWith(`${t}|`)));if(n){const t=n.split("|")[1];e.push(t)}return e}),[]),S=async(e,t,r)=>{const s=(0,o.Q)(e);if(!d(s,t))throw new Error(`getAssociatedEntitiesQuery: Association between ${s} and ${t} is not supported.`);const a=l(s).children.includes(t),c=await(async(e,t,r,s)=>{if(r){if(!(0,i.W)(e,"associations"))return null;const r=(0,o.Q)(e),n=(0,g.o)((0,m.g)(t),`ref|${r}|${e.id}`),s=(0,i.W)(e,"associations.rules.query");return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t),l=c.filter((e=>u.includes(e))),d=(0,m.g)(t);return l.length?b(d,l):null}})(e,t,a,r);return c};var E=r(185744),T=r(853179);const I=async(e,t,r,s)=>{if(r){const r=(0,o.Q)(e),n=(0,g.o)((0,m.g)(t),`ref|${r}|${e.id}`),s=(0,T.O)((0,i.W)(e,"associations.rules.query"));return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t).filter((e=>!c.includes(e))),l=(0,m.g)(t);return u.length?b(l,u):null}},C=async(e,t,r,s)=>{if(r){const r=(0,o.Q)(e),n=(a=(0,m.g)(t),c=`ref|${r}|${e.id}`,{targetEntity:"string"==typeof a?(0,y.x)(a):(0,y.x)(a[0]),filters:[{operation:"AND",predicates:[{type:a,typekeywords:{not:[c]}}]}]}),s=(0,i.W)(e,"associations.rules.query");return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t),l=c.filter((e=>!u.includes(e))),d=(0,m.g)(t);return l.length?b(d,l):null}var a,c},A=async(e,t,r)=>{const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getPendingEntitiesQuery: Association between ${n} and ${t} is not supported.`);const i=l(n).children.includes(t);return i?await C(e,t,i,r):await I(e,t,i,r)},O=async(e,t,r)=>{const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getRequestingEntitiesQuery: Association between ${n} and ${t} is not supported.`);const i=l(n).children.includes(t);return i?await I(e,t,i,r):await C(e,t,i,r)},_=async(e,t,r)=>{let n;const i=(0,o.Q)(e);if(!d(i,t))throw new Error(`getAssociationStats: Association between ${i} and ${t} is not supported.`);const s=l(i).children.includes(t);n=Object.assign({associated:0,pending:0,requesting:0},s?{included:0}:{referenced:0});try{const i=await Promise.all([S(e,t,r),A(e,t,r),O(e,t,r)]),[{total:o},{total:a},{total:c}]=await Promise.all(i.map((async e=>{try{return await(0,E.B)(e,{requestOptions:r.hubRequestOptions})}catch(e){return{total:0}}})));n=Object.assign({associated:o,pending:a,requesting:c},s?{included:o+a}:{referenced:o+a})}catch(e){return n}return n},D=(e,t)=>{let r;const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getAvailableToRequestEntitiesQuery: Association between ${n} and ${t} is not supported.`);if(l(n).children.includes(t)){const n=b((0,m.g)(t),[]),s=(0,T.O)((0,i.W)(e,"associations.rules.query"));r=(0,f.W)([s,n])}else{const n=v(e,t);r=function(e,t){return{targetEntity:"string"==typeof e?(0,y.x)(e):(0,y.x)(e[0]),filters:[Object.assign(Object.assign({},t.length&&{operation:"AND"}),{predicates:[Object.assign({type:e},t.length&&{id:{not:t}})]})]}}((0,m.g)(t),n)}return r},P=(e,t)=>v(e,t);var k=r(437450),x=r(821413);async function R(e,t,r,n,i){const s=(0,o.Q)(r);if(!d(s,n))throw new Error(`getWellKnownAssociationsCatalog: Association between ${s} and ${n} is not supported.`);e=(0,x.YM)(e);const a=(0,y.x)(r.type),c=[(0,x.sd)(e,a,n)];let u;switch(t){case"associated":u=await S(r,n,i);break;case"pending":u=await A(r,n,i);break;case"requesting":u=await O(r,n,i);break;case"availableToRequest":u=D(r,n)}const l=(null==u?void 0:u.filters)?u.filters:[{predicates:[{type:["Code Attachment"]}]}];return(0,k.Y)(e,t,l,c,a)}const U=(e,t,r,n,i)=>{var s;const a=(0,o.Q)(t);if(!d(a,r))throw new Error(`getAvailableToRequestAssociationCatalogs: Association between ${a} and ${r} is not supported.`);e=(0,x.YM)(e);const c=null===(s=D(t,r))||void 0===s?void 0:s.filters;return(i||["myContent","favorites","organization","world"]).map((t=>{const i={user:n.currentUser,filters:c,collectionNames:[r],context:n};return(0,x.Sj)(e,t,"item",i)}
2)).filter(Boolean)};var M=r(94684);async function N(e,t,r){const n=(0,o.Q)(e),i=`${n}|${e.id}`;t.typeKeywords.includes(i)||(t.typeKeywords=[...t.typeKeywords,`${n}|${e.id}`]),await(0,a.T)("group",t,r);const s={groupId:t.id,rules:{schemaVersion:1,query:{targetEntity:"item",filters:[{predicates:[{group:t.id}]}]}}};return(0,M.t)("associations",s,e),await(0,a.T)(n,e,r)}const j=async(e,t,r,c)=>{const u=(0,o.Q)(e);if(!d(u,t))throw new Error(`requestAssociation: Association between ${u} and ${t} is not supported.`);if(l(u).children.includes(t)){const o=(0,i.W)(e,"associations.groupId"),{owner:a}=await(0,s.z)(t,r,c);try{await(0,n.Ju)({id:r,owner:a,groupId:o,authentication:c.session})}catch(e){const t=e;throw new Error(`requestAssociation: there was an error sharing ${r} to ${String(o)}: ${t}`)}}else e.typeKeywords=function(e,t,r){const n=`ref|${t}|${r}`;return e.includes(n)||(e=[...e,n]),e}(e.typeKeywords,t,r),await(0,a.T)(u,e,c)}},225684:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(568008);function i(e,t){return{targetEntity:"string"==typeof e?(0,n.x)(e):(0,n.x)(e[0]),filters:[{operation:"AND",predicates:[{type:e,typekeywords:[t]}]}]}}},773807:(e,t,r)=>{"use strict";r.d(t,{b:()=>f,f:()=>g});var n=r(320788);const{app:i,dataset:s,document:o,event:a,feedback:c,initiative:u,map:l,other:d,site:p}=n.collections,h=["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"],m=["Data"],f={app:i.concat(c),dataset:s,document:o,event:a,initiative:u,map:l,other:d,site:p,downloadableTypes:h,downloadableTypeKeywords:m,apiTypes:["Feature Service","Map Service","Image Service"]};function g(e){return-1!==h.indexOf(e.type)||e.typeKeywords&&m.some((t=>e.typeKeywords.some((e=>e===t))))}},208734:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(507707),i=r(211472),s=r(100586);class o{constructor(e,t){this.isDestroyed=!1,this.context=t,this.entity=e}static fromJson(e,t){const r=this.applyDefaults(e,t);return new o(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=o.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const{fetchHubChannel:n}=await Promise.resolve().then(r.bind(r,339168)),i=await n(e,t);return o.fromJson(i,t)}catch(e){throw new Error("Channel not found.")}}static applyDefaults(e,t){var r;return Object.assign(Object.assign({},(r=t.currentUser.orgId,{name:"",blockWords:[],allowAsAnonymous:!1,canEdit:!0,canDelete:!0,permissions:[(0,s.L)({category:i.RI.ORG,subCategory:i.B8.ADMIN,role:i.uU.OWNER,key:r})]})),e)}get canEdit(){return this.entity.canEdit}get canDelete(){return this.entity.canDelete}get orgId(){return this.entity.orgId}toJson(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");return(0,n.kI)(this.entity)}update(e){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");if(this.entity.id){const{updateHubChannel:e}=await Promise.resolve().then(r.bind(r,170036));this.entity=await e(this.entity,this.context)}else{const{createHubChannel:e}=await Promise.resolve().then(r.bind(r,170036));this.entity=await e(this.entity,this.context)}}async delete(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");const{deleteHubChannel:e}=await Promise.resolve().then(r.bind(r,170036));this.isDestroyed=!0,await e(this.entity.id,this.context)}convertToCardModel(e){throw new Error("not implemented")}async getEditorConfig(e,t){const{getEditorConfig:n}=await Promise.resolve().then(r.bind(r,2166));return n(e,t,this.entity,this.context)}async toEditor(e,t){const{transformEntityToEditor:n}=await r.e(60240).then(r.bind(r,360240));return n(this.entity,this.context)}async fromEditor(e){const{transformEditorToEntity:t}=await r.e(76214).then(r.bind(r,176214));return this.entity=Object.assign(Object.assign({},this.entity),t(e)),await this.save(),this.entity}}},43416:(e,t,r)=>{"use strict";r.d(t,{VM:()=>i,bE:()=>n,qG:()=>s});const n="hub:channel:none",i={channelRoot:"hub:channel",channelCreate:"hub:channel:create",channelDelete:"hub:channel:delete",channelEdit:"hub:channel:edit",channelView:"hub:channel:view",channelOwner:"hub:channel:owner",channelManage:"hub:channel:manage",channelRead:"hub:channel:read",channelWrite:"hub:channel:write",channelReadWrite:"hub:channel:readWrite",channelModerate:"hub:channel:moderate"},s=[{permission:i.channelCreate,dependencies:["hub:discussion"],authenticated:!0,privileges:["portal:user:createItem"],licenses:["hub-premium"]}]},281646:(e,t,r)=>{"use strict";r.d(t,{ChannelSchema:()=>s,J:()=>i});var n=r(43416);
2const i=["hub:channel:create","hub:channel:edit"],s={type:"object",properties:{name:{type:"string"},blockWords:{type:"string",format:"blockWords"},publicConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{anonymous:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead],default:n.bE},id:{type:"string"}}},authenticated:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelWrite,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}}}}}}},orgConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelWrite,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[n.VM.channelOwner],default:n.VM.channelOwner},id:{type:"string"}}}}}}}},groupConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelWrite,n.VM.channelReadWrite,n.VM.channelModerate,n.VM.channelManage,n.VM.channelOwner],default:n.bE},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelWrite,n.VM.channelReadWrite,n.VM.channelModerate,n.VM.channelManage,n.VM.channelOwner],default:n.bE},id:{type:"string"}}}}}}}},userConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{user:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}}}}}}},allowAsAnonymous:{type:"boolean",default:!1}},required:["name"]}},100586:(e,t,r)=>{"use strict";r.d(t,{L:()=>a});var n=r(252892),i=r(43416),s=r(211472);const o={[s.uU.READ]:i.VM.channelRead,[s.uU.WRITE]:i.VM.channelWrite,[s.uU.READWRITE]:i.VM.channelReadWrite,[s.uU.MODERATE]:i.VM.channelModerate,[s.uU.MANAGE]:i.VM.channelManage,[s.uU.OWNER]:i.VM.channelOwner},a=e=>{const t=o[e.role];let r;return r=e.category===s.RI.ANONYMOUS_USER?n.C.anonymous:e.category===s.RI.AUTHENTICATED_USER?n.C.authenticated:e.category===s.RI.GROUP?e.subCategory===s.B8.ADMIN?n.C.groupAdmin:n.C.group:e.category===s.RI.ORG?e.subCategory===s.B8.ADMIN?n.C.orgAdmin:n.C.org:n.C.user,{permission:t,collaborationId:e.key||null,collaborationType:r,id:e.id||null}}},655685:(e,t,r)=>{"use strict";r.d(t,{M:()=>a});var n=r(275929),i=r(29576),s=r(100586),o=r(822409);function a(e,t){return{access:(0,o.KX)(e),id:e.id,name:e.name,createdDate:new Date(e.createdAt),createdDateSource:"channel.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"channel.updatedAt",type:"Channel",source:e.creator,links:{thumbnail:null,self:null,siteRelative:null,siteRelativeEntityType:null,workspaceRelative:null,layoutRelative:null},blockWords:e.blockWords,permissions:e.channelAcl.map((e=>(0,s.L)(e))),allowAsAnonymous:e.allowAsAnonymous,canEdit:(0,n.x)(e,t,e),canDelete:(0,i.T)(e,t),orgId:e.orgId,owner:e.creator,channel:e,typeKeywords:[],thumbnail:void 0,view:void 0,description:void 0,location:void 0,tags:[]}}},170036:(e,t,r)=>{"use strict";r.d(t,{createHubChannel:()=>d,deleteHubChannel:()=>h,updateHubChannel:()=>p});var n=r(710705),i=r(655685),s=r(211472),o=r(252892),a=r(43416);const c={[a.VM.channelRead]:s.uU.READ,[a.VM.channelWrite]:s.uU.WRITE,[a.VM.channelReadWrite]:s.uU.READWRITE,[a.VM.channelManage]:s.uU.MANAGE,[a.VM.channelModerate]:s.uU.MODERATE,[a.VM.channelOwner]:s.uU.OWNER},u={[o.C.anonymous]:{category:s.RI.ANONYMOUS_USER,subCategory:null},[o.C.authenticated]:{category:s.RI.AUTHENTICATED_USER,subCategory:null},[o.C.group]:{category:s.RI.GROUP,subCategory:s.B8.MEMBER},[o.C.groupAdmin]:{category:s.RI.GROUP,subCategory:s.B8.ADMIN},[o.C.org]:{category:s.RI.ORG,subCategory:s.B8.MEMBER},[o.C.orgAdmin]:{category:s.RI.ORG,subCategory:s.B8.ADMIN},[o.C.owner]:{category:s.RI.USER,subCategory:null},[o.C.user]:{category:s.RI.USER,subCategory:null}};function l(e){return{name:e.name,blockWords:e.blockWords,allowAsAnonymous:e.allowAsAnonymous,channelAclDefinition:e.permissions.reduce((function(e,t){const r=u[t.collaborationType];return r?[...e,Object.assign(Object.assign({},r),{key:t.collaborationId||null,role:c[t.permission]})]:e}),[])}}async function d(e,t){const r=l(e),s=await(0,n.Ww)(Object.assign({data:r},t.hubRequestOptions));return(0,i.M)(s,t.currentUser)}async function p(e,t){const r=l(e),s=await(0,n.BP)(Object.assign({channelId:e.id,data:r},t.hubRequestOptions));return(0,i.M)(s,t.currentUser)}async function h(e,t){await(0,n.sD)(Object.assign({channelId:e},t.hubRequestOptions))}},339168:(e,t,r)=>{"use strict";r.d(t,{fetchHubChannel:()=>o});var n=r(211472),i=r(710705),s=r(655685);async function o(e,t){const r=await(0,i.fA)(Object.assign({channelId:e,data:{relations:[n.Uz.CHANNEL_ACL]}},t.hubRequestOptions));return(0,s.M)(r,t.currentUser)}},44644:(e,t,r)=>{"use strict";r.d(t,{Pw:()=>i.createHubChannel,Uq:()=>i.deleteHubChannel,cy:()=>s.fetchHubChannel,lM:()=>n.l,vL:()=>i.updateHubChannel});var n=r(208734),i=r(170036),s=r(339168)},320788:(e,t,r)=>{"use strict";r.d(t,{_:()=>n,collections:()=>s,o:()=>i});const n=e=>{if(!e)return;const t=e.toLocaleLowerCase();return Object.keys(s).find((e=>s[e].some((e=>e.toLocaleLowerCase()===t))))},i=e=>{if(!e)return;const t=e.toLocaleLowerCase();return s[t]},s={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","3DTiles Package","3DTiles Service","API Key","Activity","Addin Package","Administrative Report","AllSource Project","Analysis Model","Apache Parquet","App Bundle","AppBuilder Extension","AppBuilder Widget Package","Application Configuration","Application SDK","ArcGIS Pro Add In","ArcGIS Pro Configuration","ArcPad Package","Arcade Module","Basemap Package","Big Data Analytic","Big Data File Share","Code Attachment","Code Sample","Color Set","Compact Tile Package","Content Category Set","Data Package Collection","Data Pipeline","Data Store","Deep Learning Package","Deep Learning Studio Project","Desktop Add In","Desktop Application","Desktop Application Template","Desktop Style","Earth Configuration","Esri Classification Schema","Esri Classifier Definition","Excalibur Imagery Project","Experience Builder Widget","Experience Builder Widget Package","Explorer Add In","Explorer Layer","
2Explorer Map","Export Package","Featured Items","Feed","GML","GeoBIM Application","GeoBIM Project","GeoPackage","Geocoding Service","Geodata Service","Geoenrichment Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Globe Document","Globe Service","Group Layer","IPS Configuration","Indoors Map Configuration","Insights Data Engineering Model","Insights Data Engineering Workbook","Insights Model","Insights Script","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Knowledge Graph","Knowledge Graph Layer","Knowledge Graph Web Investigation","Knowledge Studio Project","Layer","Layer File","Layer Package","Layer Template","Layout","Legend","Living Atlas Export Package","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Media Layer","Mission","Mission Report","Mission Template","Mobile Application","Mobile Basemap Package","Mobile Map Package","Mobile Scene Package","Native Application","Native Application Installer","Native Application Template","Network Analysis Service","Notebook Code Snippet Library","Notebook Code Snippets","OGCFeatureServer","Operations Dashboard Add In","Operations Dashboard Extension","Oriented Imagery Catalog","Ortho Mapping Project","Ortho Mapping Template","Pro Presentation","Pro Project","Pro Report","Pro Report Template","Project Package","Project Template","Published Map","QuickCapture Project","Raster Function Template","Real Time Analytic","Reality Mapping Project","Reality Studio Project","Relational Database Connection","Replication Package","Rule Package","SMX Item","SMX Map","SMX Theme","SQLite Geodatabase","Scene Document","Scene Package","Scene Package Part","Server","Service Definition","Statistical Data Collection","StoryMap Theme","Style","Suitability Model","Survey123 Add In","Symbol Service","Symbol Set","Task File","Tile Package","Urban Project","User License Type Extension","Vector Tile Package","Video Service","Viewer Configuration","Visio Document","WCS","Web AppBuilder Widget","Web Experience Template","Web Link Chart","Windows Mobile Package","Windows Viewer Add In","Workflow","Workflow Manager Package","Workflow Manager Service","Workforce Project","netCDF"],site:["Hub Site Application","Site Application"]}},923060:(e,t,r)=>{"use strict";r.d(t,{Q:()=>f});var n=r(110571),i=r(2166),s=r(507707),o=r(443011),a=r(358637),c=r(195009),u=r(789565),l=r(264263),d=r(29784),p=r(890109),h=r(706833),m=r(921359);class f extends n.x{constructor(e,t){super(e,t)}static fromJson(e,t){return new f(e,t)}async save(){this._checkDestroyed();const{createContent:e,updateContent:t}=await Promise.resolve().then(r.bind(r,443011));this.entity.id?this.entity=await t(this.entity,this.context.hubRequestOptions):this.entity=await e(this.entity,this.context.hubRequestOptions),await super.afterSave()}update(e){this._checkDestroyed(),this.entity=Object.assign(Object.assign({},this.entity),e)}async delete(){this._checkDestroyed(),this.isDestroyed=!0;const{deleteContent:e}=await Promise.resolve().then(r.bind(r,443011));await e(this.entity.id,this.context.hubRequestOptions)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,a.t)((0,s.kI)(this.entity),t,this.context.hubRequestOptions):(0,s.kI)(this.entity);return(0,c.k)(this.entity)&&(r.downloadFormats=function(e){
3const t=(0,d.g)(e),r=t.flowType;let n=t.formats;!r&&["Feature Service","Map Service"].includes(e.type)&&(n=(0,h.i)().map((e=>({key:e.format,hidden:!1})))),(0,u.E8)(e)&&"createReplica"!==r&&(n=(0,p.z)(e).map((e=>({key:e.format,hidden:!1}))));const i=(0,l.W)(e,"extendedProps.additionalResources")||[];return n.map((e=>{return(0,m.B)(e)?function(e,t){const r=(0,m.X)(e),{name:n,isDataSource:i}=t[r];let s;return s=n?`{{shared.fields.download.additionalResource|resourceName=${encodeURIComponent(n)}:translate}}`:i?"{{shared.fields.download.dataSourceResource:translate}}":"{{shared.fields.download.noTitleResource:translate}}",Object.assign({label:s},e)}(e,i):(t=e,Object.assign({label:`{{shared.fields.download.format.${t.key}:translate}}`},t));var t}))}(this.entity)),r}async fromEditor(e){var t,r;const n=!e.id;if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const i=(0,o.B)(e,this.context.portal);if(i.extent=null!==(r=null===(t=e.location)||void 0===t?void 0:t.extent)&&void 0!==r?r:[],n)throw new Error("Cannot create content using the Editor.");return this.entity=i,await this.save(),this.entity}_checkDestroyed(){if(this.isDestroyed)throw new Error("HubContent is already destroyed.")}}},370632:(e,t,r)=>{"use strict";r.d(t,{ContentSchema:()=>s,E:()=>i});var n=r(181794);
3const i=["hub:content:edit","hub:content:settings","hub:content:settings:discussions","hub:content:settings:discussions:compact"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{licenseInfo:{type:"string"},serverExtractCapability:{type:"boolean",enum:[!0,!1]},schedule:{type:"object"},_forceUpdate:{type:"array",items:{type:"boolean",enum:[!0]}},downloadFormats:{type:"array",items:{type:"object"}}})})},248785:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)();return e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"licenseInfo",storeKey:"item.licenseInfo"}),e.push({entityKey:"size",storeKey:"item.size"}),e}},371740:(e,t,r)=>{"use strict";r.d(t,{Fs:()=>I,HH:()=>b,OA:()=>F,P7:()=>_,RN:()=>O,Ux:()=>C,VQ:()=>A,ZY:()=>v,bC:()=>w,bV:()=>N,eI:()=>j,iP:()=>f,jA:()=>g,kd:()=>$,oR:()=>Y,pv:()=>J,r9:()=>S,rL:()=>D,u9:()=>U});var n=r(958328),i=r(185717),s=r(174564),o=r(704059),a=r(264263),c=r(403555),u=r(153105),l=r(665975),d=r(197928),p=r(641675),h=r(559573);const m={devext:"dev",qaext:"qa",production:""},f=e=>{var t;const r=e.extent,n=(0,s.pi)(r),i=(null===(t=e.properties)||void 0===t?void 0:t.boundary)||(n?"item":void 0),o={geometry:null,provenance:i};if("item"===i&&n){const e=(0,s.Vu)(r),t=(0,s.Dz)(e);o.center=[t.x,t.y],o.geometry=Object.assign(Object.assign({},(0,s.vP)(e)),{type:"polygon"}),o.spatialReference=o.geometry.spatialReference}return o},g=e=>{const{properties:t,extent:r}=e,n=null==t?void 0:t.location;if(n)return n;if("none"===(null==t?void 0:t.boundary))return{type:"none"};const i=(e=>(0,s.pi)(e)?Object.assign(Object.assign({},(0,s.Vu)(e)),{type:"extent"}):void 0)(r);if(i)return{type:(0,h.Z6)(e.type)?"org":"custom",extent:r,geometries:[i],spatialReference:i.spatialReference};try{const t=(0,s.Uf)(r),n={wkid:4326},i=Object.assign(Object.assign({type:"polygon"},(0,d.O)(r)),{spatialReference:(0,s.nc)(t)?n:_(e)||n});return{type:"custom",extent:t,geometries:[i],spatialReference:i.spatialReference}}catch(e){return{type:"none"}}},y=e=>e&&e.isPortal,b=(e,t)=>!!e&&"public"===e.access&&!y(t),v=(e,t)=>!y(t)&&"public"===e.access&&"CSV"===e.type&&e.size<=5e6,w=(e,t,r)=>{let n=E(e,t,r)||T(e,t,r);const i=(0,o._)(e);if(!n){const s=["app","dataset","document","map","template","project","initiative","discussion","event"];let o="/content";"feedback"===i?o=t?"/feedback/surveys":"":S(e,r)?o="/pages":s.indexOf(i)>-1&&(o=`/${i}s`),n=t?`${o}/${t}`:`${o}`}return t||["initiative","project"].includes(i)||(n=""),n},S=(e,t=[])=>["Hub Page","Site Page"].includes(e)||t.includes("hubPage"),E=(e,t,r)=>{let n;return"Solution"===e?n=(null==r?void 0:r.indexOf("Deployed"))>-1?`/content/${t}/about`:`/templates/${t}/about`:"Web Mapping Application"===e&&(null==r?void 0:r.indexOf("hubSolutionTemplate"))>-1&&(n=`/templates/${t}/about`),n},T=(e,t,r)=>{if("Hub Initiative"===e&&(null==r?void 0:r.indexOf("hubInitiativeTemplate"))>-1||"Hub Initiative Template"===e)return`/initiatives/templates/${t}/about`};function I(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 C(e,t){const r=I(t);return r&&(0,a.W)(e,r)}var A;function O(e){let t,r;if(/^\d{4}$/.test(e=`${e}`))t=new Date(+e,0,1),r=A.Year;else if(/^\d{4}-\d{1,2}$/.test(e)){const n=e.split("-");t=new Date(+n[0],+n[1]-1,1),r=A.Month}else if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)){const n=e.split("-");t=new Date(+n[0],+n[1]-1,+n[2]),r=A.Day}else Number.isNaN(Date.parse(e))||(t=new Date(e),r=e.includes("T")?A.Time:A.Day);return t&&r&&{date:t,precision:r}}!function(e){e.Year="year",e.Month="month",e.Day="day",e.Time="time"}(A||(A={}));const _=e=>{const t=e.spatialReference;if(!t||"object"==typeof t)return t;const r=parseInt(t+"",10);return isNaN(r)?null:{wkid:r}},D=(e,t,r)=>{const n=P(t);return n&&n.map((t=>({name:t.orName,url:R(t,e,r),isDataSource:x(t,e)})))},P=e=>{const t=[];
3return k((0,a.W)(e,"metadata.distInfo")||[]).forEach((e=>{k(e.distTranOps||[]).forEach((e=>{k(e.onLineSrc||[]).forEach((e=>{t.push(e)}))}))})),t.length?t:null},k=e=>Array.isArray(e)?e:[e],x=(e,t)=>{const r=t.url&&(0,n.pW)(t.url);return r&&e.linkage&&e.linkage.includes(r)},R=(e,t,r)=>{let n=e.linkage;const i=(0,a.W)(r,"authentication.token");if(i&&x(e,t)){const t=new URL(e.linkage),r=new URLSearchParams(t.search);r.set("token",i),t.search=r.toString(),n=t.toString()}return n},U=(e,t,r)=>{const n=(0,s.pi)(e.extent)?e.extent:void 0,i=(0,s.pi)(null==t?void 0:t.coordinates)?t.coordinates:void 0,o=4326===(0,a.W)(r,"extent.spatialReference.wkid")?(0,s.c5)(r.extent):void 0;return n||i||o},M=(e,t)=>{const r=(0,a.W)(e,t)||{},{rpIndName:n,rpOrgName:i}=Array.isArray(r)?r[0]:r;return{individualName:n,organizationName:i}},N=(e,t)=>e.orgId||(null==t?void 0:t.orgId),j=(e,t,r,n)=>{const s={nameSource:i.y.None,organizationSource:i.y.None},o=M(t,"metadata.dataIdInfo.idCitation.citRespParty"),c=M(t,"metadata.dataIdInfo.idPoC"),u=M(t,"metadata.mdContact"),l=(0,a.W)(n,"fullName");o.individualName?(s.name=o.individualName,s.nameSource=i.y.CitationContact):c.individualName?(s.name=c.individualName,s.nameSource=i.y.ResourceContact):u.individualName?(s.name=u.individualName,s.nameSource=i.y.MetadataContact):l&&(s.name=l,s.username=n.username,s.nameSource=i.y.ItemOwner);const d=(0,a.W)(r,"name");return o.organizationName?(s.organization=o.organizationName,s.organizationSource=i.y.CitationContact):c.organizationName?(s.organization=c.organizationName,s.organizationSource=i.y.ResourceContact):u.organizationName?(s.organization=u.organizationName,s.organizationSource=i.y.MetadataContact):d&&(s.organization=d,s.orgId=N(e,n),s.organizationSource=i.y.ItemOwner),s.isExternal=s.organizationSource===i.y.None&&"public"!==e.access,s},$=e=>e.reduce(((e,t)=>{const r=t.split("/"),n=r[r.length-1];return n&&e.push(n),e}),[]),F=(e,t)=>{let r;switch(G(e)){case"Dashboard":r=B(e,t);break;case"Insights Workbook":r=V(e,t);break;case"Experience":r=H(e,t);break;case"Web AppBuilder":r=W(e,t);break;case"Form":r=q(e,t);break;case"StoryMap":r=L(e,t);break;case"Urban Model":r=K(e,t);break;default:r=(0,c.$)(e.id,t)}return r},G=e=>{const t=e.typeKeywords||[];let r=e.type;return"StoryMap"===e.type||"Web Mapping Application"===e.type&&t.includes("Story Map")?r="StoryMap":"Insights Page"===e.type?r="Insights Page":"Insights Workbook"===e.type?r="Insights Workbook":e.type&&e.type.includes("Insights")?r="Insights":"Web Experience"===e.type||"Web Mapping Experience"===e.type&&t.includes("EXB Experience")?r="Experience":t.includes("Web AppBuilder")&&(r="Web AppBuilder"),r},L=(e,t)=>{const r=(0,u.a)(t);return`https://${{devext:"storymapsdev",qaext:"storymapsqa",production:"storymaps"}[(0,l.G)(r)]}.arcgis.com/stories/${e.id}/edit`},H=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r);return`https://experience${m[n]}.arcgis.com/builder/?id=${e.id}`},B=(e,t)=>{const r=(0,u.a)(t);let n=`${r}/apps/opsdashboard/index.html#/${e.id}?mode=edit`;return e.typeKeywords&&e.typeKeywords.includes("ArcGIS Dashboards")&&(n=`${r}/apps/dashboards/${e.id}#mode=edit`),n},W=(e,t)=>`${(0,u.a)(t)}/apps/webappbuilder/index.html?id=${e.id}`,q=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://survey123${m[n]}.arcgis.com`;let s;return s=e.typeKeywords.includes("Survey123 Connect")?(0,c.$)(e.id,r):`${i}/surveys/${e.id}/design?portalUrl=${r}`,s},V=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://insights${m[n]}.arcgis.com`,s=(0,c.$)(e.id,r);return z(r)?s:`${i}/#/edit/${e.id}`},K=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://urban${m[n]}.arcgis.com`,s=(0,c.$)(e.id,r);return z(r)?s:`${i}/?id=${e.id}`},z=e=>-1===e.indexOf("arcgis.com");function Y(e,t){const r=function(e){return(0,p.g)(e).replace(/\/api\/v3$/,"")}(t);return`${r}/api/download/v1/items/${e}/schedule?token=${t.authentication.token}`}const J=async(e,t)=>{const r=`${(0,p.g)(t)}/api/v3/jobs/item/${e}/forceUpdate`,n={method:"POST",headers:{"content-type":"application/json",authorization:t.authentication.token}};return(await fetch(r,n)).ok}},195009:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(982624),i=r(264263);function s(e){const t=["Feature Service","Map Service"].includes(e.type)&&/\/\d+$/.test(e.url),r=1===(0,i.W)(e,"extendedProps.server.layers.length"),s=(0,n.X)(e);return t||r||s}},559573:(e,t,r)=>{"use strict";r.d(t,{F4:()=>R,Hk:()=>U,KF:()=>_,N:()=>A,O1:()=>P,Oi:()=>D,Tf:()=>C,UY:()=>k,Z6:()=>O,b7:()=>I,l$:()=>x,oB:()=>E,v9:()=>y,ve:()=>T});var n=r(958328),i=r(641675),s=r(773807),o=r(97807),a=r(264263),c=r(560133),u=r(403555),l=r(6194),d=r
3(354695),p=r(507707),h=r(72090),m=r(371740),f=r(704059);const g=(e,t,r,n)=>!(0,m.ZY)(e,n)&&t&&r&&r.length>1&&!C(e.url);var y;!function(e){e.Continual="continual",e.Daily="daily",e.Weekly="weekly",e.Fortnightly="fortnightly",e.Monthly="monthly",e.Quarterly="quarterly",e.Biannually="biannually",e.Annually="annually",e.AsNeeded="as-needed",e.Irregular="irregular",e.NotPlanned="not-planned",e.Unknown="unknown",e.Semimonthly="semimonthly"}(y||(y={}));const b=(e,t)=>({"001":y.Continual,"002":y.Daily,"003":y.Weekly,"004":y.Fortnightly,"005":y.Monthly,"006":y.Quarterly,"007":y.Biannually,"008":y.Annually,"009":y.AsNeeded,"010":y.Irregular,"011":y.NotPlanned,"012":y.Unknown,"013":y.Semimonthly}[(0,m.Ux)(e,t||"updateFrequency")]),v=(e,t)=>{const r=(0,m.RN)((0,m.Ux)(e,t));return r&&Object.assign(Object.assign({},r),{source:`metadata.${(0,m.Fs)(t)}`})},w=(e,t)=>{const r=`${t}.editingInfo.lastEditDate`,n=(0,a.W)(e,r);return n&&{date:new Date(n),source:r,precision:m.VQ.Day}},S=(e,t)=>({date:new Date(e[t]),precision:m.VQ.Day,source:`item.${t}`}),E=e=>{var t;return null!==(t={appbuilderExtension:"file",appbuilderWidgetPackage:"widgets-source",application:"web",applicationConfiguration:"app-gear",arcgisProMap:"desktop",cadDrawing:"file-cad",channel:"channels",cityEngineWebScene:"urban-model",codeAttachment:"file-code",codeSample:"file-code",colorSet:"palette",contentCategorySet:"label",csv:"file-csv",csvCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",discussion:"speech-bubbles",documentLink:"link",event:"event",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",group:"users",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"maximize",hubProject:"projects",hubSiteApplication:"browser",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",wms:"map",wmts:"map",workflowManagerService:"file",workforceProject:"list-check"}[(0,p._A)(e)])&&void 0!==t?t:"file"},T=(e,t)=>{const r=t.authentication,n=r&&r.token;return{portalHome:(0,u.$)(e.id,t),portalApi:(0,l.p)(e,t,n),portalData:(0,d.m)(e,t,n),thumbnail:(0,c.S)(e,t,{token:n})}},I=(e,t)=>{let r;return(0,m.ZY)(e,t)&&(r=`${(0,i.g)(t).replace("/api/v3","")}/datasets/${e.id}_0/FeatureServer/0`),r},C=e=>{const t=e&&/\/\d+$/.exec(e);return t&&t[0].slice(1)},A=e=>e&&"feature service"===e.toLowerCase();function O(e,t=[]){return"Site Application"===e||"Hub Site Application"===e||"Web Mapping Application"===e&&t.includes("hubSite")}function _(e={}){let t=e.type;const r=e.typeKeywords||[];return O(e.type,r)&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&(0,h.q)(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&(0,h.q)(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),"Web Mapping Application"===e.type&&(0,h.q)(r,"hubSolutionTemplate")&&(t="Solution"),t}const D=e=>C(e.url)||A(e.type)&&e.typeKeywords&&(0,h.q)(e.typeKeywords,"Singlelayer")&&"0",P=e=>{if("public"!==e.access)return;const t=e.id,r=D(e);return r?`${t}_${r}`:t};function k(e){if(!e)return e;const t=["categories",""];return e.map((e=>e.split("/"))).reduce(((e,t,r)=>[...e,...t]),[]).filter((e=>!(0,h.q)(t,e.toLowerCase())))}const x=(e,t,r)=>{const n=C(e.url),i=n?parseInt(n,10):r;return t&&((0,p.kK)(i)?A(e.type)&&(e=>{const t=e&&1===e.length?e[0]:void 0;return t&&t.capabilities.includes("Query")?t:void 0})(t):t.find((e=>e.id===i)))},R=e=>e.isView,U=(e,t)=>{const{slug:r,requestOptions:i,data:a,metadata:c,groupIds:u,ownerUser:l,org:d,errors:p,server:h,layers:y,recordCount:C,boundary:A,extent:O,searchDescription:D,statistics:U}=t||{},M=x(e,y,null==t?void 0:t.layerId),N=((e,t,r)=>
3(0,m.ZY)(e,r)?e.id:(0,m.HH)(e,r)?t?`${e.id}_${t.id}`:P(e):void 0)(e,M,i),j=r||N||e.id,$=((e,t,r,n)=>((g(e,t,r,n)?t.name:e.title||e.name)||"").replace(/_/g," "))(e,M,y,i),F=g(e,M,y,i)&&M.description,G=M?M.type:_(e),L=Object.assign({relative:(0,m.bC)(G,j,e.typeKeywords)},i&&T(e,i)),H=I(e,i),B=((e,t)=>v(t.metadata,"reviseDate")||w(t,"layer")||w(t,"server")||S(e,"modified"))(e,{metadata:c,layer:M,server:h}),W=((e,t)=>v(t,"pubDate")||v(t,"createDate")||S(e,"created"))(e,c),q=((e,t)=>v(t,"metadataUpdatedDate")||S(e,"modified"))(e,c),V="update"===e.itemControl||"admin"===e.itemControl,K="admin"===e.itemControl;return Object.assign(Object.assign({item:e},e),{slug:r,data:a,metadata:c,groupIds:u,ownerUser:l,org:d,errors:p||[],server:h,layers:y,recordCount:C,statistics:U,hubId:N,identifier:j,get isProxied(){return!!H},layer:M,name:$,get canEdit(){return V},get canDelete(){return K},get title(){return $},get description(){return F||e.description},type:G,get family(){return(0,f._)(G)},get url(){return H||(M?`${(0,n.pW)(e.url)}/${M.id}`:e.url)},get categories(){return k(e.categories)},get actionLinks(){return e.properties&&e.properties.links},get hubActions(){return e.properties&&e.properties.actions},get isDownloadable(){return(0,s.f)(e)},get structuredLicense(){return(0,o.D)(e.licenseInfo)},get permissions(){return{visibility:e.access,control:e.itemControl||"view"}},get extent(){return(0,m.u9)(e,O,M)},get boundary(){return"automatic"===(null==A?void 0:A.provenance)?A:(0,m.iP)(e)},get summary(){return D||e.snippet||e.description},urls:L,get portalHomeUrl(){return L.portalHome},get portalDataUrl(){return L.portalData},get portalApiUrl(){return L.portalApi},get thumbnailUrl(){return L.thumbnail},get createdDate(){return new Date(e.created)},createdDateSource:"item.created",get updatedDate(){return B.date},get updatedDateSource(){return B.source},get updatedDatePrecision(){return B.precision},get modified(){return B.date.getTime()},get publishedDate(){return W.date},get publishedDateSource(){return W.source},get publishedDatePrecision(){return W.precision},get metadataUpdatedDate(){return q.date},get metadataUpdatedDateSource(){return q.source},get metadataUpdatedDatePrecision(){return q.precision},get updateFrequency(){return b(c)},get metadataUpdateFrequency(){return b(c,"metadataUpdateFrequency")},get publisher(){return(0,m.eI)(e,c,d,l)},get metrics(){return e.properties&&e.properties.metrics},get spatialReference(){var t;return(null===(t=null==M?void 0:M.extent)||void 0===t?void 0:t.spatialReference)||(0,m.P7)(e)},get viewDefinition(){const e=M&&R(M)&&a&&Array.isArray(a.layers)&&a.layers.find((e=>e.id===M.id));return e?e.layerDefinition:void 0},get orgId(){return d?d.id:(0,m.bV)(e,l)},get contentTypeIcon(){return E(G)},get additionalResources(){return(0,m.rL)(e,c)},get itemControl(){return e.itemControl||"view"}})}},80498:(e,t,r)=>{"use strict";r.d(t,{IZ:()=>C,J4:()=>I,OG:()=>A,WZ:()=>E,_8:()=>k,iN:()=>O,iV:()=>T,n3:()=>v,r$:()=>S,yu:()=>w});var n=r(989593),i=r(320788),s=r(773807),o=r(72090),a=r(539608),c=r(264263),u=r(713417),l=r(371740),d=r(507707),p=r(559573),h=r(704059),m=r(822581),f=r(958328),g=r(570582),y=r(410156),b=r(817011);function v(e=""){console.warn("DEPRECATED: Use getFamily() instead. getCategory will be removed at the next breaking version");const t=(0,i._)(e);return"feedback"===t?"app":t}function w(e=""){return s.b[e.toLowerCase()]}function S(e={}){console.warn("DEPRECATED: getTypeCategories will be removed at the next breaking version");const t=v((0,p.KF)(e));if(t){const e=Array.from(t);return e[0]=e[0].toUpperCase(),[e.join("")]}return["Other"]}function E(e,t){if((0,o.q)(["template","feedback"],e.family))return e.id;if((0,l.r9)(e.type,e.typeKeywords)){const r=((0,c.W)(t,"data.values.pages")||[]).find((t=>t.id===e.id));return r?r.slug:(0,y.v)(e.item).split(b.XE).pop()}if(e.slug){let r;const n=(0,c.W)(t,"domainInfo.orgKey");return r=(0,c.W)(t,"data.values.isUmbrella")?e.slug:(0,m.d5)(e.slug,n),r}return e.hubId||e.id}function T(e){return(0,p.Hk)(e)}function I(e){const t=C(e),{errors:r,boundary:n,metadata:i,slug:s,groupIds:o,orgId:a,orgName:c,organization:u,orgExtent:l,server:d,layers:h,layer:m,recordCount:f,statistics:g,extent:y,searchDescription:b}=e.attributes,v=m&&m.id,w=a&&{id:a,name:c||u,extent:l};return(0,p.Hk)(t,{layerId:v,slug:s,errors:r,metadata:i||null,groupIds:o,org:w,server:d,layers:h,recordCount:f,boundary:n,extent:y,searchDescription:b,statistics:g})}function C(e){if(!e)return;const{id:t,attributes:r}=e;if(!r)return;const{itemId:n}=(0,m.tS)(t),{owner:i,orgId:s,created:o,modified:a,name:c,title:l,type:d,typeKeywords:p,description:h,snippet:f,tags:g,thumbnail:y,categories:b,contentStatus:v,spatialReference:w,accessInformation:S,licenseInfo:E,culture:T,url:I,access:C,proxyFilter:A,properties:O,appCategories:_,industries:D,languages:P,largeThumbn
3ail:k,banner:x,screenshots:R,listed:U,ownerFolder:M,size:N,protected:j,commentsEnabled:$,numComments:F,numRatings:G,avgRating:L,numViews:H,itemControl:B,scoreCompleteness:W,itemExtent:q,itemModified:V,modifiedProvenance:K,serviceSpatialReference:z}=r;return{id:n,owner:i,orgId:s,created:o,modified:V||"item.modified"===K&&a,title:l||c,type:I&&(0,u.Gb)(I)||d,typeKeywords:p,description:h,tags:g,snippet:f,thumbnail:y,extent:q||[],categories:b,contentStatus:v,spatialReference:w||z,accessInformation:S,licenseInfo:E,culture:T,url:I,access:C,size:N,protected:j,proxyFilter:A,properties:O,appCategories:_,industries:D,languages:P,largeThumbnail:k,banner:x,screenshots:R,listed:U,ownerFolder:M,commentsEnabled:$,numComments:F,numRatings:G,avgRating:L,numViews:H,itemControl:B,scoreCompleteness:W}}const A=(e,t)=>{const r=(0,p.KF)(Object.assign(Object.assign({},e.item),{type:t})),n=(0,h._)(r),i=(0,p.oB)(r),s=O(r,e.isProxied),o=Object.assign(Object.assign({},e),{type:r,family:n,contentTypeIcon:i,contentTypeLabel:s});return _(o,{relative:D(o)})},O=(e,t)=>t?"CSV":(0,d._A)(e||""),_=(e,t)=>{const r=Object.assign(Object.assign({},e.urls),t);return Object.assign(Object.assign({},e),{urls:r})},D=(e,t)=>(0,l.bC)(e.type,t||e.identifier,e.typeKeywords),P=e=>({kind:"service",service:{availability:e}});async function k(e,t){const{timeout:r=3e3}=t,i=(0,n._T)(t,["timeout"]),{url:s}=e;if(!s)return P("available");const o=s.includes("?");if((0,g.c)(o?s.split("?")[0]:s)){const e=(0,f.ko)(Object.assign({url:s},i)).then((()=>P("available"))).catch((e=>{if(e.response){const t=e.response.error.code,r=[401,403,499].includes(t);return P(r?"auth-required":"unavailable")}return P("auth-required")}));return Promise.race([e,await(0,a.D)(r)]).then((e=>e||P("slow")))}return P("available")}},443011:(e,t,r)=>{"use strict";r.d(t,{B:()=>C,createContent:()=>E,deleteContent:()=>I,updateContent:()=>T});var n=r(170209),i=r(719339),s=r(572269),o=r(248785),a=r(507707),c=r(822409),u=r(963609),l=r(958328),d=r(789565),p=r(903355),h=r(371740),m=r(264263),f=r(94684),g=r(140738),y=r(388565),b=r(29784),v=r(195009),w=r(906730);const S={item:{title:"No Title Provided",description:"",snippet:"",tags:[],typeKeywords:[]},data:null};async function E(e,t){const r=Object.assign({},e);r.typeKeywords=(0,c.Wb)(r.typeKeywords,r.isDiscussable);const n=new s.c7((0,o.s)());let u=n.entityToStore(r,(0,a.kI)(S));u=await(0,i.NY)(u,t);const l=n.storeToEntity(u,{}),d=await(0,w.Q)(l,t);return l.entitySettingsId=d.id,l.discussionSettings=d.settings.discussions,l}async function T(e,t){const r=await(0,n.rV)(e.id,t),b={item:r};e.typeKeywords=(0,c.Wb)(e.typeKeywords,e.isDiscussable);const S=new s.c7((0,o.s)()).entityToStore(e,b),E=(0,y.H)(e),T=(0,m.W)(e,"extendedProps.downloads.formats"),I=(0,d.E8)(e)&&"createReplica"!==E;if((0,v.k)(e)&&E&&T&&!I){const t=(0,a.kI)(e.extendedProps.downloads);(0,f.t)("item.properties.downloads",t,S,!0)}const C=await(0,i.QB)(S,t),A={};if((0,d.E8)(e)){const r=await(0,l.ko)(Object.assign(Object.assign({},t),{url:e.url}));if((0,d.bI)(d.GY.EXTRACT,r)!==e.serverExtractCapability){const n=(0,d.F7)(d.GY.EXTRACT,r),i={capabilities:n.capabilities};await(0,l.iD)((0,l.pW)(e.url),{authentication:t.authentication,updateDefinition:i}),A.server=n}else A.server=r}(0,p.zJ)(t,e.access)&&((0,g.v)(e._forceUpdate,[!0])&&await(0,h.pv)(r.id,t),delete e._forceUpdate,await(0,p.xV)(e,t));const O=(0,u.l)(C,t,A,e),_=await(0,w.Q)(O,t);return O.entitySettingsId=_.id,O.discussionSettings=_.settings.discussions,O}async function I(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,n.cl)(r)}function C(e,t){var r;const n=(0,a.kI)(e);delete n.downloadFormats;const i=(0,a.kI)(n);if((0,y.H)(i)&&e.downloadFormats){const t=(0,b.g)(i),r=e.downloadFormats.map((e=>{const t=(0,a.kI)(e);return delete t.label,t}));t.formats=r,(0,f.t)("extendedProps.downloads",t,i,!0)}return i.extent=(null===(r=e.location)||void 0===r?void 0:r.extent)||[],i}},221366:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(989593),i=r(958328),s=r(170209),o=r(248849),a=r(507707),c=r(325833),u=r(822581),l=r(313621),d=r(713417),p=r(72090),h=r(559573),m=r(704059);const f=(e,t)=>{const r=(0,a.kI)(e);return r.params=Object.assign(Object.assign({},r.params),{"fields[datasets]":"slug,boundary,extent,recordCount,searchDescription,statistics"}),t&&(r.params["filter[slug]"]=t),r},g=e=>{const{itemId:t,layerId:r}=(0,u.tS)(e.id),n=r&&parseInt(r,10),{slug:i,boundary:s,extent:o,recordCount:a,searchDescription:c,statistics:l}=e.attributes;return{itemId:t,layerId:n,slug:i,boundary:s,extent:o,recordCount:a,searchDescription:c,statistics:l}},y=async(e,t)=>{try{const r=await(0,l.$)(`/datasets/${e}`,f(t));return g(r.data)}catch(e){return{errors:(0,o.g)(e)}}};var b=r(371740);const v=async(e,t)=>{const r=await(0,s.rV)(e,t);r.url=(0,h.b7)(r,t)||r.url;
3const n=(null==t?void 0:t.enrichments)||(e=>{const t=["groupIds","metadata","ownerUser","org"];return(e=>{const t=(0,h.KF)(e),r=(0,m._)(t);return(0,p.q)(["template","solution"],r)||(0,p.q)(["Web Map","Web Scene","Feature Service"],t)})(e)&&t.push("data"),(0,d.TD)(e.url)?t.concat("server","layers"):t})(r),a=await(0,o.Z)(r,n,t);return(async(e,t)=>{const{item:r}=e;let{layers:n}=e,s=n&&(0,h.l$)(r,n,t&&t.layerId);if(s&&!s.type){const e=`${(0,i.pW)(r.url)}/${s.id}`,o=Object.assign({url:e},t);s=await(0,i.Hs)(o),n=n.map((e=>e.id===s.id?s:e))}return Object.assign(Object.assign({},e),{layers:n})})(Object.assign(Object.assign({},a),{item:r}),t)},w=async(e,t)=>{const r=(0,u.hb)(e)?await(async(e,t)=>{let r=await(async(e,t)=>{const r=await(0,l.$)("/datasets",f(t,e));return g(r.data[0])})(e,t);const{itemId:i}=r;let{layerId:s}=r;const o=await v(i,t),{item:u}=o,d=(0,n._T)(o,["item"]),p=t&&t.layerId;return(0,a.kK)(p)||p===s||(s=p,r=Object.assign(Object.assign({},r),await y(`${i}_${s}`,t))),(0,h.Hk)(u,Object.assign(Object.assign(Object.assign({requestOptions:t},d),r),{layerId:s,slug:e,errors:(0,c.q)([d.errors,r.errors])}))})((0,u.tl)(e,null==t?void 0:t.siteOrgKey),t):await(async(e,t)=>{const{itemId:r}=(0,u.tS)(e),i=await v(r,t),{item:s}=i,o=(0,n._T)(i,["item"]),l=t&&t.layerId,d=(0,b.HH)(s,t)?await y(e,t):{},p=d.layerId;return(0,h.Hk)(s,Object.assign(Object.assign(Object.assign({requestOptions:t},o),d),{layerId:(0,a.kK)(l)?p:l,errors:(0,c.q)([o.errors,d.errors])}))})(e,t),{layer:s,type:o}=r,d=!!s&&["Feature Layer","Table"].includes(o);return r.recordCount=d&&((0,a.kK)(r.recordCount)||r.viewDefinition)?await(async(e,t)=>{const{url:r,viewDefinition:n}=e,s=null==n?void 0:n.definitionExpression;try{return(await(0,i.QH)(Object.assign(Object.assign({},t),{url:r,where:s,returnCountOnly:!0}))).count}catch(e){return 1/0}})(r,t):r.recordCount,r}},594309:(e,t,r)=>{"use strict";r.d(t,{k:()=>m,J:()=>h});var n=r(221366),i=r(248849),s=r(570582),o=r(903355),a=r(559573),c=r(94684),u=r(963609),l=r(223040),d=r(934864),p=r(719339);const h=async(e,t,r)=>{const u=Object.assign(Object.assign({},t),{enrichments:[]}),{item:l}=await(0,n.Z)(e,u),d=await async function(e,t,r){const n={};r||(r=function(e){const t=["metadata","schedule"];return(0,s.c)(e.url)&&t.push("server"),t}(e));const a=["schedule"],c=r.filter((e=>!a.includes(e)));if(c.length){const r=await(0,i.Z)(e,c,t);c.forEach((e=>{n[e]=r[e]}))}return r.includes("schedule")&&(n.schedule=await async function(e,t){let r;if((0,o.zJ)(t,e.access))try{const{schedule:n}=await(0,o.MP)(e.id,t);r=n||{mode:"automatic"}}catch(t){console.warn("Failed to fetch schedule for item",e.id,t)}return r}(e,t)),n}(l,t,r),p=(0,a.KF)(l);return(0,c.t)("type",p,l),m(l,t,d)},m=async(e,t,r)=>{const[n,i]=await Promise.all([(0,p.UO)(e,t),t.isPortal?null:(0,l.Fn)(Object.assign({id:e.id},t)).catch((()=>Object.assign({id:null},(0,d.A)("content"))))]);return n.entitySettings=i,(0,u.l)(n,t,r)}},704059:(e,t,r)=>{"use strict";r.d(t,{P:()=>s,_:()=>i});var n=r(320788);function i(e){let t;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;case"hub project":t="project";break;case"discussion":t="discussion";break;case"event":t="event";break;case"hub initiative":t="initiative";break;case"organization":t="organization";break;default:t={other:"content",solution:"template"}[r=(0,n._)(e)]||r}var r;return t}function s(e){let t;switch(e.toLowerCase()){case"content":t=(0,n.o)("other"),t=t.concat(["CAD Drawing","Feature Collection Template","Report Template"]);break;case"template":t=[...(0,n.o)("template"),...(0,n.o)("solution")];break;case"dataset":t=(0,n.o)(e.toLowerCase()).filter((e=>"Feature Collection Template"!==e&&"Raster Layer"!==e&&"Microsoft Excel"!==e)),t=t.concat("Image Service");break;case"map":t=(0,n.o)(e.toLowerCase()).filter((e=>"Image Service"!==e)),t=t.concat(["Raster Layer"]);break;case"document":t=(0,n.o)(e.toLowerCase()).filter((e=>"CAD Drawing"!==e&&"Report Template"!==e)),t=t.concat("Microsoft Excel");break;case"project":t=["Hub Project"];break;
3case"discussion":t=["Discussion"];break;case"initiative":t=["Hub Initiative"];break;default:t=(0,n.o)(e.toLowerCase())}return t}},789565:(e,t,r)=>{"use strict";function n(e){return s(e.type,e.typeKeywords)}function i(e){return s(e.type,e.typeKeywords)}function s(e,t=[]){return"Feature Service"===e&&t.includes("Hosted Service")}function o(e){return!!e&&e.includes("arcgis.com")&&/(feature)server(\/|\/(\d+))?$/i.test(e)&&!a(e)}function a(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}var c;function u(e,t){return(t.capabilities||"").split(",").includes(e)}function l(e,t){const r=u(e,t)?function(e,t){const r=t.capabilities.split(",").filter((t=>t!==e)).join(",");return Object.assign(Object.assign({},t),{capabilities:r})}(e,t):function(e,t){const r=(t.capabilities||"").split(",").filter((e=>!!e)).concat(e).join(",");return Object.assign(Object.assign({},t),{capabilities:r})}(e,t);return r}r.d(t,{E8:()=>i,Et:()=>o,F7:()=>l,GY:()=>c,ZM:()=>n,bI:()=>u,wx:()=>a}),function(e){e.EXTRACT="Extract",e.QUERY="Query"}(c||(c={}))},961522:(e,t,r)=>{"use strict";r.d(t,{QA:()=>f.Q,cq:()=>m,sw:()=>h,GY:()=>b.GY,v9:()=>n.v9,tl:()=>y.tl,Hk:()=>n.Hk,Te:()=>p,ko:()=>c.k,K1:()=>o.createContent,J4:()=>s.J4,IZ:()=>s.IZ,yd:()=>o.deleteContent,Bp:()=>o.B,vl:()=>g.v,Z$:()=>a.Z,Jn:()=>c.J,SE:()=>w,n3:()=>s.n3,WZ:()=>s.WZ,oB:()=>n.oB,iN:()=>s.iN,_A:()=>i._,Pp:()=>i.P,O1:()=>n.O1,l$:()=>n.l$,Oi:()=>n.Oi,Tf:()=>n.Tf,ve:()=>n.ve,b7:()=>n.b7,_8:()=>s._8,r$:()=>s.r$,yu:()=>s.yu,bI:()=>b.bI,Et:()=>b.Et,N:()=>n.N,E8:()=>b.E8,ZM:()=>b.ZM,F4:()=>n.F4,wx:()=>b.wx,Z6:()=>n.Z6,hb:()=>y.hb,iV:()=>s.iV,lF:()=>l.l,KF:()=>n.KF,tS:()=>y.tS,UY:()=>n.UY,d5:()=>y.d5,OG:()=>s.OG,F7:()=>b.F7,x0:()=>o.updateContent});var n=r(559573),i=r(704059),s=r(80498),o=r(443011),a=r(221366),c=r(594309),u=r(94684),l=r(963609),d=r(507707);const p=(e,t,r)=>{const i=(0,d.kI)(e),s=(0,n.KF)(e);return(0,u.t)("type",s,i),(0,l.l)({item:i},t,r)};var h,m,f=r(923060),g=r(605376),y=r(822581);!function(e){e.DOWNLOAD="download",e.UPDATE="update"}(h||(h={})),function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info"}(m||(m={}));var b=r(789565),v=r(841741);async function w(e,t){const r=["types","statuses"];if(r.some((e=>t[e])))throw new v.Z("fetchItemJobRecords",`The following options are not yet implemented: ${r.join(", ")}`);const{context:n}=t,i=`${n.hubUrl}/api/download/v1/items/${e}/errors${function(e){const t=new URLSearchParams;e.from&&t.append("fromDate",e.from),e.to&&t.append("toDate",e.to),e.limit&&t.append("limit",e.limit.toString());const r=t.toString();return r&&`?${r}`}(t)}`,{errors:s}=await fetch(i).then((e=>e.json()));return s.map(S)}function S(e){return{type:h.DOWNLOAD,message:e.message,created:new Date(e.timestamp).getTime(),layerId:e.layerId,id:null,status:null,messageId:null,modified:null}}},903355:(e,t,r)=>{"use strict";r.d(t,{MP:()=>o,xV:()=>a,zJ:()=>c});var n=r(507707),i=r(140738),s=r(371740);const o=async(e,t)=>{const r=await fetch((0,s.oR)(e,t)),n=await r.json();if(!r.ok||404===n.statusCode)return{message:`Download schedule not found for item ${e}`,statusCode:404,schedule:null};if("manual"===n.mode)return{schedule:{mode:"manual"},message:`Download schedule found for item ${e}`,statusCode:200};switch(delete n.itemId,n.cadence){case"daily":case"weekly":case"monthly":case"yearly":return{schedule:Object.assign(Object.assign({},n),{mode:"scheduled"}),message:`Download schedule found for item ${e}`,statusCode:200}}},a=async(e,t)=>{const r=await o(e.id,t);return"automatic"===e.schedule.mode&&404===r.statusCode?{message:"No schedule set, and incoming schedule is automatic.",statusCode:404}:(0,i.v)(e.schedule,r.schedule)?{message:"No action needed as schedules deepEqual each other."}:"automatic"===e.schedule.mode?await(async(e,t)=>{const r=(0,s.oR)(e,t),n=await fetch(r,{method:"DELETE",headers:{accept:"application/json"}});return Object.assign(Object.assign({},await n.json()),{statusCode:n.status})})(e.id,t):await(async(e,t,r)=>{const i=(0,n.kI)(t);"manual"!==i.mode&&delete i.mode;const o=(0,s.oR)(e,r),a={method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify(Object.assign(Object.assign({},i),{itemId:e}))},c=await fetch(o,a);return Object.assign(Object.assign({},await c.json()),{statusCode:c.status})})(e.id,e.schedule,t)},c=(e,t)=>{var r,n;const i=null===(r=e.authentication)||void 0===r?void 0:r.token;return(null===(n=e.portal)||void 0===n?void 0:n.includes("arcgis.com"))&&"public"===t&&!!i}},963609:(e,t,r)=>{"use strict";r.d(t,{l:()=>m});var n=r(572269),i=r(248785),s=r(560133),o=r(403555),a=r(371740),c=r(563447),u=r(789565),l=r(471934),d=r(264263),p=r(570582);function h(e,t,r){return{kind:null,metadata:t.metadata,additionalResources:(0,a.rL)(e,t.metadata,r),downloads:(0,d.W)(e,"properties.downloads")}}function m(e,t,r,m={}){return function(e,t,r,n={}){let i;r.authentication&&(i=r.authentication.token),t=(0,l.k)(e.item,t);const m=(0,s.S)(e.item,r,i);if(t.thumbnailUrl=m,t.links={self:(0,o.$)(t.id,r),siteRelative:(0,a.bC)(t.type,t.slug||t.id,t.typeKeywords),siteRelativeEntityType:(0,a.bC)(t.type),workspaceRelative:(0,c.C)("content",t.id),thumbnail:m,contentEditUrl:(0,a.OA)(e.item,r)},t.licenseInfo=e.item.licenseInfo||"",t.schedule=n.schedule,t.extendedProps=(0,p.c)(t.url)?function(e,t,r){const n=h(e,t,r),i=Object.assign(Object.assign({},n),{kind:"service"});if(t.server){i.server=t.server,i.serverQueryCapability=(0,u.bI)(u.GY.QUERY,t.server),i.serverExtractCapability=(0,u.bI)(u.GY.EXTRACT,t.server);const e=(0,d.W)(t,"server.supportedExportFormats");i.serverExtractFormats=e&&e.split(",")}return i}(e.item,n,r):function(e,t,r){const n=h(e,t,r);return Object.assign(Object.assign({},n),{kind:"content"})}(e.item,n,r),n.server){t.serverQueryCapability=(0,u.bI)(u.GY.QUERY,n.server),t.serverExtractCapability=(0,u.bI)(u.GY.EXTRACT,n.server);const e=(0,d.W)(n,"server.supportedExportFormats");t.serverExtractFormats=e&&e.split(",")}return n.metadata&&(t.additionalResources=(0,a.rL)(e.item,n.metadata,r)),t}(e,new n.c7((0,i.s)()).storeToEntity(e,m),t,r)}},605376:(e,t,r)=>{"use strict";r.d(t,{v:()=>h});var n=r(248849),i=r(264263),s=r(560133),o=r(348157),a=r(403555),c=r(507707),u=r(40180),l=r(704059),d=r(371740),p=r(563447);async function h(e,t,r){const h={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,tags:e.tags,typeKeywords:e.typeKeywords,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,l._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,d.jA)(e),rawResult:e},m=(t=[...t].filter(c.Tw)).map(o.u),f=(0,u.e)("enrichment",m).filter(c.Tw);let g={};return f.length&&(g=await(0,n.Z)(e,f,r)),m.forEach((e=>{h[e.prop]=(0,i.W)(g,e.path)})),h.links.thumbnail=(0,s.S)(e,r),h.links.self=(0,a.$)(h.id,r),h.links.siteRelative=(0,d.bC)(h.type,h.id,e.typeKeywords),h.links.workspaceRelative=(0,p.C)(h.type,h.id),h}},822581:(e,t,r)=>{"use strict";r.d(t,{d5:()=>a,hb:()=>s,tS:()=>i,tl:()=>o});var n=r(526462);function i(e){const[t,r]=e?e.split("_"):[];return{itemId:t,layerId:r}}function s(e){const{itemId:t}=i(e);return!(!t||(0,n.k)(t))}function o(e,t){return/.+::.+/.test(e)?e:`${t}::${e}`}function a(e,t){return t&&RegExp(`^${t}::`).exec(e)?e.split(`${t}::`)[1]:e}},167168:(e,t,r)=>{"use strict";r.d(t,{c:()=>S});var n=r(923060),i=r(378873),s=r(550896),o=r(384704),a=r(554332),c=r(417031),u=r(340116),l=r(213630),d=r(202773),p=r(841807),h=r(921910),m=r(2166),f=r(358637),g=r(507707);const y={};var b=r(348753);class v{constructor(e,t){this.isDestroyed=!1,this.entity=e,this.context=t}static fromJson(e,t){const r=this.applyDefaults(e);return new v(r,t)}static applyDefaults(e){return Object.assign(Object.assign({},y),e)}
3toJson(){return(0,g.kI)(this.entity)}async save(){if(this.isDestroyed)throw new Error("HubUser is already destroyed.");if(await this.context.updateUserHubSettings(this.entity.settings),this.context.isCommunityOrg&&this.context.isOrgAdmin&&this.entity.hubOrgSettings){const{hubOrgSettings:e}=this.entity,t={signupText:e.enableSignupText&&e.signupText?e.signupText:"",termsAndConditions:e.enableTermsAndConditions&&e.termsAndConditions?e.termsAndConditions:""};await async function(e,t){if(!t.currentUser)throw new Error("User is not authenticated");if(!t.isCommunityOrg||!t.isOrgAdmin)throw new Error("User is not an org admin in the current community org");const{termsAndConditions:r,signupText:n}=e,i=`${t.portalUrl}/sharing/rest/portals/self/setSigninSettings?f=json`,s=!n||!r;return(0,b.WY)(i,{httpMethod:"POST",params:{termsAndConditions:r,signupText:n,clearEmptyFields:s,token:t.hubRequestOptions.authentication.token}})}(t,this.context)}this.context.isOrgAdmin&&this.entity.hubOrgSettings&&Object.prototype.hasOwnProperty.call(this.entity.hubOrgSettings,"showInformationalBanner")&&await async function(e,t){if(!t.currentUser)throw new Error("User is not authenticated");if(!t.isOrgAdmin)throw new Error("User is not an org admin in the current org");const r=(0,g.kI)(t.portal.portalProperties),{showInformationalBanner:n}=e;r.hub.settings.informationalBanner=n;const i=`${t.portalUrl}/sharing/rest/portals/self/update?f=json`;return(0,b.WY)(i,{httpMethod:"POST",params:{portalProperties:JSON.stringify(r),token:t.hubRequestOptions.authentication.token}})}(this.entity.hubOrgSettings,this.context)}async delete(){if(this.isDestroyed)throw new Error("HubUser is already destroyed.");this.isDestroyed=!0}async getEditorConfig(e,t){return(0,m.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,f.t)((0,g.kI)(this.entity),t,this.context.hubRequestOptions):(0,g.kI)(this.entity)}async fromEditor(e){const t=(0,g.kI)(e);return this.entity=t,await this.save(),this.entity}}var w=r(208734);class S{constructor(e){this.instance=e}static fromEntity(e,t){const r=(0,p.Q)(e);let m;if("project"===r&&(m=u.M.fromJson(e,t)),"initiative"===r&&(m=o.M.fromJson(e,t)),"content"===r&&(m=n.Q.fromJson(e,t)),"site"===r&&(m=l.g.fromJson(e,t)),"page"===r&&(m=c.T.fromJson(e,t)),"discussion"===r&&(m=i.G.fromJson(e,t)),"template"===r&&(m=d.P.fromJson(e,t)),"channel"===r&&(m=w.l.fromJson(e,t)),"event"===r&&(m=h.q.fromJson(e,t)),"group"===r&&(m=s.w.fromJson(e,t)),"initiativeTemplate"===r&&(m=a.f.fromJson(e,t)),"user"===r&&(m=v.fromJson(e,t)),m)return new S(m);throw new Error(`Unsupported entity type: ${e.type}`)}async getConfig(e,t){return this.instance.getEditorConfig(e,t)}toEditor(e={},t=[]){return this.instance.toEditor(e,t)}async save(e,t){return this.instance.fromEditor(e,t)}}},110571:(e,t,r)=>{"use strict";r.d(t,{x:()=>y});var n=r(170209),i=r(841741),s=r(43421),o=r(232982),a=r(558871),c=r(261788),u=r(597111),l=r(496157),d=r(513918),p=r(560133),h=r(507707),m=r(233076),f=r(822409);const g="featuredImage.png";class y{constructor(e,t){this.isDestroyed=!1,this.thumbnailCache=null,this.context=t,this.entity=e}checkPermission(e){return(0,l.P)(e,this.context,this.entity)}getPermissionPolicies(e){return(this.entity.permissions||[]).filter((t=>t.permission===e))}addPermissionPolicy(e){this.entity.permissions=(0,d.a)(this.entity.permissions,e)}removePermissionPolicy(e,t){this.entity.permissions=(0,d.T)(this.entity.permissions,e,t)}get id(){return this.entity.id}get owner(){return this.entity.owner}toJson(){if(this.isDestroyed)throw new Error("Entity is already destroyed.");return(0,h.kI)(this.entity)}get canEdit(){return this.entity.canEdit}get canDelete(){return this.entity.canDelete}get orgId(){return this.entity.orgId}async shareWithGroup(e){if(!this.context.currentUser)throw new i.Z("Share Item With Group","Cannot share item with group when no user is logged in.");await(0,a.L)(this.entity.id,[e],this.context.requestOptions,this.entity.owner)}async shareWithGroups(e){await(0,a.L)(this.entity.id,e,this.context.requestOptions,this.entity.owner)}async unshareWithGroup(e){await(0,o.z)(this.entity.id,[e],this.context.requestOptions,this.entity.owner)}async unshareWithGroups(e){await(0,o.z)(this.entity.id,e,this.context.requestOptions,this.entity.owner)}async setAccess(e){await(0,n.zT)({id:this.entity.id,access:e,owner:this.entity.owner,authentication:this.context.session}),this.entity.access=e}async getFollowersGroup(){let e;try{this.entity.followersGroupId&&(e=await(0,n.ex)(this.entity.followersGroupId,this.context.userRequestOptions))}catch(t){e=null}return e}async setFollowersGroupAccess(e){await(0,n.mD)({group:{id:this.entity.followersGroupId,access:e},authentication:this.context.session})}async setFollowersGroupIsDiscussable(e){const t=await this.getFollowersGroup(),r=(0,f.Wb)(t.typeKeywords,e);await(0,n.mD)({group:{id:t.id,typeKeywords:r},authentication:this.context.session})}async sharedWith(){return(0,m.x)(this.entity.id,this.context.requestOptions)}async afterSave(){this.thumbnailCache&&(this.thumbnailCache.clear?(await(0,c.f)(this.entity.id,this.entity.owner,this.context.userRequestOptions),this.thumbnailCache=null,this.entity.thumbnail=null,this.entity.thumbnailUrl=null):(await(0,u._)(this.entity.id,this.thumbnailCache.file,this.thumbnailCache.filename,this.context.userRequestOptions,this.entity.owner),this.entity.thumbnail=`thumbnail/${this.thumbnailCache.filename}`,this.entity.thumbnailUrl=this.getThumbnailUrl(),this.thumbnailCache=null))}setThumbnail(e,t){this.thumbnailCache={file:e,filename:t}}
3clearThumbnail(){this.thumbnailCache={clear:!0}}getThumbnailUrl(e=200){const t={id:this.entity.id,access:this.entity.access,thumbnail:this.entity.thumbnail},r={token:this.context.session.token,width:e};return(0,p.S)(t,this.context.requestOptions,r)}async setFeaturedImage(e,t=!1){var r;try{((null===(r=this.entity.view)||void 0===r?void 0:r.featuredImageUrl)||t)&&await this.clearFeaturedImage();const n=await(0,s.Z)(this.entity.id,this.entity.owner,e,g,this.context.userRequestOptions);this.entity.view=Object.assign(Object.assign({},this.entity.view),{featuredImageUrl:n}),await this.save()}catch(t){if(t instanceof Error&&"CONT_00942: Resource already present"===t.message)return this.setFeaturedImage(e,!0);throw t}}async clearFeaturedImage(){try{const e=await(0,n.ug)(Object.assign({id:this.entity.id,owner:this.entity.owner,resource:g},this.context.userRequestOptions));if(e&&!e.success)throw new i.Z("Clear Item Featured Image","Unknown error clearing featured image.");this.entity.view.featuredImageUrl=null,await this.save()}catch(e){throw e instanceof Error?new i.Z("Clear Item Featured Image",e.message,e):new i.Z("Clear Item Featured Image","Unknown error clearing featured image.")}}updateIsDiscussable(e){const t=(0,f.Wb)(this.entity.typeKeywords,e);this.update({typeKeywords:t,isDiscussable:e})}}},572269:(e,t,r)=>{"use strict";r.d(t,{Bl:()=>l,c7:()=>u,nc:()=>d});var n=r(898348),i=r(822409),s=r(264263),o=r(94684),a=r(212347),c=r(507707);class u{constructor(e){this.mappings=e}storeToEntity(e,t){const r=d(e,t,this.mappings);if((0,s.W)(e,"item")){const t=(0,s.W)(e,"item");(0,o.t)("canEdit",["admin","update"].includes(t.itemControl),r),(0,o.t)("canDelete","admin"===t.itemControl,r),(0,o.t)("canRecycle",t.canRecycle||!1,r),(0,o.t)("protected",t.protected,r)}return r}entityToStore(e,t){return l(e,t,this.mappings)}}function l(e,t,r){if((0,s.W)(t,"item")){const r=(0,s.W)(t,"item");r.typeKeywords&&(r.typeKeywords=(0,s.W)(e,"isDiscussable")?r.typeKeywords.filter((e=>e!==n.f)):[...r.typeKeywords,n.f],(0,o.t)("item.typeKeywords",r.typeKeywords,t))}return p(e,"entityKey",t,"storeKey",r)}function d(e,t,r){if((0,s.W)(e,"item")){const r=(0,s.W)(e,"item");(0,o.t)("isDiscussable",(0,i.BV)(r),t)}return p(e,"storeKey",t,"entityKey",r)}function p(e,t,r,n,i){const o=(0,c.kI)(r);return i.forEach((r=>{const i=(0,s.W)(r,t),c=(0,s.W)(r,n),u=(0,s.W)(e,i);null!=u&&(0,a.q)(o,c,u,!0)})),o}},853719:(e,t,r)=>{"use strict";r.d(t,{g:()=>c});var n=r(403555),i=r(410156),s=r(563447),o=r(560133),a=r(371740);function c(e,t){let r;return t.authentication&&(r=t.authentication.token),{self:(0,n.$)(e.id,t),siteRelative:(0,a.bC)(e.type,(0,i.v)(e),e.typeKeywords),siteRelativeEntityType:(0,a.bC)(e.type),workspaceRelative:(0,s.C)(e.type,e.id),thumbnail:(0,o.S)(e,t,r)}}},471934:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(371740),i=r(822409);function s(e,t){return t.createdDate=new Date(e.created),t.createdDateSource="item.created",t.updatedDate=new Date(e.modified),t.updatedDateSource="item.modified",t.location=t.location||(0,n.jA)(e),t.isDiscussable=(0,i.BV)(e),t}},906730:(e,t,r)=>{"use strict";r.d(t,{Q:()=>o});var n=r(841807),i=r(934864),s=r(223040);async function o(e,t,r=null){var o,a;const c=(0,n.Q)(e),u=(0,i.A)(c),l=Object.assign(Object.assign({},u.settings),{discussions:Object.assign(Object.assign(Object.assign({},u.settings.discussions),e.discussionSettings),{allowedLocations:r})});return(null===(o=l.discussions.allowedChannelIds)||void 0===o?void 0:o.length)||(l.discussions.allowedChannelIds=null),(null===(a=l.discussions.allowedLocations)||void 0===a?void 0:a.length)||(l.discussions.allowedLocations=null),e.entitySettingsId?await(0,s.SK)(Object.assign({id:e.entitySettingsId,data:{settings:l}},t)):await(0,s.qH)(Object.assign({data:{id:e.id,type:u.type,settings:l}},t))}},684290:(e,t,r)=>{"use strict";r.d(t,{_:()=>c,h:()=>u});var n=r(568008),i=r(617665),s=r(186652),o=r(513903),a=r(972571);function c(e){const t=(0,o._2)(e);if(!t.valid)throw new Error(t.reason);const r=[];for(let e=0;e<t.parts.length;e+=2){const n=(0,o.Zb)(t.parts[e]);r.push({hubEntityType:n,id:t.parts[e+1]})}return r.reverse()}async function u(e,t,r,o){const c=Date.now(),u={identifier:e,isContained:!1,catalogInfo:{},duration:0};if(!r||0===r.length)return Promise.resolve(u);u.isContained=!0;const l=r.map(((r,i,s)=>{const o=0===i,c={id:r.id,hubEntityType:r.hubEntityType,idToFind:o?e:s[i-1].id,entityType:o?(0,n.x)(t):(0,a.w)(s[i-1].hubEntityType)};return r.catalog&&(c.catalog=r.catalog),c}));await(0,s.M)(l,(async e=>{let t;if(e.catalog)t=i.g.fromJson(e.catalog,o);else{const r={hubEntityType:e.hubEntityType,prop:"catalog"};t=await i.g.init(e.id,o,r)}u.catalogInfo[e.id]={id:e.id,hubEntityType:e.hubEntityType,catalog:t.toJson()};const r=await t.contains(e.idToFind,{entityType:e.entityType});r.isContained||(u.isContained=r.isContained,u.reason=`Entity ${e.idToFind} not contained in catalog ${e.id}`)}));const d=(new Date).getTime();return u.duration=d-c,u}},752438:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(858689);function i(){const e=Object.keys(n.P),t=[];return["access","created","culture","description","extent","id","itemControl","modified","owner","tags","categories","type","typeKeywords","thumbnail","url","orgId"].forEach((e=>{t.push({entityKey:e,storeKey:`item.${e}`})})),["display","geometry","view","associations","catalogs","assistant"].forEach((e=>{t.push({entityKey:e,storeKey:`data.${e}`})})),e.forEach((e=>{t.push({entityKey:e,storeKey:`resources.${e}`})})),t.push({entityKey:"slug",storeKey:"item.properties.slug"}),t.push({entityKey:"summary",storeKey:"item.snippet"}),t.push({entityKey:"schemaVersion",storeKey:"item.properties.schemaVersion"}),t.push({entityKey:"orgUrlKey",storeKey:"item.properties.orgUrlKey"}),t.push({entityKey:"name",storeKey:"item.title"}),t.push({entityKey:"boundary",storeKey:"item.properties.boundary"}),t.push({entityKey:"location",storeKey:"item.properties.location"}),t.push({entityKey:"discussionSettings",storeKey:"entitySettings.settings.discussions"}),t.push({entityKey:"entitySettingsId",storeKey:"entitySettings.id"}),t}},850780:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});const n=e=>{const t=(e.slug||"").toLowerCase(),r=(e.orgUrlKey||"").toLowerCase();return r?t.replace(new RegExp(`${r}\\|`,"gi"),""):t}},370427:(e,t,r)=>{"use strict";r.d(t,{E:()=>m});
3var n=r(617665),i=r(622210),s=r(115474),o=r(254962),a=r(374940),c=r(702060),u=r(816783),l=r(228246),d=r(719271),p=r(507707),h=r(518944);const m=async(e,t)=>{var r,m,f;let g,y;const b=e._thumbnail,v=e._catalogSetup,w=e._metric,S=e._slug,E=null===(r=e.view)||void 0===r?void 0:r.featuredImage;delete e._groups,delete e._thumbnail,null===(m=e.view)||void 0===m||delete m.featuredImage,delete e._metric,delete e._catalogSetup,delete e._slug;let T=(0,p.kI)(e);if(T.orgUrlKey=e.orgUrlKey?e.orgUrlKey:t.portal.urlKey||"",T.orgUrlKey=T.orgUrlKey.toLowerCase(),T.extent=null===(f=e.location)||void 0===f?void 0:f.extent,T.slug=S?(0,i.Wl)(S,T.orgUrlKey):"",b&&(y=b.blob?{file:b.blob,filename:b.fileName,clear:!1}:{clear:!0}),E){let e=null;E.blob?e=await(0,o.E)(T.id,T.owner,E.blob,"featuredImage.png",t.userRequestOptions):await(0,
4a.o)(T.id,"featuredImage.png",t.userRequestOptions)&&await(0,c.q)(T.id,"featuredImage.png",T.owner,t.userRequestOptions),T.view=Object.assign(Object.assign({},T.view),{featuredImageUrl:e})}if(("newGroup"===(null==v?void 0:v.type)||"existingGroup"===(null==v?void 0:v.type)&&v.groupId)&&(T.catalog=await(async(e,t,r)=>{var n;let i=null===(n=t.groupId)||void 0===n?void 0:n[0];if("newGroup"===t.type){const t=Object.assign(Object.assign({},(0,u.o)("hubViewGroup",r)),{name:`${e.name} Content`});i=(await(0,l.LJ)(t,r)).id}return{schemaVersion:d.V,scopes:{item:{targetEntity:"item",filters:[{predicates:[{group:[i]}]}]},event:{targetEntity:"event",filters:[{predicates:[{group:[i]}]}]}},collections:[]}})(T,v,t),g=n.g.fromJson(T.catalog,t)),w&&Object.keys(w).length){const e=w.metricId||(0,p.Mc)((0,p._A)(`${w.cardTitle}_`)),{metric:t,displayConfig:r}=(0,s.A)(w,e,{metricName:w.cardTitle});T=function(e,t,r){const n=(0,p.kI)(e),i=t.id,s=(0,h.t)(n,"metrics",[]),o=s.findIndex((e=>e.id===i)),a=(0,h.t)(n,"view.metricDisplays",[]),c=a.findIndex((e=>e.metricId===i));return o>-1?s[o]=t:s.push(t),c>-1?a[c]=r:a.push(r),n.view.metricDisplays=a,n.metrics=s,n}(T,t,r)}return Object.assign(Object.assign({entity:T},y&&{thumbnailCache:y}),g&&{_catalog:g})}},972551:(e,t,r)=>{"use strict";function n(e,t,r){const n={slug:"",orgUrlKey:"",typeKeywords:[]};return n.orgUrlKey=t.toLowerCase(),e&&(t&&(e=e.replace(new RegExp(`${t.toLowerCase()}\\|`,"gi"),""),e=`${t}|${e}`),n.slug=e.toLowerCase()),n.typeKeywords=r.filter((e=>!e.startsWith("slug|"))),n.slug&&n.typeKeywords.push(`slug|${n.slug}`),n}r.d(t,{P:()=>n})},233076:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(170209);async function i(e,t){const r=await(0,n.tX)(e,t);return[...r.admin,...r.member,...r.other]}},258725:()=>{},762043:()=>{},877251:()=>{},460905:()=>{},172416:()=>{},817025:()=>{},529597:()=>{},934456:()=>{},594115:(e,t,r)=>{"use strict";r.r(t);var n=r(172416),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(762043);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(529597);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(817025);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(877251);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(460905);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i);var l=r(934456);i={};for(const e in l)"default"!==e&&(i[e]=()=>l[e]);r.d(t,i);var d=r(258725);i={};for(const e in d)"default"!==e&&(i[e]=()=>d[e]);r.d(t,i)},47957:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(480367),i=r(526462),s=r(185744);async function o(e,t,r,o={}){const a={identifier:e,isContained:!1},c={};(0,i.k)(e)||(0,n.l)(e)?c.id=e:c.typekeywords=`slug|${e}`;const u=[];if(o.entityType)if(t.scopes&&t.scopes[o.entityType])u.push({targetEntity:o.entityType,filters:[{predicates:[c]}]});else{const e=(t.collections||[]).filter((e=>e.targetEntity===o.entityType));if(!e.length)return Promise.resolve(a);e.forEach((e=>{u.push({targetEntity:e.targetEntity,filters:[{predicates:[c]},...e.scope.filters]})}))}else Object.keys(t.scopes).forEach((e=>{u.push({targetEntity:e,filters:[{predicates:[c]}]})}));const l=await Promise.all(u.map((e=>(t.scopes[e.targetEntity]&&(e.filters=[...e.filters,...t.scopes[e.targetEntity].filters]),(0,s.B)(e,{targetEntity:e.targetEntity,num:10,requestOptions:r.hubRequestOptions})))));return a.isContained=l.reduce(((e,t)=>(t.results.length&&(e=!!c.id||t.results.reduce(((e,t)=>(t.typeKeywords.includes(c.typekeywords)&&(e=!0),e)),!1)),e)),!1),a}},277810:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(264263),i=r(684290);async function s(e,t,r,s,o){let a=[];try{a=(0,i._)(r)}catch(t){return{identifier:e,isContained:!1,catalogInfo:{},duration:0,reason:(0,n.W)(t,"message")||"An error occurred while parsing path."}}return o&&(a=[...a,{id:"root",hubEntityType:"site",catalog:o}]),(0,i.h)(e,t,a,s)}},358637:(e,t,r)=>{"use strict";r.d(t,{t:()=>u});var n=r(40180),i=r(94684),s=r(264263),o=r(170209),a=r(348157),c=r(507707);const u=async(e,t,r)=>{const o=t.map(a.u),u=(0,n.e)("enrichment",o).filter(c.Tw);let d={};return u.length&&(d=await l(e,u,r)),o.forEach((t=>{(0,i.t)(t.prop,(0,s.W)(d,t.path),e)})),e},l=async(e,t,r)=>{const n=t.reduce(((e,t)=>{const r={followersGroup:d}[t];return r&&e.push({enrichment:t,operation:r}),e}),[]),i=n.map((({operation:t})=>t(e,r)));return(await Promise.all(i)).reduce(((e,t,r)=>(e[n[r].enrichment]=t,e)),{})},d=async(e,t)=>{let r={};try{const n=(0,s.W)(e,"followersGroupId");n&&(r=await(0,o.ex)(n,t))}catch(e){return{}}return r}},178491:(e,t,r)=>{"use strict";r.d(t,{z:()=>g});var n=r(617785),i=r(594309),s=r(643331),o=r(272997),a=r(112987),c=r(29258),u=r(874761),l=r(228246),d=r(367838),p=r(877440),h=r(292796),m=r(687934),f=r(339168);async function g(e,t,r){let g;switch(e){case"project":g=await(0,a.GG)(t,r.requestOptions);break;case"site":g=await(0,c.IN)(t,r.hubRequestOptions);break;case"initiative":g=await(0,s.AM)(t,r.requestOptions);break;
4case"discussion":g=await(0,n.d)(t,r.hubRequestOptions);break;case"channel":g=await(0,f.fetchHubChannel)(t,r);break;case"page":g=await(0,o.H6)(t,r.hubRequestOptions);break;case"content":g=await(0,i.J)(t,r.hubRequestOptions);break;case"template":g=await(0,u.Dv)(t,r.requestOptions);break;case"group":g=await(0,l.F)(t,r.hubRequestOptions);break;case"event":g=await(0,p.d)(t,r.hubRequestOptions);break;case"organization":g=await(0,m.Ak)(t,r.requestOptions);break;case"initiativeTemplate":g=await(0,d.cw)(t,r.requestOptions);break;case"user":g=await(0,h.W6)(t,r)}return g}},556342:(e,t,r)=>{"use strict";r.d(t,{q:()=>o});var n=r(109313),i=r(233076),s=r(841807);async function o(e,t){let r;return r="event"===(0,s.Q)(e)?await(0,n.g)(e.id,t):await(0,i.x)(e.id,t.requestOptions),r}},332180:(e,t,r)=>{"use strict";r.d(t,{h:()=>n});const n=e=>{var t;return(null===(t=e.links)||void 0===t?void 0:t.thumbnail)||e.thumbnailUrl}},972571:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(568008);function i(e){return(0,n.x)(e)}},251745:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(841807);function i(e){const t={type:e};return(0,n.Q)(t)}},563447:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(841807),i=r(629303);const s=(e,t,r)=>{let s="/";const o=(0,n.Q)({type:e});if((0,i.C)(o)){let e=o;"content"!==e&&(e=`${e}s`),s=`/workspace/${e}/${t}`,r&&(s+=`/${r}`)}return s}},841807:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});var n=r(704059);function i(e){let t;switch(e.type){case"Hub Site Application":case"Site Application":t="site";break;case"Hub Page":case"Site Page":t="page";break;case"Hub Project":t="project";break;case"Hub Initiative":t="initiative";break;case"Discussion":t="discussion";break;case"Solution":t="template";break;case"Channel":t="channel";break;case"Group":t="group";break;case"Hub Initiative Template":t="initiativeTemplate";break;case"Event":t="event";break;case"User":t="user";break;default:["app","content","dataset","document","map","feedback"].includes((0,n._)(e.type||""))&&(t="content")}return t}},575374:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});const n=e=>{let t=[];switch(e){case"site":t=["Hub Site Application","Site Application"];break;case"page":t=["Hub Page","Site Page"];break;case"project":t=["Hub Project"];break;case"initiative":t=["Hub Initiative"];break;case"discussion":t=["Discussion"];break;case"template":t=["Solution"];break;case"group":t=["Group"];break;case"initiativeTemplate":t=["Hub Initiative Template"]}return t}},453672:(e,t,r)=>{"use strict";r.d(t,{g:()=>s,j:()=>i});var n=r(507707);function i(e,t){const r="site"===e.type?"sites":"entities";let i=(0,n.kI)(t.entries);const s=i.filter((e=>"site"===e.type)),o=i.filter((e=>"site"!==e.type));return i="site"===e.type?s:o,i=i.filter((t=>t.id!==e.id)),i.length<{sites:10,entities:50}[r]||i.pop(),i.unshift(e),"site"===e.type?t.entries=[...i,...o]:t.entries=[...s,...i],t}function s(e,t){const r=(0,n.kI)(t);return r.entries=r.entries.filter((t=>t.id!==e.id)),r}},1195:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CatalogSchema:()=>a.rv,CollectionSchema:()=>a.Ok,DISCUSSION_SETTINGS_SCHEMA:()=>a.Oo,ENTERPRISE_SITE_ENTITY_NAME_SCHEMA:()=>a.nf,ENTITY_ACCESS_SCHEMA:()=>a.Ri,ENTITY_CATALOG_SETUP_SCHEMA:()=>a.D0,ENTITY_CATEGORIES_SCHEMA:()=>a.Zh,ENTITY_FEATURED_CONTENT_SCHEMA:()=>a.CR,ENTITY_IMAGE_SCHEMA:()=>a.W6,ENTITY_IS_DISCUSSABLE_SCHEMA:()=>a.PH,ENTITY_LOCATION_SCHEMA:()=>a.JK,ENTITY_MAP_SCHEMA:()=>a.xs,ENTITY_NAME_SCHEMA:()=>a.oG,ENTITY_SUMMARY_SCHEMA:()=>a.Z3,ENTITY_TAGS_SCHEMA:()=>a.Ld,ENTITY_TIMELINE_SCHEMA:()=>a.RF,FilterSchema:()=>a.eq,GalleryDisplayConfigSchema:()=>a.hM,PRIVACY_CONFIG_SCHEMA:()=>a.Vh,PredicateSchema:()=>a.tV,QuerySchema:()=>a.Cm,SITE_ENTITY_NAME_SCHEMA:()=>a.De,SLUG_SCHEMA:()=>a.g0,UiSchemaElementTypes:()=>a.JA,UiSchemaMessageTypes:()=>a.sz,UiSchemaRuleEffects:()=>a.pA,UiSchemaSectionTypes:()=>a.CK,fetchHubEntity:()=>c.z,getEditorConfig:()=>a.M2,getEntityGroups:()=>y.q,getEntityThumbnailUrl:()=>b.h,getEntityTypeFromHubEntityType:()=>w.w,getHubTypeFromItemType:()=>v.T,getRelativeWorkspaceUrl:()=>d.C,getTagItems:()=>a.x3,getTypeFromEntity:()=>u.Q,getTypesFromEntityType:()=>l.g,isValidEntityType:()=>p.C,processActionLink:()=>h.Q,processActionLinks:()=>h.i,setEntityAccess:()=>m.Z,shareEntityWithGroups:()=>f.z,unshareEntityWithGroups:()=>g._,validCardEditorTypes:()=>a.N4,validDiscussionSettingsEditorTypes:()=>a.$b,validEditorTypes:()=>a._o,validEntityEditorTypes:()=>a.AH,validEventGalleryCardEditorTypes:()=>a.BX,validFollowCardEditorTypes:()=>a.fV,validStatCardEditorTypes:()=>a.EB});var n=r(10620),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(288547);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(594115);i={};for(const e in o)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService","ExpressionRelationships","MAX_ENTITY_METRICS_ALLOWED","MAX_FEATURED_METRICS_ALLOWED","MetricVisibility","EntityResourceMap","EmbedKind"].indexOf(e)<0&&(i[e]=()=>o[e]);r.d(t,i);var a=r(202999),c=r(178491),u=r(841807),l=r(575374),d=r(563447),p=r(629303),h=r(760089),m=r(862078),f=r(225335),g=r(683657),y=r(556342),b=r(332180),v=r(251745),w=r(972571)},629303:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(618462);const i=e=>n.d.includes(e)},513903:(e,t,r)=>{"use strict";r.d(t,{Jc:()=>i,Zb:()=>s,_2:()=>o,hn:()=>n});const n={initiatives:"initiative",projects:"project",content:"content",events:"event",discussions:"discussion",sites:"site",apps:"content",surveys:"content",maps:"content",datasets:"c
4ontent",pages:"page"};function i(e){return Object.keys(n).find((t=>n[t]===e))||""}function s(e){return n[e]}function o(e){e&&e.startsWith("/")&&(e=e.slice(1));const t=e.split("/"),r={valid:!0,reason:"",parts:t};if(t.length%2!=0&&(r.valid=!1,r.reason="Path does not contain an even number of parts."),t.length>10&&(r.valid=!1,r.reason="Path is > 5 entities deep."),r.valid){const e=Object.keys(n);for(let n=0;n<t.length;n+=2)e.includes(t[n])||(r.valid=!1,r.reason=`Path contains invalid segment: ${t[n]}.`)}return r}},760089:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,i:()=>i});var n=r(185744);async function i(e,t){return await Promise.all(e.map((async e=>s(e,t))))}async function s(e,t){if("section"===e.kind&&(e.children=await i(e.children,t)),"content"!==e.kind)return e;try{const r={targetEntity:"item",filters:[{predicates:[{id:e.contentId}]}]},{results:i}=await(0,n.B)(r,{requestOptions:t});return delete e.contentId,Object.assign(Object.assign({},e),{kind:"external",href:i[0].links.siteRelative})}catch(t){throw new Error(`Unable to fetch entity: ${e.contentId}`)}}},2166:(e,t,r)=>{"use strict";r.d(t,{getEditorConfig:()=>u});var n=r(507707),i=r(861867);function s(e,t){const r=(0,n.kI)(e);return r.required&&(r.required=[...r.required].filter((e=>t.includes(e)))),r.properties&&Object.keys(r.properties).forEach((e=>{-1===t.indexOf(e)&&delete r.properties[e]})),r.allOf&&(r.allOf=r.allOf.map((e=>s(e,t)))),r.if&&(r.if=s(r.if,t)),r.then&&(r.then=s(r.then,t)),r.else&&(r.else=s(r.else,t)),r}function o(e,t){return s(e,function(e){return function(e,t){const r=[];return(0,i.c)(e,((e,t)=>("scope"===t.split(".").pop()&&r.push(e),e))),r.filter(n.Tw)}(e).map((e=>e.split("/")[2])).filter(n.Tw)}(t))}var a=r(622210);const c=(e,t)=>{var r;const i=(0,n.kI)(null===(r=e.properties)||void 0===r?void 0:r._slug);if(!i)return e;let{orgUrlKey:s}=t;s||(s=""),s=s.toLowerCase(),i.maxLength=(0,a.C5)(s);const o=(0,n.kI)(e.allOf)||[],{pattern:c}=i;delete i.pattern;const{id:u}=t;o.push({if:{properties:{_slug:{minLength:1}}},then:{properties:{_slug:{pattern:c}}}},{if:{properties:{_slug:{pattern:c}}},then:{properties:{_slug:{isUniqueSlug:{id:u,orgUrlKey:s}}}}});const l=(0,n.kI)(e);return l.properties._slug=i,l.allOf=o,l};async function u(e,t,i,s){return async function(e,t,i,s){let a,u,l;switch(t.split(":")[1]){case"site":{const{getSiteSchema:n}=await Promise.resolve().then(r.bind(r,385991));a=n(i.id,s);const o=await{"hub:site:edit":()=>r.e(64424).then(r.bind(r,664424)),"hub:site:create":()=>r.e(73355).then(r.bind(r,973355)),"hub:site:followers":()=>r.e(78025).then(r.bind(r,178025)),"hub:site:settings":()=>r.e(88071).then(r.bind(r,988071)),"hub:site:assistant":()=>r.e(52314).then(r.bind(r,452314)),"hub:site:settings:discussions":()=>r.e(39351).then(r.bind(r,939351))}[t]();u=await o.buildUiSchema(e,i,s),o.buildDefaults&&(l=await o.buildDefaults(e,i,s));break}case"discussion":{const{DiscussionSchema:o}=await Promise.resolve().then(r.bind(r,695369));a=(0,n.kI)(o);const c=await{"hub:discussion:edit":()=>r.e(43577).then(r.bind(r,643577)),"hub:discussion:create":()=>r.e(35695).then(r.bind(r,435695)),"hub:discussion:settings":()=>r.e(77032).then(r.bind(r,477032)),"hub:discussion:settings:discussions":()=>r.e(39351).then(r.bind(r,939351))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"channel":{const{ChannelSchema:o}=await Promise.resolve().then(r.bind(r,281646));a=(0,n.kI)(o);const c=await{"hub:channel:edit":()=>r.e(18083).then(r.bind(r,18083)),"hub:channel:create":()=>r.e(66877).then(r.bind(r,766877))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"project":{const{ProjectSchema:o}=await Promise.resolve().then(r.bind(r,665072));a=(0,n.kI)(o);const c=await{"hub:project:edit":()=>r.e(57957).then(r.bind(r,386048)),"hub:project:create":()=>r.e(26036).then(r.bind(r,826036)),"hub:project:create2":()=>r.e(93372).then(r.bind(r,293372)),"hub:project:metrics":()=>r.e(51685).then(r.bind(r,551685)),"hub:project:settings":()=>r.e(72251).then(r.bind(r,672251))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"initiative":{const{InitiativeSchema:o}=await Promise.resolve().then(r.bind(r,300564));a=(0,n.kI)(o);const c=await{"hub:initiative:edit":()=>r.e(66820).then(r.bind(r,566820)),"hub:initiative:create":()=>r.e(78117).then(r.bind(r,578117)),"hub:initiative:create2":()=>
4r.e(51113).then(r.bind(r,551113)),"hub:initiative:metrics":()=>r.e(65359).then(r.bind(r,470198)),"hub:initiative:associations":()=>r.e(52954).then(r.bind(r,552954)),"hub:initiative:settings":()=>r.e(66527).then(r.bind(r,766527))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"page":{const{PageSchema:o}=await Promise.resolve().then(r.bind(r,404216));a=(0,n.kI)(o);const c=await{"hub:page:edit":()=>r.e(78760).then(r.bind(r,178760)),"hub:page:create":()=>r.e(85901).then(r.bind(r,585901))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"content":{const{ContentSchema:o}=await Promise.resolve().then(r.bind(r,370632));a=(0,n.kI)(o);const c=await{"hub:content:edit":()=>r.e(52580).then(r.bind(r,952580)),"hub:content:settings":()=>r.e(83503).then(r.bind(r,483503)),"hub:content:settings:discussions":()=>r.e(39351).then(r.bind(r,939351)),"hub:content:settings:discussions:compact":()=>r.e(85262).then(r.bind(r,985262))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"template":{const{TemplateSchema:o}=await Promise.resolve().then(r.bind(r,119425));a=(0,n.kI)(o);const c=await{"hub:template:edit":()=>r.e(14155).then(r.bind(r,814155))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"group":{const{GroupSchema:o}=await Promise.resolve().then(r.bind(r,7375));a=(0,n.kI)(o);const c=await{"hub:group:create:followers":()=>r.e(28001).then(r.bind(r,428001)),"hub:group:create:association":()=>r.e(18321).then(r.bind(r,18321)),"hub:group:create:view":()=>r.e(7821).then(r.bind(r,807821)),"hub:group:create:edit":()=>r.e(57533).then(r.bind(r,857533)),"hub:group:create":()=>r.e(13554).then(r.bind(r,313554)),"hub:group:edit":()=>r.e(54329).then(r.bind(r,754329)),"hub:group:settings":()=>r.e(26887).then(r.bind(r,126887)),"hub:group:settings:discussions":()=>r.e(39351).then(r.bind(r,939351))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"event":{const n=await{"hub:event:create":()=>Promise.resolve().then(r.bind(r,157902)),"hub:event:edit":()=>r.e(33838).then(r.bind(r,933838)),"hub:event:registrants":()=>r.e(89197).then(r.bind(r,889197))}[t](),o=await{"hub:event:create":()=>r.e(54730).then(r.bind(r,654730)),"hub:event:edit":()=>r.e(58739).then(r.bind(r,58739)),"hub:event:registrants":()=>r.e(16017).then(r.bind(r,816017))}[t]();a=n.buildSchema(),u=await o.buildUiSchema(e,i,s);break}case"initiativeTemplate":{const{InitiativeTemplateSchema:o}=await Promise.resolve().then(r.bind(r,668220));a=(0,n.kI)(o);const c=await{"hub:initiativeTemplate:edit":()=>r.e(49228).then(r.bind(r,949228))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"user":{const{UserSchema:o}=await Promise.resolve().then(r.bind(r,287534));a=(0,n.kI)(o);const c=await{"hub:user:settings":()=>r.e(47232).then(r.bind(r,947232))}[t]();u=await c.buildUiSchema(e,i,s),c.buildDefaults&&(l=await c.buildDefaults(e,i,s));break}case"card":{const c=await async function(e,t,i,s){const a=function(e){return e&&e.split(":")[2]}(t);let c,u,l,d,p;switch(a){case"stat":l=Promise.resolve().then(r.bind(r,494067)),d={"hub:card:stat":()=>r.e(16683).then(r.bind(r,616683))}[t],await Promise.all([l,d()]).then((async([t,r])=>{const{MetricSchema:o}=t;c=(0,n.kI)(o),u=await r.buildUiSchema(e,i,s),r.buildDefaults&&(p=r.buildDefaults(e,i,s))}));break;case"follow":l=r.e(3305).then(r.bind(r,703305)),d={"hub:card:follow":()=>r.e(96454).then(r.bind(r,296454))}[t],await Promise.all([l,d()]).then((([t,r])=>{const{FollowSchema:o}=t;c=(0,n.kI)(o),u=r.buildUiSchema(e,i,s)}));break;case"eventGallery":l=r.e(37052).then(r.bind(r,237052)),d=r.e(15816).then(r.bind(r,715816));const[{EventGalleryCardSchema:o},{buildUiSchema:a}]=await Promise.all([l,d]);c=(0,n.kI)(o),u=await a(e,i,s)}return c=o(c,u),Promise.resolve({schema:c,uiSchema:u})}(e,t,i,s);a=c.schema,u=c.uiSchema,l=c.defaults}}return a=o(a,u),a=c(a,i),Promise.resolve({schema:a,uiSchema:u,defaults:l})}(e,t,i,s)}},202999:(e,t,r)=>{"use strict";r.d(t,{rv:()=>h,Ok:()=>p,Oo:()=>s.Oo,nf:()=>s.nf,Ri:()=>s.Ri,D0:()=>s.D0,Zh:()=>s.Zh,CR:()=>s.CR,W6:()=>s.W6,PH:()=>s.PH,JK:()=>s.JK,xs:()=>s.xs,oG:()=>s.oG,Z3:()=>s.Z3,Ld:()=>s.Ld,RF:()=>s.RF,eq:()=>l,hM:()=>c,Vh:()=>s.Vh,tV:()=>u,Cm:()=>d,De:()=>s.De,g0:()=>s.g0,JA:()=>n.JA,sz:()=>n.sz,pA:()=>n.pA,CK:()=>n.CK,M2:()=>i.getEditorConfig,x3:()=>m.x,N4:()=>n.N4,$b:()=>n.$b,_o:()=>n._o,AH:()=>n.AH,BX:()=>n.BX,fV:()=>n.fV,EB:()=>n.EB});var n=r(268855),i=r(2166),s=r(167420),o=r(615680),a=r(666772);const c={type:"object",properties:{hidden:{type:"boolean",default:!1},layout:{type:"string",enum:["grid","list","map","compact","table","calendar"],default:"list"},layouts:{type:"array",items:{type:"string",enum:["grid","list","map","compact","table","calendar"]},default:[]},cardTitleTag:{type:"string",enum:Object.keys(a.dN),default:a.dN.h3},imageType:{type:"string",enum:["thumbnail","icon"],default:"thumbnail"},showThumbnail:{type:"string",enum:["show","hide","grid"],default:"show"},corners:{type:"string",enum:Object.keys(a.Ne),default:a.Ne.square},shadow:{type:"string",enum:Object.keys(a.SB),default:a.SB.none},showLinkButton:{type:"boolean",default:!1},linkButtonStyle:{type:"string",enum:["outline","outline-filled"],default:"outline-filled"},linkButtonText:{type:"string",default:"Explore"},sort:{type:"string",enum:["relevance","title","created","modified"],default:"relevance"},filters:{type:"array",items:{type:"object",properties:{key:{type:"string",enum:["location","type","source","event-occurrence","event-from","event-attendance","tags","categories","license","modified","access","group-role","group-type","group-access","event-access","event-date"]},hidden:{type:"boolean"},label:{type:"string"}}}}}},u={type:"object",minProperties:1},l={type:"object",minProperties:1,properties:{operation:{type:"string",enum:["AND","OR"]},predicates:{type:"array",items:u,minItems:1}}},d={type:"object",required:["targetEntity"],properties:{targetEntity:{type:"string",enum:[...o.g]},filters:{type:"array",items:l,minItems:1}}},p={type:"object",required:["label"],properties:{label:{type:"string",format:"isNotWhitespace",maxLength:64},scope:d,displayConfig:c}},h={type:"object",properties:{title:{type:"string"},scopes:{type:"object",properties:o.g.reduce(((e,t)=>(e[t]=d,e)),{})},collections:{type:"array",items:p},displayConfig:{type:"object",properties:o.g.reduce(((e,t)=>(e[t]=c,e)),{})}}};var m=r(913175)},913175:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(170209);async function i(e,t,r){try{const i={q:`orgid:${t}`,countFields:"tags",countSize:200,authentication:r.authentication},s=await(0,n.KT)(i),[o]=s.aggregations.counts.map((e=>({mode:"terms",field:e.fieldName,values:e.fieldValues})));return[...new Set([...e||[],...o.values.map((e=>e.value))])].filter((e=>e)).map((e=>({value:e})))}catch(e){return[]}}},494067:(e,t,r)=>{"use strict";r.r(t),r.d(t,{MetricSchema:()=>s});var n=r(94485),i=r(666772);const s={type:"object",required:[],properties:{type:{type:"string",enum:Object.keys(n.Hx),default:n.Hx.dynamic},cardTitle:{type:"string"},value:{},valueType:{type:"string",default:"string",enum:["string","number","date"]},dynamicMetric:{type:"object"},allowUnitFormatting:{type:"boolean",default:!1},unit:{type:"string"},unitPosition:{type:"string",default:n.le.after,enum:Object.keys(n.le)},serverTimeout:{type:"number",maximum:95,minimum:5,default:10},subtitle:{type:"string"},trailingText:{type:"string"},textAlign:{type:"string",default:i.Eu.start},allowLink:{type:"boolean",default:!1},allowDynamicLink:{type:"boolean",default:!0},sourceLink:{type:"string"},sourceTitle:{type:"string"},valueColor:{type:"string"},layout:{type:"string",default:n.Cs.simple,enum:Object.keys(n.Cs)},dropShadow:{type:"string",default:i.SB.none,enum:Object.keys(i.SB)},icon:{type:"string",default:n.UZ.caretUp,enum:Object.values(n.UZ)},visualInterest:{type:"string",default:n.i5.none,enum:Object.keys(n.i5)},shareable:{type:"boolean",default:!1},shareableByValue:{type:"boolean",default:!1},shareableOnHover:{type:"boolean",default:!0},popoverText:{type:"string"},publisherText:{type:"string"}},allOf:[{$ref:"#/definitions/if-source-title-then-source-link"},{$ref:"#/definitions/value-type-value-mapping"},{$ref:"#/definitions/if-static-then-url-format"}],definitions:{"if-source-title-then-source-link":{if:{type:"object",properties:{sourceTitle:{not:{const:""}}},required:["sourceTitle"]},then:{required:["sourceLink"]}},"value-type-value-mapping":{if:{type:"object",properties:{valueType:{enum:["string","date"]}}},then:{type:"object",properties:{value:{type:"string"}}},else:{type:"object",properties:{value:{type:"number"}}}},"if-static-then-url-format":{if:{type:"object",properties:{type:{const:n.Hx.static}}},then:{type:"object",properties:{sourceLink:{format:"url"}}}}}}},925729:(e,t,r)=>{"use strict";r.d(t,{Jw:()=>o,No:()=>i,dM:()=>s,eS:()=>a});var n=r(94485);const i={if:{type:"object",properties:{_metric:{type:"object",properties:{type:{const:"static"}}}}},then:{type:"object",properties:{_metric:{type:"object",required:["value"]}}}},s={if:{type:"object",properties:{_metric:{type:"object",properties:{sourceTitle:{not:{const:""}}},required:["sourceTitle"]}}},then:{type:"object",properties:{_metric:{type:"object",required:["sourceLink"]}}}},o={if:{type:"object",properties:{_metric:{type:"object",properties:{valueType:{enum:["string","date"]}}}}},then:{type:"object",properties:{_metric:{type:"object",properties:{value:{type:"string"}}}}},else:{type:"object",properties:{_metric:{type:"object",properties:{value:{type:"number"}}}}}},a={if:{type:"object",properties:{_metric:{properties:{type:{const:n.Hx.static}}}}},then:{type:"object",properties:{_metric:{properties:{sourceLink:{format:"url"}}}}}}},94485:(e,t,r)=>{"use strict";var n,i,s,o,a,c;r.d(t,{Cs:()=>n,Hx:()=>c,UZ:()=>a,i5:()=>o,le:()=>s}),function(e){e.simple="simple",e.informational="informational"}(n||(n={})),function(e){e.small="s",e.medium="m",e.large="l"}(i||(i={})),function(e){e.before="before",e.after="after",e.below="below"}(s||(s={})),function(e){e.none="none",e.icon="icon"}(o||(o={})),function(e){e.caretUp="caret-up",e.caretDown="caret-down",e.caretDouble="caret-double-horizontal"}(a||(a={})),function(e){e.dynamic="dynamic",e.static="static",e.itemQuery="itemQuery"}(c||(c={}))},181794:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var n=r(505681),i=r(167420);const s={$async:!0,type:"object",required:["name"],properties:{name:i.oG,summary:i.Z3,description:{type:"string"},access:i.Ri,location:i.JK,tags:i.Ld,categories:i.Zh,isDiscussable:i.PH,discussionSettings:i.Oo,view:{type:"object",properties:{embeds:{type:"array"},featuredContentIds:i.CR,featuredImage:i.W6,featuredImageAltText:{type:"string"},featuredImageName:{type:"string"},mapSettings:i.xs,timeline:i.RF,hero:{type:"string",default:n.if.map,enum:Object.keys(n.if)},heroActions:{type:"array"}}}
4,assistant:{type:"object",required:["access","personality","description","location","examplePrompts"],properties:{schemaVersion:{type:"number"},enabled:{type:"boolean",default:!1},access:i.Ri,accessGroups:{type:"array",items:{type:"string"}},personality:{type:"string"},description:{type:"string"},location:{type:"string"},examplePrompts:{type:"array",items:{type:"string"}},workflows:{type:"array",items:{type:"object",properties:{key:{type:"string"},label:{type:"string"},description:{type:"string"},action:{type:"string",enum:["search","respond"]},response:{type:"string"},sources:{type:"array",items:{type:"string"}}}}},testPrompts:{type:"array",items:{type:"object",properties:{key:{type:"string"},label:{type:"string"}}}}}},_thumbnail:i.W6,_slug:i.g0,_followers:{type:"object",properties:{groupAccess:Object.assign(Object.assign({},i.Ri),{enum:["private","org","public"]}),showFollowAction:{type:"boolean",default:!0},isDiscussable:i.PH}},_associations:{type:"object",properties:{groupAccess:Object.assign(Object.assign({},i.Ri),{enum:["private","org","public"],default:"private"}),membershipAccess:{type:"string",enum:["organization","collaborators","anyone"],default:"organization"}}},_catalogSetup:i.D0}}},666772:(e,t,r)=>{"use strict";var n,i,s,o;r.d(t,{Eu:()=>n,Ne:()=>i,SB:()=>s,dN:()=>o}),function(e){e.start="start",e.center="center",e.end="end"}(n||(n={})),function(e){e.square="square",e.round="round"}(i||(i={})),function(e){e.none="none",e.low="low",e.medium="medium",e.heavy="heavy"}(s||(s={})),function(e){e.h1="h1",e.h2="h2",e.h3="h3",e.h4="h4",e.h5="h5",e.h6="h6"}(o||(o={}))},167420:(e,t,r)=>{"use strict";r.d(t,{CR:()=>h,D0:()=>w,De:()=>s,JK:()=>m,Ld:()=>u,Oo:()=>p,PH:()=>d,RF:()=>y,Ri:()=>c,Vh:()=>b,W6:()=>g,Z3:()=>a,Zh:()=>l,g0:()=>v,nf:()=>o,oG:()=>i,xs:()=>f});var n=r(98446);const i={type:"string",minLength:1,maxLength:250,format:"entityTitleValidator"},s={type:"string",minLength:1,maxLength:250,format:"siteEntityTitleValidator"},o={type:"string",minLength:1,maxLength:240,format:"siteEntityTitleValidator"},a={type:"string",maxLength:2048},c={type:"string",enum:["public","org","private"],default:"private"},u={type:"array",items:{type:"string"}},l={type:"array",items:{type:"string"},maxItems:20},d={type:"boolean",enum:[!0,!1],default:!0},p={type:"object",properties:{allowedChannelIds:{type:"array",items:{type:"string"}},allowedLocations:{type:"array",items:{type:"object"}}}},h={type:"array",maxItems:4,items:{type:"string"}},m={type:"object",default:{type:"none"},properties:{type:{type:"string",enum:["none","org","custom"],default:"none"},name:{type:"string"}}},f={type:"object",properties:{baseViewItemId:{type:"array",items:{type:"string"},maxItems:1}}},g={type:"object",properties:{base64:{type:"string"},format:{type:"string"},fileName:{type:"string"},blob:{type:"object",properties:{type:{type:"string"},size:{type:"number"}}},url:{type:"string"}}},y={type:"object",properties:{title:{type:"string"},description:{type:"string"},canCollapse:{type:"boolean"},stages:{type:"array",items:{type:"object",required:["title"],properties:{title:{type:"string",minLength:1},timeframe:{type:"string"},stageDescription:{type:"string"},status:{type:"string"},link:{type:"object",properties:{href:{type:"string"},title:{type:"string"}}}}}}}},b={type:"object",properties:{consentNotice:{type:"object",properties:{allowPrivacyConfig:{type:"boolean",default:!1},blocking:{type:"boolean",default:!1},disclaimer:{type:"array",items:[{type:"object",properties:{text:{type:"string"},lang:{type:"string"},default:{type:"boolean"}}}]},policyURL:{type:"string",pattern:"^(https?:\\/\\/)?([\\da-z.-]+)\\.([a-z.]{2,6})([\\/\\w.-]*)*\\/?$|^$"}}}}},v={type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$"},w={type:"object",properties:{type:{type:"string",enum:[...n.N],default:"blank"},groupId:{type:"array",maxItems:1,items:{type:"string"}}},allOf:[{if:{required:["type"],properties:{type:{const:"existingGroup"}}},then:{required:["groupId"]}}]}},268855:(e,t,r)=>{"use strict";r.d(t,{$b:()=>v,AH:()=>f,BX:()=>b,CK:()=>I,EB:()=>g,JA:()=>T,N4:()=>w,_o:()=>S,fV:()=>y,pA:()=>E,sz:()=>C});var n=r(665072),i=r(300564),s=r(385991),o=r(695369),a=r(404216),c=r(370632),u=r(119425),l=r(7375),d=r(668220),p=r(157902),h=r(287534),m=r(281646);const f=[...n.A,...c.E,...i.s,...s.r,...o.S,...a.X,...u.I,...l.v,...d.g,...p.EventEditorTypes,...h.q,...m.J],g=["hub:card:stat"],y=["hub:card:follow"],b=["hub:card:eventGallery"],v=["hub:discussion:settings:discussions","hub:site:settings:discussions","hub:content:settings:discussions","hub:content:settings:discussions:compact","hub
4:group:settings:discussions"],w=[...g,...y,...b],S=[...f,...w];var E,T,I,C;!function(e){e.SHOW="SHOW",e.HIDE="HIDE",e.DISABLE="DISABLE",e.ENABLE="ENABLE",e.NONE="",e.RESET="RESET"}(E||(E={})),function(e){e.section="Section",e.control="Control",e.layout="Layout",e.slot="Slot",e.notice="Notice",e.text="Text"}(T||(T={})),function(e){e.accordion="accordion",e.accordionItem="accordionItem",e.block="block",e.stepper="stepper",e.step="step",e.subblock="subblock",e.card="card"}(I||(I={})),function(e){e.error="ERROR",e.success="SUCCESS",e.custom="CUSTOM"}(C||(C={}))},862078:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(170209),i=r(841807),s=r(590317);async function o(e,t,r){switch((0,i.Q)(e)){case"event":await(0,s.eJ)(Object.assign({eventId:e.id,data:{access:t.toUpperCase()}},r.hubRequestOptions));break;case"group":await(0,n.mD)({group:{id:e.id,access:t},authentication:r.session});break;default:await(0,n.zT)({id:e.id,access:t,owner:e.owner,authentication:r.session})}}},225335:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(754423),i=r(841807),s=r(558871);async function o(e,t,r){let o;return"event"===(0,i.Q)(e)?o=await(0,n.g)(t,e,r):(o=e,await(0,s.L)(e.id,t,r.requestOptions,e.owner)),o}},674519:()=>{},390570:()=>{},73326:()=>{},822272:()=>{},519033:()=>{},968506:()=>{},145566:()=>{},471007:()=>{},69388:()=>{},890162:()=>{},10620:(e,t,r)=>{"use strict";r.r(t);var n=r(390570),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(73326);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(145566);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(69388);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(471007);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(822272);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i);var l=r(890162);i={};for(const e in l)"default"!==e&&(i[e]=()=>l[e]);r.d(t,i);var d=r(519033);i={};for(const e in d)"default"!==e&&(i[e]=()=>d[e]);r.d(t,i);var p=r(674519);i={};for(const e in p)"default"!==e&&(i[e]=()=>p[e]);r.d(t,i);var h=r(968506);i={};for(const e in h)"default"!==e&&(i[e]=()=>h[e]);r.d(t,i)},571324:()=>{},762113:()=>{},548763:(e,t,r)=>{"use strict";var n;r.d(t,{W:()=>n}),function(e){e.app="app",e.map="map",e.feedback="feedback",e.external="external"}(n||(n={}))},445190:()=>{},746466:()=>{},618462:(e,t,r)=>{"use strict";r.d(t,{T:()=>n,d:()=>i});const n=["content","initiative","initiativeTemplate","page","project","site","survey","template"],i=[...n,"discussion","event","group","org","organization","user","channel"]},714306:()=>{},118136:()=>{},620392:()=>{},185717:(e,t,r)=>{"use strict";var n;r.d(t,{y:()=>n}),function(e){e.CitationContact="metadata.resource.citation.contact",e.ResourceContact="metadata.resource.contact",e.MetadataContact="metadata.contact",e.ItemOwner="item.owner",e.None="none"}(n||(n={}))},13610:()=>{},348523:()=>{},945891:()=>{},830375:()=>{},215828:()=>{},364711:()=>{},658570:()=>{},545148:()=>{},826977:()=>{},954266:()=>{},757551:()=>{},637096:()=>{},994035:()=>{},867431:()=>{},829923:()=>{},467548:()=>{},852907:()=>{},336338:()=>{},396321:()=>{},326182:()=>{},336226:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>n}),function(e){e.notStarted="notStarted",e.inProgress="inProgress",e.skipped="skipped",e.onHold="onHold",e.complete="complete"}(n||(n={}))},861521:()=>{},373617:()=>{},150879:()=>{},1218:()=>{},652669:()=>{},360630:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});const n=["portal","discussions","events","metrics","notifications","hub-search","domains","hub-downloads","hub-ai-assistant"];function i(e){return n.includes(e)}},277309:()=>{},935945:(e,t,r)=>{"use strict";var n,i;r.d(t,{A_:()=>o,NX:()=>s,Q$:()=>i,TS:()=>n}),function(e){e.BETWEEN="between",e.IS_EXACTLY="isExactly",e.LIKE="like"}(n||(n={})),function(e){e.visible="visible",e.hidden="hidden",e.featured="featured"}(i||(i={}));const s=24,o=4},288547:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EmbedKind:()=>B.W,EntityResourceMap:()=>L.P,ExpressionRelationships:()=>G.TS,HUB_ENTITY_TYPES:()=>c.d,HUB_ITEM_ENTITY_TYPES:()=>c.T,MAX_ENTITY_METRICS_ALLOWED:()=>G.NX,MAX_FEATURED_METRICS_ALLOWED:()=>G.A_,MetricVisibility:()=>G.Q$,PublisherSource:()=>l.y,TIMELINE_STAGE_STATUSES:()=>k.Z,isHubService:()=>j.S});var n=r(571324),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(762113);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(445190);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(746466);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(618462),u=r(714306);i={};for(const e in u)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES"].indexOf(e)<0&&(i[e]=()=>u[e]);r.d(t,i);var l=r(185717),d=r(13610);i={};for(const e in d)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>d[e]);r.d(t,i);var p=r(348523);i={};for(const e in p)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>p[e]);r.d(t,i);var h=r(945891);i={};for(const e in h)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>h[e]);r.d(t,i);var m=r(830375);i={};for(const e in m)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>m[e]);r.d(t,i);var f=r(215828);i={};for(const e in f)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>f[e]);r.d(t,i);var g=r(620392);i={};for(const e in g)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>g[e]);r.d(t,i);var y=r(364711);i={};for(const e in y)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>y[e]);r.d(t,i);var b=r(658570);i={};for(const e in b)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>b[e]);r.d(t,i);var v=r(545148);i={};for(const e in v)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>v[e]);r.d(t,i);var w=r(826977);i={};for(const e in w)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>w[e]);r.d(t,i);var S=r(954266);i={};for(const e in S)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>S[e]);r.d(t,i);var E=r(757551);i={};for(const e in E)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>E[e]);r.d(t,i);var T=r(637096);i={};for(const e in T)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>T[e]);r.d(t,i);var I=r(994035);i={};for(const e in I)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>I[e]);r.d(t,i);var C=r(867431);i={};for(const e in C)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>C[e]);r.d(t,i);var A=r(829923);i={};for(const e in A)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>A[e]);r.d(t,i);var O=r(467548);i={};for(const e in O)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>O[e]);r.d(t,i);var _=r(326182);i={};for(const e in _)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>_[e]);r.d(t,i);var D=r(336338);i={};for(const e in D)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>D[e]);r.d(t,i);var P=r(396321);i={};for(const e in P)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>P[e]);r.d(t,i);var k=r(336226),x=r(852907);i={};for(const e in x)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>x[e]);r.d(t,i);var R=r(373617);i={};for(const e in R)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>R[e]);r.d(t,i);var U=r(150879);i={};
4for(const e in U)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>U[e]);r.d(t,i);var M=r(1218);i={};for(const e in M)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>M[e]);r.d(t,i);var N=r(652669);i={};for(const e in N)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>N[e]);r.d(t,i);var j=r(360630),$=r(277309);i={};for(const e in $)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService"].indexOf(e)<0&&(i[e]=()=>$[e]);r.d(t,i);var F=r(118136);i={};for(const e in F)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService"].indexOf(e)<0&&(i[e]=()=>F[e]);r.d(t,i);var G=r(935945),L=r(858689),H=r(861521);i={};for(const e in H)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService","ExpressionRelationships","MAX_ENTITY_METRICS_ALLOWED","MAX_FEATURED_METRICS_ALLOWED","MetricVisibility","EntityResourceMap"].indexOf(e)<0&&(i[e]=()=>H[e]);r.d(t,i);var B=r(548763)},858689:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n={location:"location.json"}},683657:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var n=r(410282),i=r(841807),s=r(232982);async function o(e,t,r){let o;return"event"===(0,i.Q)(e)?o=await(0,n.c)(t,e,r):(o=e,await(0,s.z)(e.id,t,r.requestOptions,e.owner)),o}},457530:(e,t,r)=>{"use strict";r.d(t,{T:()=>h});var n=r(443011),i=r(673084),s=r(643331),o=r(619333),a=r(29258),c=r(272997),u=r(682853),l=r(201091),d=r(449739),p=r(228246);const h=async(e,t,r)=>{let h;switch(e){case"project":h=await(0,o.t)(t,r.userRequestOptions);break;case"site":h=await(0,a.L3)(t,r.hubRequestOptions);break;case"initiative":h=await(0,s.xy)(t,r.userRequestOptions);break;case"discussion":h=await(0,i.updateDiscussion)(t,r.hubRequestOptions);break;case"content":h=await(0,n.updateContent)(t,r.hubRequestOptions);break;case"page":h=await(0,c.T$)(t,r.userRequestOptions);break;case"template":h=await(0,l.QB)(t,r.userRequestOptions);break;case"initiativeTemplate":h=await(0,u.w4)(t,r.userRequestOptions);break;case"group":h=await(0,p.q7)(t,r);break;case"event":h=await(0,d.updateHubEvent)(t,r.hubRequestOptions)}return h}},378873:(e,t,r)=>{"use strict";r.d(t,{G:()=>d});var n=r(215249),i=r(110571),s=r(617785),o=r(2166),a=r(507707),c=r(358637),u=r(850780),l=r(622210);class d extends i.x{static fromJson(e,t){const r=this.applyDefaults(e,t);return new d(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=d.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,s.d)(e,t.hubRequestOptions);return d.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Discussion not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},n.O8),e)}update(e){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");if(this.entity.id){const{updateDiscussion:e}=await Promise.resolve().then(r.bind(r,673084));this.entity=await e(this.entity,this.context.hubRequestOptions)}else{const{createDiscussion:e}=await Promise.resolve().then(r.bind(r,673084));this.entity=await e(this.entity,this.context.hubRequestOptions)}await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");const{deleteDiscussion:e}=await Promise.resolve().then(r.bind(r,673084));this.isDestroyed=!0,await e(this.entity.id,this.context.hubRequestOptions)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,c.t)((0,a.kI)(this.entity),t,this.context.hubRequestOptions):(0,a.kI)(this.entity);return r._slug=(0,u.y)(this.entity),r}async fromEditor(e){var t;const r=e._thumbnail,n=e._slug;delete e._thumbnail,delete e._slug;const i=(0,a.kI)(e);return i.orgUrlKey=e.orgUrlKey?e.orgUrlKey:this.context.portal.urlKey||"",i.orgUrlKey&&(i.orgUrlKey=i.orgUrlKey.toLowerCase()),i.extent=null===(t=e.location)||void 0===t?void 0:t.extent,i.slug=n?(0,l.Wl)(n,i.orgUrlKey):"",r&&(r.blob?this.thumbnailCache={file:r.blob,filename:r.fileName,clear:!1}:this.thumbnailCache={clear:!0}),this.entity=i,await this.save(),this.entity}}},695369:(e,t,r)=>{"use strict";r.d(t,{DiscussionSchema:()=>s,S:()=>i});var n=r(181794);
4const i=["hub:discussion:edit","hub:discussion:create","hub:discussion:settings","hub:discussion:settings:discussions"],s=Object.assign(Object.assign({},n.N),{required:["name"],properties:Object.assign(Object.assign({},n.N.properties),{prompt:{type:"string",default:"",maxLength:150}})})},792090:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(560133),i=r(471934),s=r(215249),o=r(972551),a=r(507707);function c(e,t,r){let c;return r.authentication&&(c=r.authentication.token),(t=(0,i.k)(e.item,t)).thumbnailUrl=(0,n.S)(e.item,r,c),function(e){if(e.schemaVersion===s.A5)return e;const t=function(e){if(e.schemaVersion>=1.1)return e;const t=(0,a.kI)(e),{slug:r,orgUrlKey:n,typeKeywords:i}=(0,o.P)(t.slug||"",t.orgUrlKey||"",t.typeKeywords||[]);return t.slug=r,t.orgUrlKey=n,t.typeKeywords=i,t.schemaVersion=1.1,t}(e);return t}(t)}},795045:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)();return e.push({entityKey:"prompt",storeKey:"data.prompt"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e}},710705:(e,t,r)=>{"use strict";r.d(t,{$6:()=>d,BP:()=>g,KD:()=>w,OG:()=>u,Of:()=>l,Rq:()=>b,Rt:()=>S,TA:()=>h,U4:()=>s,Ww:()=>m,fA:()=>f,fu:()=>p,kI:()=>a,mi:()=>o,pW:()=>c,r6:()=>i,sD:()=>y,y6:()=>v});var n=r(431560);function i(e){return e.httpMethod="GET",(0,n.e)("/channels",e)}function s(e){return e.httpMethod="GET",(0,n.J)("/channels",e)}function o(e){return e.httpMethod="POST",(0,n.e)("/channels",e)}function a(e){return e.httpMethod="GET",(0,n.e)(`/channels/${e.channelId}`,e)}function c(e){return e.httpMethod="PATCH",(0,n.e)(`/channels/${e.channelId}`,e)}function u(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}`,e)}function l(e){return e.httpMethod="GET",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function d(e){return e.httpMethod="POST",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function p(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function h(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}/activity`,e)}function m(e){return e.httpMethod="POST",(0,n.J)("/channels",e)}function f(e){return e.httpMethod="GET",(0,n.J)(`/channels/${e.channelId}`,e)}function g(e){return e.httpMethod="PATCH",(0,n.J)(`/channels/${e.channelId}`,e)}function y(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}`,e)}function b(e){return e.httpMethod="GET",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function v(e){return e.httpMethod="POST",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function w(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function S(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}/activity`,e)}},431560:(e,t,r)=>{"use strict";r.d(t,{e:()=>u,J:()=>l});var n=r(5828),i=r(313621),s=r(211472);class o extends i.m{constructor(e,t,r,n){super(e,t,r),this.error=n}}function a(e){const{token:t,authentication:r}=e;let n=()=>Promise.resolve(t);return r&&(n=r.getToken.bind(r,r.portal)),n()}function c(e,t,r,i){var a;let c=e;const u=new Headers(t.headers);u.append("Content-Type","application/json"),i&&u.append("Authorization",`Bearer ${i}`);const l={headers:u,method:t.httpMethod||"GET",mode:t.mode,cache:t.cache,credentials:t.credentials},d=(0,n.Q)({host:t.hubApiUrl||"https://hub.arcgis.com",path:`/api/discussions/${r}`});t.data&&("GET"===t.httpMethod?c+=`?${new URLSearchParams(t.data).toString()}`:l.body=JSON.stringify(t.data));const p=["/posts","/posts/search"].includes(e)&&((null===(a=t.data)||void 0===a?void 0:a.f)===s.Fr.CSV||"text/csv"===u.get("Accept")),h=[d.replace(/\/$/,""),c.replace(/^\//,"")].join("/");return fetch(h,l).then((e=>{if(e.ok)return p?e.text():e.json();{const{statusText:t,status:r}=e;return e.json().then((e=>{throw new o(t,h,r,JSON.stringify(e.message))}))}}))}function u(e,t){return a(t).then((r=>c(e,t,"v1",r)))}function l(e,t){return a(t).then((r=>c(e,t,"v2",r)))}},934864:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(211472);const i={discussions:{allowedChannelIds:null,allowedLocations:null}},s={discussion:{type:n.qF.CONTENT,settings:Object.assign({},i)},site:null,project:null,initiative:null,initiativeTemplate:null,page:null,content:{type:n.qF.CONTENT,settings:Object.assign({},i)},organization:null,org:null,group:{type:n.qF.GROUP,settings:Object.assign({},i)},template:null,survey:null,event:null,user:null,channel:null};function o(e){if(!s[e])throw new Error(`no default entity settings defined for ${e}`);return{type:s[e].type,settings:Object.assign({},s[e].settings)}}},223040:(e,t,r)=>{"use strict";r.d(t,{Fn:()=>u,SK:()=>l,Wf:()=>a,fj:()=>i,hk:()=>d,j$:()=>s,m7:()=>o,qH:()=>c});var n=r(431560);function i(e){return e.httpMethod="POST",(0,n.e)("/settings",e)}function s(e){return e.httpMethod="GET",(0,n.e)(`/settings/${e.id}`,e)}function o(e){return e.httpMethod="PATCH",(0,n.e)(`/settings/${e.id}`,e)}function a(e){return e.httpMethod="DELETE",(0,n.e)(`/settings/${e.id}`,e)}function c(e){return e.httpMethod="POST",(0,n.J)("/settings",e)}function u(e){return e.httpMethod="GET",(0,n.J)(`/settings/${e.id}`,e)}function l(e){return e.httpMethod="PATCH",(0,n.J)(`/settings/${e.id}`,e)}function d(e){return e.httpMethod="DELETE",(0,n.J)(`/settings/${e.id}`,e)}},211472:(e,t,r)=>{"use strict";var n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S;r.d(t,{$4:()=>o,As:()=>n,B8:()=>w,Fr:()=>h,H_:()=>f,Iw:()=>s,LY:()=>y,Og:()=>a,RI:()=>v,Uz:()=>b,ZK:()=>u,hQ:()=>g,jF:()=>p,nF:()=>l,p2:()=>c,qF:()=>S,uU:()=>m,ww:()=>d,y4:()=>i}),function(e){e.ASC="ASC",e.DESC="DESC"}(n||(n={})),function(e){e.CLAPPING_HANDS="clapping_hands",e.CONFUSED="confused",e.DOWN_ARROW="down_arrow",e.EYES="eyes",e.FACE_WITH_TEARS_OF_JOY="face_with_tears_of_joy",e.FIRE="fire",e.GRINNING="grinning",e.HEART="heart",e.LAUGH="laugh",e.ONE_HUNDRED="one_hundred",e.PARTYING="partying",e.PARTY_POPPER="party_popper",e.RAISING_HANDS="raising_hands",e.ROCKET="rocket",e.SAD="sad",e.SLIGHTLY_SMILING="slightly_smiling",e.SURPRISED="surprised",e.THINKING="thinking",e.THUMBS_UP="thumbs_up",e.THUMBS_DOWN="thumbs_down",e.TROPHY="trophy",e.UP_ARROW="up_arrow",e.WAVING_HAND="waving_hand",e.WINKING="winking",e.WORLD_MAP="world_map"}(i||(i={})),function(e){e.PUBLIC="public",e.ORG="org",e.PRIVATE="private"}(s||(s={})),function(e){e.PENDING="pending",e.APPROVED="approved",e.REJECTED="rejected",e.DELETED="deleted",e.HIDDEN="hidden",e.BLOCKED="blocked"}(o||(o={})),function(e){e.GROUP="group",e.CONTENT="content",e.BOARD="board"}(a||(a={})),function(e){e.HUB="hub",e.AGO="ago",e.URBAN="urban"}(c||(c={}
4)),function(e){e.REPLIES="replies",e.REPLY_COUNT="replyCount",e.REACTIONS="reactions",e.PARENT="parent",e.CHANNEL="channel",
5e.CHANNEL_ACL="channelAcl"}(u||(u={})),function(e){e.POST="post"}(l||(l={})),function(e){e.HAS_USER_POSTS="has_user_posts"}(d||(d={})),function(e){e.CREATED_AT="createdAt",e.CREATOR="creator",e.EDITOR="editor",e.ID="id",e.UPDATED_AT="updatedAt"}(p||(p={})),function(e){e.CSV="csv",e.JSON="json"}(h||(h={})),function(e){e.READ="read",e.WRITE="write",e.READWRITE="readWrite",e.MODERATE="moderate",e.MANAGE="manage",e.OWNER="owner"}(m||(m={})),function(e){e.BODY="body",e.CHANNEL_ID="channelId",e.CREATED_AT="createdAt",e.CREATOR="creator",e.DISCUSSION="discussion",e.EDITOR="editor",e.ID="id",e.PARENT_ID="parentId",e.STATUS="status",e.TITLE="title",e.UPDATED_AT="updatedAt"}(f||(f={})),function(e){e.Text="text",e.Announcement="announcement",e.Poll="poll",e.Question="question"}(g||(g={})),function(e){e.ACCESS="access",e.CREATED_AT="createdAt",e.CREATOR="creator",e.EDITOR="editor",e.ID="id",e.LAST_ACTIVITY="last_activity",e.UPDATED_AT="updatedAt"}(y||(y={})),function(e){e.CHANNEL_ACL="channelAcl"}(b||(b={})),function(e){e.ANONYMOUS_USER="anonymousUser",e.AUTHENTICATED_USER="authenticatedUser",e.GROUP="group",e.ORG="org",e.USER="user"}(v||(v={})),function(e){e.ADMIN="admin",e.MEMBER="member"}(w||(w={})),function(e){e.CONTENT="content",e.GROUP="group"}(S||(S={}))},324738:(e,t,r)=>{"use strict";r.d(t,{P:()=>c,G:()=>u});var n,i=r(211472),s=r(568048),o=r(989593),a=r(898348);!function(e){e.READ_POSTS="readPosts",e.WRITE_POSTS="writePosts",e.MODERATE_CHANNEL="moderateChannel",e.DELETE_CHANNEL="deleteChannel",e.IS_MODERATOR="isModerator",e.IS_MANAGER="isManager",e.IS_OWNER="isOwner"}(n||(n={}));const c={UPDATE_OWNERS:[i.uU.OWNER],UPDATE_MANAGERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_MODERATORS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_ORGS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_GROUPS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_AUTHENTICATED_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_ANONYMOUS_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_POST_REPLIES:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_POST_REACTIONS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_POST_AS_ANONYMOUS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_ALLOWED_REACTIONS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_DEFAULT_POST_STATUS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_BLOCKED_WORDS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_CHANNEL_NAME:[i.uU.OWNER,i.uU.MANAGE],UPDATE_SOFT_DELETE_SETTING:[i.uU.OWNER,i.uU.MANAGE]};class u{constructor(e){if(this.ALLOWED_GROUP_MEMBER_TYPES=["owner","admin","member"],void 0===e.channelAcl)throw new Error("channel.channelAcl is required for ChannelPermission checks");this.existingChannel=e,this.isChannelAclEmpty=0===e.channelAcl.length,this.permissionsByCategory={},e.channelAcl.forEach((e=>{var t;const{category:r}=e;(null===(t=this.permissionsByCategory[r])||void 0===t?void 0:t.push(e))||(this.permissionsByCategory[r]=[e])}))}deriveUserRole(e){return this.determineUserRole(e)}canPostToChannel(e){return!!this.canAnyUser(n.WRITE_POSTS)||!this.isUserUnAuthenticated(e)&&(this.canAnyAuthenticatedUser(n.WRITE_POSTS)||this.canSomeUser(n.WRITE_POSTS,e)||this.canSomeUserGroup(n.WRITE_POSTS,e)||this.canSomeUserOrg(n.WRITE_POSTS,e))}canCreateChannel(e){return!this.isUserUnAuthenticated(e)&&!this.isChannelAclEmpty&&this.userCanAddAnonymousToAcl(e)&&this.userCanAddUnauthenticatedToAcl(e)&&this.userCanAddAllGroupsToAcl(e)&&this.userCanAddAllOrgsToAcl(e)&&this.userCanAddUsersToAcl(e)}canModerateChannel(e){return!this.isUserUnAuthenticated(e)&&(this.canSomeUser(n.MODERATE_CHANNEL,e)||this.canSomeUserGroup(n.MODERATE_CHANNEL,e)||this.canSomeUserOrg(n.MODERATE_CHANNEL,e))}canReadChannel(e){return!!this.canAnyUser(n.READ_POSTS)||!this.isUserUnAuthenticated(e)&&(this.canAnyAuthenticatedUser(n.READ_POSTS)||this.canSomeUser(n.READ_POSTS,e)||this.canSomeUserGroup(n.READ_POSTS,e)||this.canSomeUserOrg(n.READ_POSTS,e))}canDeleteChannel(e){return!this.isUserUnAuthenticated(e)&&(this.canSomeUser(n.DELETE_CHANNEL,e)||this.canSomeUserGroup(n.DELETE_CHANNEL,e)||this.canSomeUserOrg(n.DELETE_CHANNEL,e))}canUpdateProperties(e,t={}){if(0===Object.keys(t).length)return!0;const r=this.determineUserRole(e),n=function(e){const{channelAclDefinition:t}=e,r=(0,o._T)(e,["channelAclDefinition"]);return Object.assign(Object.assign({},r),{channelAcl:t})}(t);return!(this.isChanged(n.allowReply,this.existingChannel.allowReply)&&!c.UPDATE_POST_REPLIES.includes(r)||this.isChanged(n.allowReaction,this.existingChannel.allowReaction)&&!c.UPDATE_POST_REACTIONS.includes(r)||this.isChanged(n.allowAsAnonymous,this.existingChannel.allowAsAnonymous)&&!c.UPDATE_POST_AS_ANONYMOUS.includes(r)||this.isStringArrayChanged(n.allowedReactions,this.existingChannel.allowedReactions)&&!c.UPDATE_ALLOWED_REACTIONS.includes(r)||this.isChanged(n.defaultPostStatus,this.existingChannel.defaultPostStatus)&&!c.UPDATE_DEFAULT_POST_STATUS.includes(r)||this.isStringArrayChanged(n.blockWords,this.existingChannel.blockWords)&&!c.UPDATE_BLOCKED_WORDS.includes(r)||this.isChanged(n.name,this.existingChannel.name)&&!c.UPDATE_CHANNEL_NAME.includes(r)||this.isChanged(n.softDelete,this.existingChannel.softDelete)&&!c.UPDATE_SOFT_DELETE_SETTING.includes(r)||this.isRoleChanged(i.uU.OWNER,n.channelAcl)&&!c.UPDATE_OWNERS.includes(r)||this.isRoleChanged(i.uU.MANAGE,n.channelAcl)&&!c.UPDATE_MANAGERS.includes(r)||this.isRoleChanged(i.uU.MODERATE,n.channelAcl)&&!c.UPDATE_MODERATORS.includes(r)||this.isCategoryChanged(i.RI.ORG,n.channelAcl)&&!c.UPDATE_ORGS.includes(r)||this.isCategoryChanged(i.RI.GROUP,n.channelAcl)&&!c.UPDATE_GROUPS.includes(r)||this.isCategoryChanged(i.RI.USER,n.channelAcl)&&!c.UPDATE_USERS.includes(r)||this.isCategoryChanged(i.RI.AUTHENTICATED_USER,n.channelAcl)&&!c.UPDATE_AUTHENTICATED_USERS.includes(r)||this.isCategoryChanged(i.RI.ANONYMOUS_USER,n.channelAcl)&&!c.UPDATE_ANONYMOUS_USERS.includes(r))}isChanged(e,t){return void 0!==e&&e!==t}isStringArrayChanged(e,t){const r=null!=e?e:[],n=null!=t?t:[];return 0!==r.filter((e=>!n.includes(e))).length||0!==n.filter((e=>!r.includes(e))).length}isRoleChanged(e,t){if(!t)return!1;const r=this.existingChannel.channelAcl.filter((t=>t.role===e)).map((t=>`${t.category}_${t.subCategory}_${t.key}_${e}`)),n=t.filter((t=>t.role===e)).map((t=>`${t.category}_${t.subCategory}_${t.key}_${e}`));return this.isStringArrayChanged(r,n)}isCategoryChanged(e,t){var r;if(!t)return!1;const n=(null!==(r=this.permissionsByCategory[e])&&void 0!==r?r:[]).map((t=>`${e}_${t.subCategory}_${t.key}_${t.role}`)),i=t.filter((t=>t.category===e)).map((t=>`${e}_${t.subCategory}_${t.key}_${t.role}`));return this.isStringArrayChanged(n,i)}canAnyUser(e){var t;const r=null===(t=this.permissionsByCategory[i.RI.ANONYMOUS_USER])||void 0===t?void 0:t[0].role;return d(e).includes(r)}canAnyAuthenticatedUser(e){var t;const r=null===(t=this.permissionsByCategory[i.RI.AUTHENTICATED_USER])||void 0===t?void 0:t[0].role;return d(e).includes(r)}canSomeUser(e,t){var r;const n=null!==(r=this.permissionsByCategory[i.RI.USER])&&void 0!==r?r:[],s=t.username;return n.some((t=>{const{role:r,key:n}=t;return n===s&&d(e).includes(r)}))}canSomeUserGroup(e,t){var r;const s=null!==(r=this.permissionsByCategory[i.RI.GROUP])&&void 0!==r?r:[],o=this.mapUserGroupsById(t.groups);return s.some((t=>{const r=o[t.key];if(e===n.READ_POSTS){if(!r)return!1}else if(!r||!l(r))return!1;return function(e,t){return e.category===i.RI.GROUP&&"none"!==t.userMembership.memberType&&("owner"===t.userMembership.memberType||"admin"===t.userMembership.memberType||e.subCategory===i.B8.MEMBER)}(t,r)&&d(e).includes(t.role)}))}canSomeUserOrg(e,t){var r;return(null!==(r=this.permissionsByCategory[i.RI.ORG])&&void 0!==r?r:[]).some((r=>r.key===t.orgId&&function(e,t){return e.category===i.RI.ORG&&(e.subCategory===i.B8.MEMBER||e.subCategory===i.B8.ADMIN&&(0,s.RN)(t))}(r,t)&&d(e).includes(r.role)))}userCanAddAnonymousToAcl(e){return!this.permissionsByCategory[i.RI.ANONYMOUS_USER]||(0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToPublic")||(0,s.am)(e,"portal:user:shareToPublic")}userCanAddUnauthenticatedToAcl(e){return!this.permissionsByCategory[i.RI.AUTHENTICATED_USER]||(0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToPublic")||(0,s.am)(e,"portal:user:shareToPublic")}userCanAddAllGroupsToAcl(e){const t=this.permissionsByCategory[i.RI.GROUP],r=this.mapUserGroupsById(e.groups);return!t||t.every((e=>{const t=r[e.key];return t&&this.isMemberTypeAuthorized(t)&&l(t)}))}userCanAddAllOrgsToAcl(e){const t=this.permissionsByCategory[i.RI.ORG];return!t||((0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToOrg")||(0,s.am)(e,"portal:user:shareToOrg"))&&this.isEveryPermissionForUserOrg(e.orgId,t)}isEveryPermissionForUserOrg(e,t){return t.every((t=>{const{key:r}=t;return e===r}))}userCanAddUsersToAcl(e){return!this.permissionsByCategory[i.RI.USER]}isUserUnAuthenticated(e){return null===e.username||void 0===e.username}mapUserGroupsById(e){return e.reduce(((e,t)=>(e[t.id]=t,e)),{})}isMemberTypeAuthorized(e){const{userMembership:{memberType:t}}=e;return this.ALLOWED_GROUP_MEMBER_TYPES.includes(t)}determineUserRole(e){return this.isOwner(e)?i.uU.OWNER:this.isManager(e)?i.uU.MANAGE:this.isModerator(e)?i.uU.MODERATE:i.uU.READ}isOwner(e){return this.canSomeUser(n.IS_OWNER,e)||this.canSomeUserGroup(n.IS_OWNER,e)||this.canSomeUserOrg(n.IS_OWNER,e)}isManager(e){return this.canSomeUser(n.IS_MANAGER,e)||this.canSomeUserGroup(n.IS_MANAGER,e)||this.canSomeUserOrg(n.IS_MANAGER,e)}isModerator(e){return this.canSomeUser(n.IS_MODERATOR,e)||this.canSomeUserGroup(n.IS_MODERATOR,e)||this.canSomeUserOrg(n.IS_MODERATOR,e)}}function l(e){const{typeKeywords:t=[]}=e;return!t.includes(a.f)}function d(e){return e===n.WRITE_POSTS?[i.uU.WRITE,i.uU.READWRITE,i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]:e===n.MODERATE_CHANNEL?[i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]:e===n.DELETE_CHANNEL?[i.uU.OWNER]:e===n.IS_MODERATOR?[i.uU.MODERATE]:e===n.IS_MANAGER?[i.uU.MANAGE]:e===n.IS_OWNER?[i.uU.OWNER]:[i.uU.READ,i.uU.READWRITE,i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]}},29576:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var n=r(324738),i=r(324470);function s(e,t={}){return!!(0,i.Uj)(t,e.orgId)||new n.G(e).canDeleteChannel(t)}},275929:(e,t,r)=>{"use strict";r.d(t,{x:()=>s});var n=r(324738),i=r(324470);function s(e,t={},r){if((0,i.vP)(t,e.orgId))return!0;const s=new n.G(e);return s.canModerateChannel(t)&&s.canUpdateProperties(t,r)}},948390:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(324738);function i(e,t={}){return new n.G(e).deriveUserRole(t)}},568048:(e,t,r)=>{"use strict";function n(e){return function(t,r){return e.indexOf(r.userMembership.memberType)>
5-1&&t.push(r.id),t}}function i(e){return"org_admin"===e.role}function s(e={},t){return e.orgId===t}function o(e,t){return i(e)&&s(e,t)}function a(e={},t){var r;return!!(null===(r=e.privileges)||void 0===r?void 0:r.includes(t))}function c(e={},t){return t.every((t=>a(e,t)))}r.d(t,{PV:()=>c,RN:()=>i,am:()=>a,ho:()=>o,sd:()=>s,v9:()=>n})},324470:(e,t,r)=>{"use strict";r.d(t,{TX:()=>i,Uj:()=>o,vP:()=>s});var n=r(568048);function i(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems"])}function s(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems","portal:admin:updateItems"])}function o(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems","portal:admin:deleteItems"])}},898348:(e,t,r)=>{"use strict";r.d(t,{_:()=>i,f:()=>n});const n="cannotDiscuss",i="data-mention"},215249:(e,t,r)=>{"use strict";r.d(t,{A5:()=>n,O8:()=>i,gm:()=>s});const n=1.1,i={name:"",tags:[],typeKeywords:["Hub Discussion"],permissions:[],catalog:{schemaVersion:0},schemaVersion:n,isDiscussable:!0},s={item:{type:"Discussion",title:"",description:"",snippet:"",tags:[],typeKeywords:["Hub Discussion"],properties:{slug:"",schemaVersion:n}},data:{catalog:{schemaVersion:0},prompt:""}}},673084:(e,t,r)=>{"use strict";r.d(t,{createDiscussion:()=>g,deleteDiscussion:()=>b,updateDiscussion:()=>y});var n=r(170209),i=r(719339),s=r(427033),o=r(393960),a=r(223040),c=r(572269),u=r(795045),l=r(792090),d=r(215249),p=r(822409),h=r(507707),m=r(197928),f=r(906730);async function g(e,t){const r=Object.assign(Object.assign({},d.O8),e);r.orgUrlKey=r.orgUrlKey.toLowerCase(),r.slug||(r.slug=(0,s.fU)(r.name,r.orgUrlKey)),await(0,o.E)(r,t),r.typeKeywords=(0,p.Wb)(r.typeKeywords,r.isDiscussable);const n=new c.c7((0,u.s)());let a=n.entityToStore(r,(0,h.kI)(d.gm));a=await(0,i.NY)(a,t);const l=n.storeToEntity(a,{}),m=await(0,f.Q)(l,t);return l.entitySettingsId=m.id,l.discussionSettings=m.settings.discussions,l}async function y(e,t){var r;await(0,o.E)(e,t),e.typeKeywords=(0,p.Wb)(e.typeKeywords,e.isDiscussable);const n=await(0,i.PD)(e.id,t),s=new c.c7((0,u.s)()),a=s.entityToStore(e,n),d=await(0,i.QB)(a,t),h=(0,l.F)(n,s.storeToEntity(d,e),t);let g;try{g=(null===(r=h.location.geometries)||void 0===r?void 0:r.map((e=>(0,m.Y)(e))))||null}catch(e){g=null,console.warn("Esri JSON conversion failed",e)}const y=await(0,f.Q)(h,t,g);return h.entitySettingsId=y.id,h.discussionSettings=y.settings.discussions,h}async function b(e,t){const r=Object.assign(Object.assign({},t),{id:e});try{await(0,a.hk)(Object.assign({id:e},t))}catch(e){}await(0,n.cl)(r)}},617785:(e,t,r)=>{"use strict";r.d(t,{W:()=>h,d:()=>p});var n=r(170209),i=r(719339),s=r(427033),o=r(572269),a=r(795045),c=r(792090),u=r(934864),l=r(526462),d=r(223040);async function p(e,t){let r;return r=(0,l.k)(e)?(0,n.rV)(e,t):(0,s.QR)(e,t),r.then((e=>e?h(e,t):null))}async function h(e,t){const[r,n]=await Promise.all([(0,i.UO)(e,t),(0,d.Fn)(Object.assign({id:e.id},t)).catch((()=>Object.assign({id:null},(0,u.A)("discussion"))))]);r.entitySettings=n;const s=new o.c7((0,a.s)()).storeToEntity(r,{});return(0,c.F)(r,s,t)}},508234:(e,t,r)=>{"use strict";r.d(t,{RI:()=>c.RI,B8:()=>c.B8,fX:()=>o.f,ww:()=>c.ww,Uz:()=>c.Uz,LY:()=>c.LY,jF:()=>c.jF,p2:()=>c.p2,Og:()=>c.Og,qF:()=>c.qF,GY:()=>n.G,fL:()=>o._,y4:()=>c.y4,ZK:()=>c.ZK,H_:()=>c.H_,$4:()=>c.$4,hQ:()=>c.hQ,nF:()=>c.nF,uU:()=>c.uU,Fr:()=>c.Fr,Iw:()=>c.Iw,As:()=>c.As,Sy:()=>F,GJ:()=>ee,sm:()=>oe,i_:()=>Te,Mg:()=>De,Hp:()=>Pe,jK:()=>ce,pG:()=>Ie,Ym:()=>q,T2:()=>te.T,Rz:()=>ue,l6:()=>Ce,G6:()=>V,xK:()=>re.x,CY:()=>fe,G$:()=>pe,_w:()=>Ae,FR:()=>Oe,x2:()=>K,$g:()=>me,BP:()=>de,qU:()=>Y,IO:()=>J,LW:()=>ne,lX:()=>Q,X9:()=>_e,Ge:()=>a.Ge,WP:()=>s.W,mi:()=>l.mi,$6:()=>l.$6,y6:()=>l.y6,Ww:()=>l.Ww,vv:()=>i.createDiscussion,qb:()=>b,U5:()=>O,wC:()=>U,pR:()=>N,PP:()=>v,PS:()=>_,fj:()=>d.fj,qH:()=>d.qH,lg:()=>i.deleteDiscussion,AY:()=>ie.A,eR:()=>u.e,JL:()=>u.J,Mv:()=>y,x3:()=>A,kI:()=>l.kI,Of:()=>l.Of,Rq:()=>l.Rq,fA:()=>l.fA,dK:()=>s.d,SD:()=>w,mD:()=>D,j$:()=>d.j$,Fn:()=>d.Fn,KX:()=>a.KX,hw:()=>a.hw,dC:()=>a.dC,Wv:()=>a.Ww,AH:()=>p.A,vL:()=>a.vL,BV:()=>a.BV,RN:()=>$.RN,ho:()=>$.ho,t7:()=>a.t7,pi:()=>a.pi,qi:()=>a.qi,sd:()=>$.sd,hv:()=>be,tt:()=>Ee,v9:()=>$.v9,OG:()=>l.OG,TA:()=>l.TA,Rt:()=>l.Rt,fu:()=>l.fu,KD:()=>l.KD,sD:()=>l.sD,M8:()=>S,oW:()=>P,WO:()=>M,Xq:()=>j,Wf:()=>d.Wf,hk:()=>d.hk,r6:()=>l.r6,U4:()=>l.U4,cl:()=>g,yB:()=>C,Wb:()=>a.Wb,pW:()=>l.pW,ip:()=>l.BP,Zt:()=>i.updateDiscussion,CP:()=>E,LC:()=>T,ec:()=>x,z6:()=>k,m7:()=>d.m7,SK:()=>d.SK,am:()=>$.am,PV:()=>$.PV});
5var n=r(378873),i=r(673084),s=r(617785),o=r(898348),a=r(822409),c=r(211472),u=r(431560),l=r(710705),d=r(223040),p=r(934864),h=r(989593);const m=e=>e.channel?Object.assign(Object.assign({},e),{channelId:e.channel.id}):e,f=e=>Object.assign(Object.assign({},e),{items:e.items.map((e=>m(e)))});function g(e){return(0,u.e)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign({},e.data),httpMethod:"POST"})).then(f)}function y(e){return(0,u.e)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{f:c.Fr.CSV}),httpMethod:"POST"}))}function b(e){return(0,u.e)("/posts",Object.assign({httpMethod:"POST"},I(e)))}function v(e){const t=`/posts/${e.postId}/reply`;return(0,u.e)(t,Object.assign({httpMethod:"POST"},I(e)))}function w(e){const t=`/posts/${e.postId}`;return e.httpMethod="GET",(0,u.e)(t,e).then(m)}function S(e){const t=`/posts/${e.postId}`;return e.httpMethod="DELETE",(0,u.e)(t,e)}function E(e){const t=`/posts/${e.postId}`;return(0,u.e)(t,Object.assign({httpMethod:"PATCH"},I(e)))}function T(e){const t=`/posts/${e.postId}/status`;return e.httpMethod="PATCH",(0,u.e)(t,e)}function I(e){const{mentionUrl:t}=e,r=(0,h._T)(e,["mentionUrl"]);return t&&(r.headers=Object.assign(Object.assign({},r.headers),{"mention-url":t})),r}function C(e){return(0,u.J)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign({},e.data),httpMethod:"POST"})).then(f)}function A(e){return(0,u.J)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{f:c.Fr.CSV}),httpMethod:"POST"}))}function O(e){return(0,u.J)("/posts",Object.assign({httpMethod:"POST"},R(e)))}function _(e){const t=`/posts/${e.postId}/reply`;return(0,u.J)(t,Object.assign({httpMethod:"POST"},R(e)))}function D(e){const t=`/posts/${e.postId}`;return e.httpMethod="GET",(0,u.J)(t,e).then(m)}function P(e){const t=`/posts/${e.postId}`;return e.httpMethod="DELETE",(0,u.J)(t,e)}function k(e){const t=`/posts/${e.postId}`;return(0,u.J)(t,Object.assign({httpMethod:"PATCH"},R(e)))}function x(e){const t=`/posts/${e.postId}/status`;return e.httpMethod="PATCH",(0,u.J)(t,e)}function R(e){const{mentionUrl:t}=e,r=(0,h._T)(e,["mentionUrl"]);return t&&(r.headers=Object.assign(Object.assign({},r.headers),{"mention-url":t})),r}function U(e){return e.httpMethod="POST",(0,u.e)("/reactions",e)}function M(e){const{reactionId:t}=e;return e.httpMethod="DELETE",(0,u.e)(`/reactions/${t}`,e)}function N(e){return e.httpMethod="POST",(0,u.J)("/reactions",e)}function j(e){const{reactionId:t}=e;return e.httpMethod="DELETE",(0,u.J)(`/reactions/${t}`,e)}var $=r(568048);function F(e,t={}){const{access:r,groups:n,orgs:i}=e;return function(e,t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o}=t;return!!r&&(i===c.Iw.PRIVATE?G(n,s):G(n,s)&&function(e,t){return(0,$.RN)(e)&&t.includes(e.orgId)}(e,o))}(t,{access:r,groups:n,orgs:i})}function G(e,t){return t.every((t=>{const r=e.find((e=>e.id===t));return r&&function(e){const{userMembership:{memberType:t}}=e;return["owner","admin","member"].includes(t)}(r)&&function(e){const{typeKeywords:t=[]}=e;return!t.includes(o.f)}(r)}))}const L=Object.freeze(["owner","admin"]);function H(e={},t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o=[],creator:a}=t;return!!r&&(r===a||(i===c.Iw.PRIVATE?B(s,n):B(s,n)||function(e,t){return(0,$.RN)(t)&&e.includes(t.orgId)}(o,e)))}function B(e,t){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n}}=t;return e===r&&L.includes(n)}))))}var W=r(324470);function q(e,t={}){return!!(0,W.Uj)(t,e.orgId)||H(t,e)}function V(e,t={}){return!!(0,W.vP)(t,e.orgId)||H(t,e)}function K(e,t={}){return!!(0,$.ho)(t,e.orgId)||H(t,e)}const z=Object.freeze(["owner","admin","member"]);function Y(e,t={}){const{access:r,groups:n,orgs:i,allowAnonymous:s}=e;return!!(0,W.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{allowAnonymous:s,access:a,groups:u,orgs:l}=t;return!0===s||!!r&&(a===c.Iw.PUBLIC||(a===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&z.includes(n)&&!i.includes(o.f)}))))}(u,n):a===c.Iw.ORG&&l.includes(i)))}(t,{access:r,groups:n,orgs:i,allowAnonymous:s})}function J(e,t={}){return!!(0,W.TX)(t,e.orgId)||("private"===e.access?Z(["member","owner","admin"])(t,e):"org"!==e.access||Z(["member","owner","admin"])(t,e)||function(e,t){return 1===e.orgs.length&&e.orgs.indexOf(t.orgId)>-1}(e,t))}function Q(e,t={}){return J(e,t)}function Z(e){return(t,r)=>{const{groups:n=[]}=r,{groups:i=[]}=t,s=i.reduce((0,$.v9)(e),[]);return n.some((e=>s.indexOf(e)>-1))}}var X=r(324738);function ee(e,t={}){return new X.G(e).canCreateChannel(t)}
5var te=r(29576),re=r(275929);function ne(e,t={}){return!!(0,W.TX)(t,e.orgId)||new X.G(e).canReadChannel(t)}var ie=r(948390);const se=Object.freeze(["owner","admin","member"]);function oe(e,t={}){const{access:r,groups:n,orgs:i}=e;return!!(0,W.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{access:s,groups:a,orgs:u}=t;return!!r&&(s===c.Iw.PUBLIC||(s===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&se.includes(n)&&!i.includes(o.f)}))))}(a,n):s===c.Iw.ORG&&u.includes(i)))}(t,{access:r,groups:n,orgs:i})}const ae=Object.freeze(["owner","admin","member"]);function ce(e,t={}){const{access:r,groups:n,orgs:i}=e;return!!(0,W.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{access:s,groups:a,orgs:u}=t;return!!r&&(s===c.Iw.PUBLIC||(s===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&ae.includes(n)&&!i.includes(o.f)}))))}(a,n):s===c.Iw.ORG&&u.includes(i)))}(t,{access:r,groups:n,orgs:i})}function ue(e,t,r={}){return function(e,t){return!!t.username&&e.creator===t.username}(e,r)||function(e,t){return!!(0,W.vP)(t,e.orgId)||!!e.channelAcl&&new X.G(e).canModerateChannel(t)}(t,r)}const le=Object.freeze(["owner","admin"]);function de(e,t={}){return pe(e,t)}function pe(e,t={}){return!!(0,W.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o=[],creator:a}=t;return!!r&&(a===r||(i===c.Iw.PRIVATE?he(s,n):he(s,n)||function(e,t){return(0,$.RN)(t)&&e.includes(t.orgId)}(o,e)))}(t,e)}function he(e,t){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n}}=t;return e===r&&le.includes(n)}))))}function me(e,t={},r){return fe(e,t,r)}function fe(e,t={},r){const{access:n,groups:i,orgs:s,allowAnonymous:o}=r;return function(e,t){return!!t.username&&e.creator===t.username}(e,t)&&function(e,t){const{groups:r=[],orgId:n}=e,{access:i,groups:s=[],orgs:o=[]}=t;return i===c.Iw.PUBLIC||(i===c.Iw.ORG?ge(s,r)||o.includes(n):ge(s,r))}(t,{access:n,groups:i,orgs:s,allowAnonymous:o})}function ge(e,t){return e.some((e=>t.some((t=>{const{id:r,typeKeywords:n=[]}=t;return e===r&&!n.includes(o.f)}))))}var ye=r(822581);function be(e){let t;try{t=new URL(e)}catch(t){throw new Error(`Invalid URI: ${e}`)}const r=t.protocol.replace(":",""),[,n]=e.split("://"),[i,s]=n.split("/");let o,a;if(s){const{itemId:e,layerId:t}=(0,ye.tS)(s);[o,a]=[e,t]}const c=new URLSearchParams(t.search.replace("?",""));return{source:r,type:i,id:o||null,layer:a||null,features:c.has("id")&&c.get("id").split(",")||null,attribute:c.has("attribute")&&c.get("attribute")||null}}const ve=new RegExp(`${o._}=('|")[\\w@\\.-]+('|")`,"g"),we=new RegExp(`${o._}=`,"g"),Se=new RegExp("[^\\w@\\.-]","g");function Ee(e=""){const t=(e,t)=>e.replace(t,"");return(e.match(ve)||[]).reduce(((e,r)=>{const n=[we,Se].reduce(t,r);return e.indexOf(n)<0?[...e,n]:e}),[])}function Te(e,t={}){return!!(0,W.vP)(t,e.orgId)||!!e.allowPost&&new X.G(e).canPostToChannel(t)}function Ie(e,t={}){return!!(0,W.vP)(t,e.orgId)||!!e.allowReply&&new X.G(e).canPostToChannel(t)}function Ce(e,t,r={}){return function(e,t){return!!t.username&&e.creator===t.username}(e,r)||function(e,t){return!!(0,W.vP)(t,e.orgId)||new X.G(e).canModerateChannel(t)}(t,r)}function Ae(e,t={}){return!!(0,W.vP)(t,e.orgId)||new X.G(e).canModerateChannel(t)}function Oe(e,t={},r){const n=e.parentId?r.allowReply:r.allowPost,i=new X.G(r);return function(e,t){return!!t.username&&e.creator===t.username}(e,t)&&n&&i.canPostToChannel(t)}function _e(e,t={}){if(Te(e,t))return!1;const r=(t.groups||[]).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t})),{}),n=e.channelAcl.reduce(((e,t)=>t.category===c.RI.GROUP&&[c.uU.WRITE,c.uU.READWRITE,c.uU.OWNER,c.uU.MANAGE,c.uU.MODERATE].includes(t.role)&&r[t.key]?[...e,r[t.key]]:e),[]);return!!n.length&&n.every((e=>!(0,a.BV)(e)))}function De(e,t,r={}){return!!function(e,t){const{allowReaction:r,allowedReactions:n}=e;return!!r&&(!n||n.includes(t))}(e,t)&&J(e,r)}function Pe(e,t,r={}){return!!function(e,t){const{allowReaction:r,allowedReactions:n}=e;return!!r&&(!n||n.includes(t))}(e,t)&&ne(e,r)}},822409:(e,t,r)=>{"use strict";r.d(t,{BV:()=>a,Ge:()=>g,KX:()=>p,Wb:()=>c,Ww:()=>f,dC:()=>h,hw:()=>m,pi:()=>d,qi:()=>u,t7:()=>l,vL:()=>y});var n=r(170209),i=r(898348),s=r(211472),o=r(507707);function a(e){let t=!1;return e&&(t=!(e.typeKeywords||[]).includes(i.f)),t}function c(e,t){const r=(e||[]).filter((e=>e!==i.f));return t||r.push(i.f),r}function u(e){return e.channelAcl?e.channelAcl.some((({category:e})=>[s.RI.AUTHENTICATED_USER,s.RI.ANONYMOUS_USER].includes(e))):e.access===s.Iw.PUBLIC}function l(e){return e.channelAcl?!u(e)&&e.channelAcl.some((({category:e,subCategory:t})=>e===s.RI.ORG&&t===s.B8.MEMBER)):e.access===s.Iw.ORG}function d(e){return!u(e)&&!l(e)}function p(e){let t=s.Iw.PRIVATE;return u(e)?t=s.Iw.PUBLIC:l(e)&&(t=s.Iw.ORG),t}function h(e){return e.channelAcl?e.channelAcl.reduce(((e,t)=>t.category===s.RI.ORG&&[s.B8.MEMBER,s.B8.ADMIN].includes(t.subCategory)&&!e.includes(t.key)?[...e,t.key]:e),[]):e.orgs}function m(e){return e.channelAcl?e.channelAcl.reduce(((e,t)=>t.category===s.RI.GROUP&&[s.B8.MEMBER,s.B8.ADMIN].includes(t.subCategory)&&!e.includes(t.key)?[...e,t.key]:e),[]):e.groups}
5async function f(e,t,r,i){const a=(e,t)=>t.channelAcl.reduce(((t,r)=>r.category!==e||t[r.subCategory].includes(r.key)?t:Object.assign(Object.assign({},t),{[r.subCategory]:[...t[r.subCategory],r.key]})),{member:[],admin:[]}),c=[];if(u(t))c.push({operation:"AND",predicates:[{orgid:{from:"0",to:"{"}}]});else{const e={operation:"OR",predicates:[]},r=a(s.RI.ORG,t);r.member.length&&e.predicates.push({orgid:r.member}),r.admin.length&&e.predicates.push({orgid:r.admin,role:"org_admin"});const u=a(s.RI.GROUP,t);if(u.member.length&&e.predicates.push({group:u.member}),u.admin.length){const t=u.admin.filter((e=>!u.member.includes(e)));t.length&&(await Promise.all(t.map((e=>(0,n.rm)(e,i).catch((e=>null)))))).forEach(((r,n)=>{r&&e.predicates.push({group:t[n],username:[r.owner,...r.admins].filter(o.Tw)})}))}c.push(e)}r&&c.push({operation:"AND",predicates:[{username:{not:r}}]});const l=e.reduce(((e,t)=>t?Object.assign(Object.assign({},e),{predicates:[...e.predicates,{username:t},{fullname:t}]}):e),{operation:"OR",predicates:[]});return l.predicates.length&&c.push(l),{targetEntity:"communityUser",filters:c}}const g=(e,t)=>Object.assign(Object.assign({},e),{id:e.id,name:e.name,createdDate:new Date(e.createdAt),createdDateSource:"channel",updatedDate:new Date(e.updatedAt),updatedDateSource:"channel",type:"channel",access:p(e),family:"channel",owner:e.creator,links:{thumbnail:null,self:null,siteRelative:null},includes:{groups:t},rawResult:e});function y(e){const t=e,r=`_${new Date(Date.now()).toISOString().replace(/[^a-z0-9]/gi,"-")}.csv`;return[t.toLowerCase().replace(/[^a-z0-9]/g,"-").replace(/-{2,}/g,"-").replace(/^-/,"").substring(0,250-r.length).replace(/-$/,""),r].join("")}},990058:(e,t,r)=>{"use strict";r.d(t,{FK:()=>s,UA:()=>i,WL:()=>a,dI:()=>o});var n=r(217153);const i=[n.YH.JPG,n.YH.PNG,n.YH.PNG8,n.YH.PNG24,n.YH.PNG32],s=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML],o=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML,n.YH.FILE_GDB],a=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML,n.YH.FILE_GDB,n.YH.FEATURE_COLLECTION,n.YH.EXCEL,n.YH.GEO_PACKAGE,n.YH.SQLITE,n.YH.JSON]},921359:(e,t,r)=>{"use strict";function n(e){return e.key.startsWith("additionalResource::")}function i(e){return parseInt(e.key.split("::")[1],10)}r.d(t,{B:()=>n,X:()=>i})},982624:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(505681);function i(e){const{type:t,typeKeywords:r=[]}=e;return t===n.qG["Image Service"]&&!r.includes("Tiled Imagery")}},890109:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(990058);function i(e){const t=e.serverExtractFormats||[];return[...n.WL.filter((e=>t.includes(e))),...t.filter((e=>!n.WL.includes(e)))].map((e=>({type:"dynamic",format:e})))}},542677:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(264263),i=r(217153),s=r(990058);function o(e){return(((0,n.W)(e,"extendedProps.server.currentVersion")||0)<10.2?s.UA.filter((e=>e!==i.YH.PNG32)):s.UA).map((e=>({type:"dynamic",format:e})))}},338266:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(990058);function i(){return n.dI.map((e=>({type:"dynamic",format:e})))}},706833:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(990058);function i(){return n.FK.map((e=>({type:"dynamic",format:e})))}},388565:(e,t,r)=>{"use strict";r.d(t,{H:()=>a});var n=r(264263),i=r(692858),s=r(614867),o=r(982624);function a(e,t){let r=null;return(0,i.K)(e)?r="createReplica":(0,s.r)(e)&&!t?r=(0,n.W)(e,"extendedProps.serverExtractCapability")?"fgdb":"paging":(0,o.X)(e)&&(r="exportImage"),r}},692858:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(789565);function i(e){return(0,n.Et)(e.url)&&!!e.serverExtractCapability}},614867:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(713417);function i(e){const t=(0,n.TD)(e.url),r="public"===e.access,i=e.serverQueryCapability;return t&&r&&i}},29784:(e,t,r)=>{"use strict";r.d(t,{g:()=>u});var n=r(264263),i=r(388565),s=r(890109),o=r(542677),a=r(706833),c=r(338266);function u(e){const t=(0,i.H)(e),r=function(e,t){let r=[];const n={createReplica:()=>{r=(0,s.z)(t)},paging:()=>{r=(0,a.i)()},fgdb:()=>{r=(0,c.h)()},exportImage:()=>{r=(0,o.v)(t)}};return n[e]&&n[e](),r}(t,e),u=(0,n.W)(e,"extendedProps.additionalResources")||[],l=(0,n.W)(e,"extendedProps.downloads"),d=r.map((e=>({key:e.format,hidden:!1})));if(u.forEach(((e,t)=>{d.push({key:`additionalResource::${t}`,hidden:!1})})),l&&l.flowType===t){const e=d.filter((e=>!l.formats.find((t=>t.key===e.key))));return{flowType:t,formats:[...l.formats.filter((e=>d.find((t=>t.key===e.key)))),...e]}}return{flowType:t,formats:d}}},652275:(e,t,r)=>{"use strict";r.d(t,{m4:()=>o.m4,hf:()=>
5o.hf,My:()=>o.My,Yh:()=>o.Yh,YH:()=>o.YH,mq:()=>a,nc:()=>u,Ki:()=>f.K,mG:()=>y,r6:()=>g.r,Ag:()=>_,gZ:()=>S.g,VU:()=>A,ey:()=>d,nW:()=>p,z7:()=>C,_d:()=>l,ZE:()=>c});var n=r(170209),i=r(899415),s=r(507707),o=r(217153);const a="4326";function c(e){if("object"==typeof e){const{wkid:t,wkt:r}=e;return t?String(t):(0,i.btoa)(r)}return e}function u(e,t){const{onlyTypes:r,layerId:i,spatialRefId:c}=function(e){return e?{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId}:{}}(t),u=Object.keys(o.Yh).map((e=>o.Yh[e])),h=new Set((0,s.VF)(u.filter((e=>!e.supportsProjection)).map((e=>e.itemTypes))));let m;m=r||(0,s.VF)(u.map((e=>e.itemTypes)));const f=(new n.qp).startGroup().match(`"${d(e)}"`).in("typekeywords").and().match(`"${p(i)}"`).in("typekeywords").endGroup().and().startGroup();return function(e,t){const{types:r,noProjectionItemTypes:n,spatialRefId:i}=t,s=(e,t)=>{t.startGroup().match(/\s/g.test(e)?e:`"${e}"`).in("type").and().match(`"${l(((e,t)=>{let r=a;return e&&!n.has(t)&&(r=e),r})(i,e))}"`).in("typekeywords").endGroup()};r.forEach(((t,n)=>{s(t,e),n<r.length-1&&e.or()}))}(f,{types:m,spatialRefId:c,noProjectionItemTypes:h}),f.endGroup(),f.toParam()}function l(e){const t=function(e){let t;try{t=JSON.parse(e)}catch(r){t=e}return t}(e);return`spatialRefId:${c(t)}`}function d(e){return`exportItem:${e}`}function p(e){return e?`exportLayer:0${e}`:"exportLayer:null"}var h=r(841741),m=r(982624),f=r(692858),g=r(614867);function y(e,t){var r;return"online"===(null===(r=t.serviceStatus)||void 0===r?void 0:r["hub-downloads"])&&((0,g.r)(e)||(0,f.K)(e))}var b=r(264263),v=r(542677),w=r(921359),S=r(29784),E=r(890109),T=r(706833),I=r(338266);function C(e){let t=[];return(0,f.K)(e)?t=(0,E.z)(e):(0,g.r)(e)&&(t=(0,b.W)(e,"extendedProps.serverExtractCapability")?(0,I.h)():(0,T.i)()),t}function A(e){const{entity:t,context:r}=e;let n=[];y(t,r)?n=C(t):(0,m.X)(t)&&(n=(0,v.v)(t));const i=((0,b.W)(t,"extendedProps.additionalResources")||[]).map(O);return(0,S.g)(t).formats.reduce(((e,t)=>{if(!t.hidden){let r;if((0,w.B)(t)){const e=(0,w.X)(t);r=i[e]}else n.forEach((e=>{e.format===t.key&&(r=e)}));e.push(r)}return e}),[])}function O(e){return{type:"static",label:e.name||e.isDataSource&&"{{dataSource:translate}}"||"{{noTitle:translate}}",url:e.url}}async function _(e){!function(e){const{entity:t,context:r,format:n}=e;if(!A({entity:t,context:r}).filter((e=>"dynamic"===e.type)).map((e=>e.format)).includes(n))throw new h.Z("fetchDownloadFile",`The following format is not enabled for the entity: ${n}`)}(e);const t=null==e.pollInterval?Object.assign(Object.assign({},e),{pollInterval:3e3}):e;let n;if(y(t.entity,t.context))n=(await r.e(36367).then(r.bind(r,836367))).fetchHubApiDownloadFile;else{if(!(0,m.X)(t.entity))throw new h.Z("fetchDownloadFile","Downloads are not supported for this item in this environment");n=(await r.e(85522).then(r.bind(r,185522))).fetchExportImageDownloadFile}return n(t)}},217153:(e,t,r)=>{"use strict";r.d(t,{My:()=>s,YH:()=>i,Yh:()=>n,hf:()=>a,m4:()=>o});const n={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}};var i,s;!function(e){e.BMP="bmp",e.GIF="gif",e.JPG="jpg",e.JPG_PNG="jpgpng",e.PNG="png",e.PNG8="png8",e.PNG24="png24",e.TIFF="tiff",e.PNG32="png32",e.BIP="bip",e.BSQ="bsq",e.LERC="lerc",e.CSV="csv",e.EXCEL="excel",e.FEATURE_COLLECTION="featureCollection",e.FILE_GDB="filegdb",e.GEOJSON="geojson",e.GEO_PACKAGE="geoPackage",e.JSON="json",e.KML="kml",e.SHAPEFILE="shapefile",e.SQLITE="sqlite"}(i||(i={})),function(e){e.PENDING="pending",e.PROCESSING="processing",e.CONVERTING="converting",e.COMPLETED="completed",e.FAILED="failed"}(s||(s={}));
5class o extends Error{constructor(e){super(e.rawMessage),this.name="ArcgisHubDownloadError",this.message=e.rawMessage,this.messageId=e.messageId,this.operation=e.operation}}class a extends o{constructor(e){super(e),this.name="ArcgisHubDownloadFileTooLargeError"}}},921910:(e,t,r)=>{"use strict";r.d(t,{q:()=>f});var n=r(110571),i=r(877440),s=r(867462),o=r(2166),a=r(507707),c=r(754423),u=r(410282),l=r(841741),d=r(590317),p=r(109313),h=r(370427),m=r(94684);class f extends n.x{static fromJson(e,t){const r=this.applyDefaults(e,t);return new f(r,t)}static async fetch(e,t){try{const r=await(0,i.d)(e,t.hubRequestOptions);return f.fromJson(r,t)}catch(e){throw new Error("Event not found.")}}static applyDefaults(e,t){var r;return e.orgUrlKey||(e.orgUrlKey=null===(r=t.portal)||void 0===r?void 0:r.urlKey),e.orgUrlKey&&(e.orgUrlKey=e.orgUrlKey.toLowerCase()),Object.assign(Object.assign({},(0,s.H)()),e)}update(e){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");if(this.entity.id){const{updateHubEvent:e}=await Promise.resolve().then(r.bind(r,449739));this.entity=await e(this.entity,this.context.hubRequestOptions)}else{const{createHubEvent:e}=await Promise.resolve().then(r.bind(r,449739));this.entity=await e(this.entity,this.context.hubRequestOptions)}}async delete(){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");const{deleteHubEvent:e}=await Promise.resolve().then(r.bind(r,449739));await e(this.entity.id,this.context.hubRequestOptions),this.isDestroyed=!0}async shareWithGroup(e){if(!this.context.currentUser)throw new l.Z("Share Event With Group","Cannot share event with group when no user is logged in.");this.entity=await(0,c.g)([e],this.entity,this.context)}async shareWithGroups(e){this.entity=await(0,c.g)(e,this.entity,this.context)}async unshareWithGroup(e){this.entity=await(0,u.c)([e],this.entity,this.context)}async unshareWithGroups(e){this.entity=await(0,u.c)(e,this.entity,this.context)}async setAccess(e){await(0,d.eJ)(Object.assign({eventId:this.entity.id,data:{access:e.toUpperCase()}},this.context.hubRequestOptions)),this.entity.access=e}async sharedWith(){return(0,p.g)(this.entity.id,this.context)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=(0,a.kI)(this.entity);return Promise.resolve(r)}async fromEditor(e){const t=e._thumbnail,r=await(0,h.E)(e,this.context),n=r.entity;return Object.entries(r).forEach((([e,t])=>{(0,m.t)(e,t,this)})),t&&(n.thumbnailUrl=t.url||null),this.entity=n,await this.save(),this.entity}}},157902:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventEditorTypes:()=>o,buildSchema:()=>a});var n=r(167420),i=r(443014),s=r(444238);const o=["hub:event:create","hub:event:edit","hub:event:registrants"],a=()=>{const{startDate:e}=(0,i.k)();return{$async:!0,required:["name","startDate","endDate"],properties:{name:n.oG,startDate:{type:"string",format:"date",formatMinimum:e},startTime:{type:"string"},endTime:{type:"string"},isAllDay:{type:"boolean",default:!1},_catalogSetup:n.D0},allOf:[s.M4]}}},304373:(e,t,r)=>{"use strict";r.d(t,{b:()=>d});var n=r(572269),i=r(719271),s=r(507707),o=r(205097),a=r(829158),c=r(994512),u=r(674957),l=r(899989);class d extends n.c7{storeToEntity(e,t){var r,s,d,p,h,m,f,g;const y=(0,n.nc)(e,t,this.mappings);y.type="Event";const b=e.access.toLowerCase();return"private"===b&&(e.readGroups.length>0||e.editGroups.length>0)?y.access="shared":y.access=b,y.isCanceled=e.status===o.N3.CANCELED,y.isPlanned=e.status===o.N3.PLANNED,y.isRemoved=e.status===o.N3.REMOVED,e.attendanceType.includes(o.uA.IN_PERSON)&&e.attendanceType.includes(o.uA.VIRTUAL)?y.attendanceType=a.w.Both:e.attendanceType.includes(o.uA.IN_PERSON)?y.attendanceType=a.w.InPerson:y.attendanceType=a.w.Online,y.onlineCapacity=null!==(s=null===(r=e.onlineMeeting)||void 0===r?void 0:r.capacity)&&void 0!==s?s:null,y.onlineCapacityType=(null===(d=e.onlineMeeting)||void 0===d?void 0:d.capacity)?a.S.Fixed:a.S.Unl
5imited,y.inPersonCapacity=null!==(p=e.inPersonCapacity)&&void 0!==p?p:null,y.inPersonCapacityType=e.inPersonCapacity?a.S.Fixed:a.S.Unlimited,y.onlineDetails=null!==(m=null===(h=e.onlineMeeting)||void 0===h?void 0:h.details)&&void 0!==m?m:null,y.onlineUrl=null!==(g=null===(f=e.onlineMeeting)||void 0===f?void 0:f.url)&&void 0!==g?g:null,y.canChangeAccess=[e.permission.canSetAccessToPublic,e.permission.canSetAccessToOrg,e.permission.canSetAccessToPrivate].every(Boolean),y.canChangeStatus=[e.permission.canSetStatusToCancelled,e.permission.canSetStatusToRemoved].some(Boolean),y.referencedContentIds=e.associations.map((({entityId:e})=>e)),y.referencedContentIdsByType=e.associations.map((({entityId:e,entityType:t})=>({entityId:e,entityType:t}))),y.createdDate=new Date(e.createdAt),y.startDateTime=new Date(e.startDateTime),y.endDateTime=new Date(e.endDateTime),y.isPast=y.endDateTime<new Date,y.createdDateSource="createdAt",y.updatedDate=new Date(e.updatedAt),y.updatedDateSource="updatedAt",y.catalog=(0,i.c)(y.catalog||{}),y.links=(0,c.E)(e),y.slug=(0,u.X)(e),y.view={showMap:!!e.location},y.location=(0,l.c)(e),y}entityToStore(e,t){const r=(0,s.kI)(e),i=(0,n.Bl)(r,t,this.mappings),c=r.access;return i.access="shared"===c?o.bY.PRIVATE:c.toUpperCase(),r.isRemoved?i.status=o.N3.REMOVED:r.isCanceled?i.status=o.N3.CANCELED:i.status=o.N3.PLANNED,r.attendanceType===a.w.Both?i.attendanceType=[o.uA.IN_PERSON,o.uA.VIRTUAL]:r.attendanceType===a.w.InPerson?i.attendanceType=[o.uA.IN_PERSON]:i.attendanceType=[o.uA.VIRTUAL],[a.w.Online,a.w.Both].includes(r.attendanceType)&&(i.onlineMeeting={details:r.onlineDetails,capacity:r.onlineCapacityType===a.S.Fixed?r.onlineCapacity:null,url:r.onlineUrl}),[a.w.InPerson,a.w.Both].includes(r.attendanceType)?i.inPersonCapacity=r.inPersonCapacityType===a.S.Fixed?r.inPersonCapacity:null:i.inPersonCapacity=null,r.isAllDay&&(r.startTime="00:00:00",r.endTime="23:59:59"),i.location=r.location&&"none"!==r.location.type?{type:r.location.type,spatialReference:r.location.spatialReference,extent:r.location.extent,geometries:r.location.geometries,placeName:r.location.name}:null,i}}},994512:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var n=r(563447),i=r(371740),s=r(674957),o=r(574335);function a(e){var t;const r=(0,i.bC)("event",(0,s.X)(e));return{self:r,siteRelative:r,siteRelativeEntityType:(0,i.bC)("event"),workspaceRelative:(0,n.C)("Event",e.id),thumbnail:null!==(t=e.thumbnailUrl)&&void 0!==t?t:(0,o.P)()}}},443014:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var n=r(851742),i=r(965210),s=r(731555);const o=()=>{const e=36e5,t=new Date(Date.now()+e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()),o=r.toISOString(),a=new Date(r.valueOf()+e).toISOString(),c=(0,s.W)(),u=(0,n.X)(o,c),l=(0,n.X)(a,c);return{startDate:u,startDateTime:new Date(o),startTime:(0,i.z)(o,c),endDate:l,endDateTime:new Date(a),endTime:(0,i.z)(a,c),timeZone:c}}},674957:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(806322);function i(e){return[(0,n.l)(e.title),e.id].join("-").split("-").filter(Boolean).join("-")}},899989:(e,t,r)=>{"use strict";function n(e){return e.location?{type:e.location.type,spatialReference:e.location.spatialReference,extent:e.location.extent,geometries:e.location.geometries,name:e.location.placeName}:{type:"none"}}r.d(t,{c:()=>n})},473894:(e,t,r)=>{"use strict";function n(){return["orgId","description","id","tags","categories","timeZone","summary","notifyAttendees","allowRegistration","startDate","startTime","endDate","endTime","thumbnailUrl"].reduce(((e,t)=>[...e,{entityKey:t,storeKey:t}]),[{entityKey:"isAllDay",storeKey:"allDay"},{entityKey:"name",storeKey:"title"},{entityKey:"owner",storeKey:"creator.username"},{entityKey:"canEdit",storeKey:"permission.canEdit"},{entityKey:"canDelete",storeKey:"permission.canDelete"},{entityKey:"canChangeAccessOrg",storeKey:"permission.canSetAccessToOrg"},{entityKey:"canChangeAccessPrivate",storeKey:"permission.canSetAccessToPrivate"},{entityKey:"canChangeAccessPublic",storeKey:"permission.canSetAccessToPublic"},{entityKey:"canChangeStatusCancelled",storeKey:"permission.canSetStatusToCancelled"},{entityKey:"canChangeStatusRemoved",storeKey:"permission.canSetStatusToRemoved"},{entityKey:"readGroupIds",storeKey:"readGroups"},{entityKey:"editGroupIds",storeKey:"editGroups"},{entityKey:"inPersonRegistrationCount",storeKey:"registrationCount.inPerson"},{entityKey:"onlineRegistrationCount",storeKey:"registrationCount.virtual"},{entityKey:"catalog",storeKey:"capabilities.catalog"}])}r.d(t,{s:()=>n})},754423:(e,t,r)=>{"use strict";r.d(t,{g:()=>a});var n=r(170209),i=r(507707),s=r(590317),o=r(737745);async function a(e,t,r){const a=n.td.bind(void 0,Object.assign({q:`id:(${e.join(" OR ")})`,num:e.length},r.requestOptions)),c=t=>t.results.length===e.length;if(!e.length)return t;try{const{results:e}=await(0,o.$)(a,c),{readGroupIds:n,editGroupIds:u}=e.reduce(((e,t)=>{const r=t.capabilities.includes("updateitemcontrol")?"editGroupIds":"readGroupIds";return Object.assign(Object.assign({},e),{[r]:[...e[r],t.id]})}),{readGroupIds:[],editGroupIds:[]}),{readGroups:l,editGroups:d}=await(0,s.eJ)(Object.assign({eventId:t.id,data:{readGroups:[...t.readGroupIds,...n].filter(i.Tw),editGroups:[...t.editGroupIds,...u].filter(i.Tw)}},r.hubRequestOptions));return Object.assign(Object.assign({},t),{readGroupIds:l,editGroupIds:d})}catch(r){throw new Error(`Entity: ${t.id} could not be shared with groups: ${e.join(", ")}`)}}},410282:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(590317);async function i(e,t,r){if(!e.length)return t;try{const{readGroups:i,editGroups:s}=await(0,n.eJ)(Object.assign({eventId:t.id,data:{readGroups:t.readGroupIds.filter((t=>!e.includes(t))),editGroups:t.editGroupIds.filter((t=>!e.includes(t)))}},r.hubRequestOptions));return Object.assign(Object.assign({},t),{readGroupIds:i,editGroupIds:s})}catch(r){throw new Error(`Entity: ${t.id} could not be unshared with groups: ${e.join(", ")}`)}}},444238:(e,t,r)=>{"use strict";r.d(t,{M4:()=>i,TD:()=>o,xn:()=>a,xs:()=>s});var n=r(829158);const i={if:{properties:{isAllDay:{const:!1}}},then:{required:["startTime","endTime"],properties:{endTime:{format:"timePickerTime",formatExclusiveMinimum:{$data:"1/startTime"}}}}},s={if:{properties:{attendanceType:{enum:[n.w.Online,n.w.Both]}}},then:{required:["onlineUrl"],properties:{onlineUrl:{format:"url"}}}},o={if:{properties:{onlineCapacityType:{const:n.S.Fixed},attendanceType:{enum:[n.w.Online,n.w.Both]}}},then:{required:["onlineCapacity"],properties:{onlineCapacity:{minimum:1}}}},a={if:{properties:{inPersonCapacityType:{const:n.S.Fixed},attendanceType:{enum:[n.w.InPerson,n.w.Both]}}},then:{required:["inPersonCapacity"],properties:{inPersonCapacity:{minimum:1}}}}},590317:(e,t,r)=>{"use strict";r.d(t,{Bt:()=>u,EY:()=>a,eJ:()=>c,gT:()=>o,yM:()=>s});var n=r(790118),i=r(205097);async function s(e){return e.token=await(0,n.Y)(e),(0,i.yM)(e.data,e)}async function o(e){return e.token=await(0,n.Y)(e),(0,i.gT)(e.data,e)}async function a(e){return e.token=await(0,n.Y)(e),(0,i.EY)(e.eventId,e)}async function c(e){return e.token=await(0,n.Y)(e),(0,i.eJ)(e.eventId,e.data,e)}async function u(e){return e.token=await(0,n.Y)(e),(0,i.Bt)(e.eventId,e)}},205097:(e,t,r)=>{"use strict";async function n(e,t){const{url:r,method:n,data:s}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:n,cache:a,credentials:c,mode:o};s&&(p.body=JSON.stringify(s));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new i(m,d,f,JSON.stringify(g.message))}r.d(t,{bY:()=>g,Cb:()=>f,uA:()=>m,ji:()=>a,LM:()=>o,N3:()=>p,rf:()=>c,sY:()=>d,Sj:()=>s,Vv:()=>l,yM:()=>y,_Y:()=>E,Bt:()=>
5S,t$:()=>I,EY:()=>v,mv:()=>T,gT:()=>b,eJ:()=>w});class i extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var s,o,a,c,u,l,d,p,h,m,f,g;!function(e){e.createdAt="createdAt",e.updatedAt="updatedAt",e.firstName="firstName",e.lastName="lastName",e.username="username"}(s||(s={})),function(e){e.asc="asc",e.desc="desc"}(o||(o={})),function(e){e.title="title",e.startDateTime="startDateTime",e.createdAt="createdAt",e.updatedAt="updatedAt"}(a||(a={})),function(e){e.associations="associations",e.creator="creator",e.location="location",e.onlineMeeting="onlineMeeting",e.registrations="registrations"}(c||(c={})),function(e){e.csv="csv",e.json="json"}(u||(u={})),function(e){e.PENDING="PENDING",e.ACCEPTED="ACCEPTED",e.DECLINED="DECLINED",e.BLOCKED="BLOCKED"}(l||(l={})),function(e){e.OWNER="OWNER",e.ORGANIZER="ORGANIZER",e.ATTENDEE="ATTENDEE"}(d||(d={})),function(e){e.PLANNED="PLANNED",e.CANCELED="CANCELED",e.REMOVED="REMOVED"}(p||(p={})),function(e){e.none="none",e.custom="custom",e.org="org",e.item="item"}(h||(h={})),function(e){e.VIRTUAL="VIRTUAL",e.IN_PERSON="IN_PERSON"}(m||(m={})),function(e){e.Hub_Site_Application="Hub Site Application",e.Hub_Initiative="Hub Initiative",e.Hub_Project="Hub Project"}(f||(f={})),function(e){e.PRIVATE="PRIVATE",e.ORG="ORG",e.PUBLIC="PUBLIC"}(g||(g={}));const y=(e,t)=>n({url:"/api/events/v1/events",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),b=(e,t)=>n({url:"/api/events/v1/events/search",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),v=(e,t)=>n({url:`/api/events/v1/events/${e}`,method:"GET"},t),w=(e,t,r)=>n({url:`/api/events/v1/events/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),S=(e,t)=>n({url:`/api/events/v1/events/${e}`,method:"DELETE"},t),E=(e,t)=>n({url:"/api/events/v1/registrations",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),T=(e,t)=>n({url:"/api/events/v1/registrations",method:"GET",params:e},t),I=(e,t)=>n({url:`/api/events/v1/registrations/${e}`,method:"DELETE"},t)},518680:(e,t,r)=>{"use strict";r.d(t,{_Y:()=>s,mv:()=>o,t$:()=>a});var n=r(790118),i=r(205097);async function s(e){return e.token=await(0,n.Y)(e),(0,i._Y)(e.data,e)}async function o(e){return e.token=await(0,n.Y)(e),(0,i.mv)(e.data,e)}async function a(e){return e.token=await(0,n.Y)(e),(0,i.t$)(e.registrationId,e)}},790118:(e,t,r)=>{"use strict";function n(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}r.d(t,{Y:()=>n})},867462:(e,t,r)=>{"use strict";r.d(t,{H:()=>o,g:()=>a});var n=r(443014),i=r(205097),s=r(829158);function o(){const e=(0,n.k)();return Object.assign(Object.assign({access:"private",allowRegistration:!0,attendanceType:s.w.InPerson,catalog:{schemaVersion:0},categories:[],inPersonCapacity:null,inPersonCapacityType:s.S.Unlimited,isAllDay:!1,isCanceled:!1,isDiscussable:!0,isPlanned:!0,isRemoved:!1,name:"",notifyAttendees:!0,onlineCapacity:null,onlineCapacityType:s.S.Unlimited,onlineDetails:null,onlineUrl:null,referencedContentIds:[],referencedContentIdsByType:[],schemaVersion:1,tags:[],readGroupIds:[],editGroupIds:[]},e),{view:{heroActions:[],showMap:!1},location:{type:"none"}})}function a(){const{startDateTime:e,endDateTime:t}=(0,n.k)();return{access:i.bY.PRIVATE,allDay:!1,allowRegistration:!0,associations:[],attendanceType:[i.uA.IN_PERSON],categories:[],inPersonCapacity:null,editGroups:[],endDateTime:t.toISOString(),notifyAttendees:!0,readGroups:[],startDateTime:e.toISOString(),status:i.N3.PLANNED,tags:[],title:"",location:null}}},449739:(e,t,r)=>{"use strict";r.d(t,{createHubEvent:()=>l,T:()=>h,deleteHubEvent:()=>p,I:()=>m,updateHubEvent:()=>d});var n=r(473894),i=r(304373),s=r(867462),o=r(590317),a=r(518680),c=r(170209);async function u(e,t,r){const n=e.filter((({entityId:e})=>t.includes(e))),i=t.filter((e=>!n.find((({entityId:t})=>t===e))));if(i.length){const{results:e}=await(0,c.KT)({q:i.map((e=>`id:${e}`)).join(" OR "),num:i.length,authentication:r.authentication}),t=e.map((({id:e,type:t})=>({entityId:e,entityType:t})));n.push(...t)}return n}async function l(e,t){const r=Object.assign(Object.assign({},(0,
6s.H)()),e);r.endDate=r.startDate;const a=new i.b((0,n.s)());let c=a.entityToStore(r,(0,s.g)());const l=await u(e.referencedContentIdsByType,e.referencedContentIds,t),d={access:c.access,allDay:c.allDay,allowRegistration:c.allowRegistration,associations:l,attendanceType:c.attendanceType,capabilities:c.capabilities,categories:c.categories,description:c.description,editGroups:c.editGroups,endDate:c.endDate,endTime:c.endTime,inPersonCapacity:c.inPersonCapacity,notifyAttendees:c.notifyAttendees,onlineMeeting:c.onlineMeeting,readGroups:c.readGroups,startDate:c.startDate,
6startTime:c.startTime,summary:c.summary,tags:c.tags,timeZone:c.timeZone,title:c.title,location:c.location};return c=await(0,o.yM)(Object.assign({data:d},t)),a.storeToEntity(c,{})}async function d(e,t){var r,a;const c=Object.assign(Object.assign({},(0,s.H)()),e),l=new i.b((0,n.s)());let d=l.entityToStore(c,(0,s.g)());const p=await u(e.referencedContentIdsByType,e.referencedContentIds,t),h={access:d.access,allDay:d.allDay,allowRegistration:d.allowRegistration,associations:p,attendanceType:d.attendanceType,capabilities:d.capabilities,categories:d.categories,description:(null===(r=d.description)||void 0===r?void 0:r.trim())||null,editGroups:d.editGroups,endDate:d.endDate,endTime:d.endTime,inPersonCapacity:d.inPersonCapacity,notifyAttendees:d.notifyAttendees,onlineMeeting:d.onlineMeeting,readGroups:d.readGroups,startDate:d.startDate,startTime:d.startTime,status:d.status,summary:(null===(a=d.summary)||void 0===a?void 0:a.trim())||null,tags:d.tags,thumbnailUrl:d.thumbnailUrl||null,timeZone:d.timeZone,title:d.title,location:d.location};return d=await(0,o.eJ)(Object.assign({eventId:d.id,data:h},t)),l.storeToEntity(d,{})}async function p(e,t){await(0,o.Bt)(Object.assign({eventId:e},t))}function h(e,t){return(0,a._Y)(Object.assign({data:e},t))}async function m(e,t){await(0,a.t$)(Object.assign({registrationId:e},t))}},877440:(e,t,r)=>{"use strict";r.d(t,{d:()=>o,e:()=>a});var n=r(304373),i=r(473894),s=r(590317);function o(e,t){const r=e.split("-"),n=r[r.length-1];return(0,s.EY)(Object.assign({eventId:n,data:{include:"associations"}},t)).then((e=>a(e))).catch((()=>{throw new Error("Failed to fetch event.")}))}async function a(e,t){const r=new n.b((0,i.s)());return Promise.resolve(r.storeToEntity(e,{}))}},109313:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(170209),i=r(590317);async function s(e,t){const{editGroups:r,readGroups:s}=await(0,i.EY)(Object.assign({eventId:e},t.hubRequestOptions)),[{results:o},{results:a}]=await Promise.all([s,r].map((e=>e.length?(0,n.td)(Object.assign({q:`id:(${e.join(" OR ")})`,num:e.length},t.requestOptions)):Promise.resolve({results:[]}))));return[...o,...a]}},256935:(e,t,r)=>{"use strict";r.d(t,{IF:()=>n.I,St:()=>o.S,Tb:()=>n.T,Vq:()=>n.deleteHubEvent,eO:()=>i.e,eZ:()=>i.d,gp:()=>a.g,hy:()=>n.createHubEvent,qJ:()=>n.updateHubEvent,qz:()=>s.q,wP:()=>o.w});var n=r(449739),i=r(877440),s=r(921910),o=r(829158),a=r(109313)},829158:(e,t,r)=>{"use strict";var n,i;r.d(t,{S:()=>i,w:()=>n}),function(e){e.InPerson="inPerson",e.Online="online",e.Both="both"}(n||(n={})),function(e){e.Unlimited="unlimited",e.Fixed="fixed"}(i||(i={}))},174564:(e,t,r)=>{"use strict";r.d(t,{CF:()=>o,Dz:()=>g,Uf:()=>b,Vu:()=>s,c5:()=>c,cq:()=>u,kk:()=>d,ko:()=>m,nc:()=>y,pi:()=>p,sA:()=>a,vP:()=>f,vU:()=>l});var n=r(348753),i=r(264263);const s=e=>{const[[t,r],[n,i]]=e;return a(t,r,n,i)},o=e=>e.map((e=>e.join(", "))).join(", ");function a(e,t,r,n,i=4326){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:i}}}function c(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}const u={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function l(e){const t=e.portalSelf,r=t.defaultExtent,s=(0,i.W)(t,"helperServices.geometry.url");
6if(!s)return Promise.resolve(u);if(!r)return Promise.resolve(u);const o=`${s}/project`,a={geometryType:"esriGeometryEnvelope",geometries:[r]},c={httpMethod:"POST",params:{geometries:JSON.stringify(a),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(c.authentication=e.authentication),(0,n.WY)(o,c).then((e=>{const t=e.geometries[0];return{xmin:t.xmin,ymin:t.ymin,xmax:t.xmax,ymax:t.ymax,spatialReference:{wkid:4326}}})).catch((e=>u))}function d(e){return l(e).then((e=>c(e)))}const p=e=>Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1]);function h(e){return["xmin","ymin","xmax","ymax"].every((t=>"number"==typeof e[t]))}function m(e){return!!e&&[p,h].some((t=>t(e)))}const f=e=>{const{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:s}=e;return{rings:[[[t,i],[n,i],[n,r],[t,r],[t,i]]],spatialReference:s}},g=e=>{const{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:s}=e;return{x:(n-t)/2+t,y:(i-r)/2+r,spatialReference:s}},y=e=>{const t=[].concat(...e);for(let e=0;e<t.length;e+=2){const[r,n]=[t[e],t[e+1]];if(n<-90||n>90||r<-180||r>180)return!1}return!0},b=e=>{let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const s of e.coordinates)for(const[e,o]of s)t=Math.min(t,e),r=Math.min(r,o),n=Math.max(n,e),i=Math.max(i,o);return[[t,r],[n,i]]}},550896:(e,t,r)=>{"use strict";r.d(t,{w:()=>f});var n=r(228246),i=r(907463),s=r(975789),o=r(496157),a=r(513918),c=r(507707),u=r(2166),l=r(170209),d=r(841741),p=r(589585),h=r(348753),m=r(358637);class f{constructor(e,t){this.isDestroyed=!1,this.thumbnailCache=null,this.entity=e,this.context=t}get canEdit(){return this.entity.memberType&&("owner"===this.entity.memberType||"admin"===this.entity.memberType)||this.entity.owner===this.context.currentUser.username}get canDelete(){return this.canEdit}get isProtected(){return this.entity.protected}static fromJson(e,t){const r=this.applyDefaults(e);return new f(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e),i=f.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,n.F)(e,t.hubRequestOptions);return f.fromJson(r,t)}catch(e){throw"COM_0003: Group does not exist or is inaccessible."===e.message?new Error("Group not found."):e}}static applyDefaults(e){return Object.assign(Object.assign({},s.P$),e)}toJson(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");return(0,c.kI)(this.entity)}update(e){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.entity.id?this.entity=await(0,n.q7)(this.entity,this.context):this.entity=await(0,n.LJ)(this.entity,this.context)}async delete(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.isDestroyed=!0,await(0,n.KD)(this.entity.id,this.context.userRequestOptions)}checkPermission(e){return(0,o.P)(e,this.context,this.entity)}getPermissionPolicies(e){return this.entity.permissions.filter((t=>t.permission===e))}addPermissionPolicy(e){this.entity.permissions=(0,a.a)(this.entity.permissions,e)}removePermissionPolicy(e,t){this.entity.permissions=(0,a.T)(this.entity.permissions,e,t)}async getEditorConfig(e,t){return(0,u.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,m.t)((0,c.kI)(this.entity),t,this.context.hubRequestOptions):(0,c.kI)(this.entity)}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}if(delete e._thumbnail,this.thumbnailCache)if(this.thumbnailCache.clear)await async function(e,t){const{portal:r}=t,n=`${r}/community/groups/${e}/deleteThumbnail`;return(0,h.WY)(n,t)}(this.entity.id,this.context.userRequestOptions);else{await async function(e,t,r,n,i){const s=Object.assign({group:{id:e},owner:i,params:{thumbnail:t,fileName:r},filename:r},n);try{if(!(await(0,l.mD)(s)).success)throw new d.Z("Set Group Thumbnail","Unknown error setting thumbnail.")}catch(e){throw e instanceof Error?new d.Z("Set Group Thumbnail",e.message,e):new d.Z("Set Group Thumbnail","Unknown error setting thumbnail.")}}(this.entity.id,this.thumbnailCache.file,this.thumbnailCache.filename,this.context.userRequestOptions,this.entity.owner),this.entity.thumbnail=`thumbnail/${this.thumbnailCache.filename}`;const e=(0,i.Q)(this.entity);this.entity.thumbnailUrl=(0,p.PP)(this.context.userRequestOptions.portal,e),this.thumbnailCache=null}const t=(0,c.kI)(e);return this.entity=t,await this.save(),this.entity}}},228246:(e,t,r)=>{"use strict";r.d(t,{LJ:()=>C,KD:()=>_,Fx:()=>I,F:()=>A,q7:()=>O});var n=r(170209),i=r(248849),s=r(264263),o=r(615503),a=r(787662);const c=(e,t,r)=>{const{data:n,stack:s,requestOptions:o}=t;return s.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:(0,i.g)(e,n.errors)}),stack:s,requestOptions:o}},u={membershipSummary:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupMembershipSummary"),o=Object.assign({num:3},i);return(0,n.zv)(t.group.id,o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{membershipSummary:{total:e.total,users:e.users}}),stack:r,requestOptions:i}
6))).catch((t=>c(t,e,s)))},contentCount:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupContentCount"),o=Object.assign({groupId:t.group.id,num:1},i);return(0,n.Nt)(o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{contentCount:e.total}),stack:r,requestOptions:i}))).catch((t=>c(t,e,s)))},userMembership:e=>{const{data:t,stack:r,requestOptions:i}=e,o=r.start("enrichGroupUserMembership");return(0,n.ex)(t.group.id,i).then((e=>(r.finish(o),{data:Object.assign(Object.assign({},t),{membershipAccess:e.membershipAccess,userMembership:(0,s.W)(e,"userMembership.memberType")}),stack:r,requestOptions:i}))).catch((t=>c(t,e,o)))}};var l=r(94684),d=r(348157),p=r(507707),h=r(40180),m=r(975789),f=r(907463),g=r(18343),y=r(822409),b=r(223040),v=r(934864),w=r(672371),S=r(185744);async function E(e,t,r=0){let n=e;return r&&(n=`${e} ${r}`),async function(e,t){const r={targetEntity:"group",filters:[{predicates:[{title:e}]}]};try{const{results:e}=await(0,S.B)(r,{requestOptions:t});return e.length>0}catch(e){throw Error(`Error in getUniqueGroupTitle > doesGroupExist: ${e}`)}}(n,t).then((i=>i?(r++,E(e,t,r)):n)).catch((e=>{throw Error(`Error in getUniqueGroupTitle: ${e}`)}))}var T=r(906730);async function I(e,t,r){const n={access:e.access,id:e.id,type:"Group",name:e.title,owner:e.owner,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"group.created",updatedDate:new Date(e.modified),updatedDateSource:"group.modified",family:"team",links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},rawResult:e};n.isSharedUpdate=(e.capabilities||[]).includes("updateitemcontrol"),n.membershipAccess=e.membershipAccess,n.isOpenData=!!e.isOpenData;const i=(t=[...t].filter(p.Tw)).map(d.u),c=(0,h.e)("enrichment",i).filter(p.Tw);let l={};return c.length&&(l=await function(e,t,r){const n=t.reduce(((e,t)=>{const r=u[t];return r&&e.push(r),e}),[]);return(0,a.G)(n)({data:{group:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}(e,c,r)),i.forEach((e=>{n[e.prop]=(0,s.W)(l,e.path)})),n.links=(0,w.E)(e,r),n}async function C(e,t){const r=Object.assign(Object.assign({},m.P$),e),i=await E(r.name,t.userRequestOptions);r.name=i,r.typeKeywords=(0,y.Wb)(r.typeKeywords,r.isDiscussable);const s=(0,f.Q)(r),o={group:s,authentication:t.userRequestOptions.authentication},a=await(0,n.sS)(o);s.protected&&(a.group.protected=(await(0,n.Et)({id:a.group.id,authentication:t.userRequestOptions.authentication})).success);const c=(0,g.f)(a.group,null,t.userRequestOptions);if(!t.isPortal){const e=await(0,T.Q)(Object.assign(Object.assign({},r),{id:c.id}),t.hubRequestOptions);c.entitySettingsId=e.id,c.discussionSettings=e.settings.discussions}return c}async function A(e,t){const r=await(0,n.ex)(e,t);let i;return i=t.isPortal?Object.assign({id:null},(0,v.A)("group")):await(0,b.Fn)(Object.assign({id:r.id},t)).catch((()=>Object.assign({id:null},(0,v.A)("group")))),(0,g.f)(r,i,t)}async function O(e,t){e.typeKeywords=(0,y.Wb)(e.typeKeywords,e.isDiscussable);const r=(0,f.Q)(e),i={group:r,authentication:t.requestOptions.authentication};if(r._clearEmptyFields&&(0,l.t)("params.clearEmptyFields",!0,i),await(0,n.mD)(i),!t.isPortal){const r=await(0,T.Q)(e,t.hubRequestOptions);e.entitySettingsId=r.id,e.discussionSettings=r.settings.discussions}return e}async function _(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,n.BN)(r)}},7375:(e,t,r)=>{"use strict";r.d(t,{GroupSchema:()=>s,v:()=>i});var n=r(167420);const i=["hub:group:edit","hub:group:settings","hub:group:settings:discussions","hub:group:create:followers","hub:group:create:association","hub:group:create:view","hub:group:create:edit","hub:group:create"],s={required:["name"],type:"object",properties:{name:n.oG,summary:Object.assign(Object.assign({},n.Z3),{maxLength:250}),description:{type:"string"},_thumbnail:n.W6,access:{type:"string",enum:["private","org","public"],default:"private"},isSharedUpdate:{type:"boolean",enum:[!1,!0],default:!1},leavingDisallowed:{type:"boolean",enum:[!1,!0],default:!1},isOpenData:{type:"boolean",enum:[!1,!0],default:!1},membershipAccess:{type:"string",enum:["organization","collaborators","anyone"],default:"organization"}
6,isViewOnly:{type:"boolean",enum:[!1,!0],default:!1},_join:{type:"string",enum:["invite","request","auto"],default:"invite"},hiddenMembers:{type:"boolean",enum:[!1,!0],default:!1},isDiscussable:n.PH,discussionSettings:n.Oo,tags:n.Ld}}},672371:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var n=r(563447),i=r(268304),s=r(589585),o=r(371740);function a(e,t){let r;return t.authentication&&(r=t.authentication.token),{self:(0,i.t)(e.id,t),siteRelative:`/groups/${e.id}`,siteRelativeEntityType:(0,o.bC)("Group"),workspaceRelative:(0,n.C)("Group",e.id),thumbnail:(0,s.PP)(t.portal,e,r)}}},18343:(e,t,r)=>{"use strict";r.d(t,{f:()=>u});var n=r(572269),i=r(822409),s=r(934864),o=r(589585),a=r(672371),c=r(86201);function u(e,t,r){return function(e,t,r,n){var c,u,l,d;let p;n.authentication&&(p=n.authentication.token),t.thumbnailUrl=(0,o.PP)(n.portal,e,p),t.createdDate=new Date(e.created),t.createdDateSource="group.created",t.updatedDate=new Date(e.modified),t.updatedDateSource="group.modified",t.type="Group",t.isDiscussable=(0,i.BV)(e),t.isSharedUpdate=(e.capabilities||[]).includes("updateitemcontrol"),t.memberType=null===(c=e.userMembership)||void 0===c?void 0:c.memberType,t.membershipAccess="anyone","org"===e.membershipAccess&&(t.membershipAccess="organization"),"collaboration"===e.membershipAccess&&(t.membershipAccess="collaborators"),t.canEdit="owner"===(null===(u=e.userMembership)||void 0===u?void 0:u.memberType)||"admin"===(null===(l=e.userMembership)||void 0===l?void 0:l.memberType),t.canDelete=t.canEdit,t.links=(0,a.E)(e,n);const h=r||(0,s.A)("group");return t.entitySettingsId=null!==(d=h.id)&&void 0!==d?d:null,t.discussionSettings=h.settings.discussions,t}(e,new n.c7((0,c.s)()).storeToEntity(e,{}),t,r)}},907463:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});var n=r(572269),i=r(86201);function s(e){switch(e._join){case"invite":e.isInvitationOnly=!0,e.autoJoin=!1;break;case"request":e.isInvitationOnly=!1,e.autoJoin=!1;break;case"auto":e.isInvitationOnly=!1,e.autoJoin=!0}const t=new n.c7((0,i.s)()).entityToStore(e,{});return e.isSharedUpdate&&(t.capabilities="updateitemcontrol"),"organization"===t.membershipAccess&&(t.membershipAccess="org"),"collaborators"===t.membershipAccess&&(t.membershipAccess="collaboration"),"anyone"===t.membershipAccess&&(t.membershipAccess="",t._clearEmptyFields=!0),t}},86201:(e,t,r)=>{"use strict";function n(){const e=[];return e.push({entityKey:"name",storeKey:"title"}),e.push({entityKey:"summary",storeKey:"snippet"}),e.push({entityKey:"permissions",storeKey:"properties.permissions"}),["access","autoJoin","description","id","isInvitationOnly","isDiscussable","isReadOnly","isViewOnly","membershipAccess","owner","orgId","protected","sortField","sortOrder","tags","thumbnail","thumbnailUrl","typeKeywords","userMembership","isOpenData","hiddenMembers","leavingDisallowed"].forEach((t=>{e.push({entityKey:t,storeKey:t})})),e}r.d(t,{s:()=>n})},919871:(e,t,r)=>{"use strict";r.d(t,{H:()=>s});var n=r(285581),i=r(170209);function s(e){const t=(0,n.D)(i.R9,{success:!0}),r=(0,n.D)(i.BN,{success:!0});return t(e).then((()=>r(e)))}},122830:(e,t,r)=>{"use strict";r.d(t,{c:()=>m});var n=r(264263),i=r(518944),s=r(507707),o=r(948720),a=r(847974),c=r(115097),u=r(404042),l=r(733350),d=r(467946),p=r(232659),h=r(91271);function m(e,t,r,m,f){const g=(0,s.kI)((0,i.t)(r,"portalSelf.user",{}));g.cOrgId=(0,n.W)(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId");const y={groupId:e,allUsers:t,primaryRO:r,email:m,secondaryRO:f,requestingUser:g,usersToAutoAdd:(0,d.J)(t,g),usersToInvite:(0,h.X)(t,g),usersToEmail:(0,p.o)(t,g,(0,n.W)(m,"copyMe"))};return(0,a.p)(y).then(c.y).then(u.y).then(l.N).then(o.I)}},272254:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_canEmailUser:()=>i.nA,_consolidateResults:()=>n.It,_formatAutoAddResponse:()=>n.ol,_getAutoAddUsers:()=>i.J2,_getEmailUsers:()=>i.oC,_getInviteUsers:()=>i.Xt,_isOrgAdmin:()=>i.OJ,_processAutoAdd:()=>n.pZ,_processInvite:()=>n.yO,_processPrimaryEmail:()=>n.yW,_processSecondaryEmail:()=>n.Nr,addUsersToGroup:()=>s.c});var n=r(524251),i=r(84926),s=r(122830),o=r(627364),a={};for(const e in o)["default","_consolidateResults","_formatAutoAddResponse","_processAutoAdd","_processInvite","_processPrimaryEmail","_processSecondaryEmail","_canEmailUser","_getAutoAddUsers","_getEmailUsers","_getInviteUsers","_isOrgAdmin","addUsersToGroup"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a)},627364:()=>{},948720:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=r(518944);function i(e){const{autoAddResult:t,inviteResult:r,primaryEmailResult:i,secondaryEmailResult:s}=e;let o;if(i||s){const e=[i,s].filter((e=>e)),t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat((0,n.t)(t,"errors",[]))),[]);o={success:t},r.length&&(o.errors=r)}return{success:[t,r,o].filter((e=>e)).every((e=>e.success)),autoAdd:t,invite:r,email:o}}},855957:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(348753),i=r(264263),s=r(72090);function o(e,t){if(e){const r=!(0,i.W)(e,"notAdded.length")&&!e.errors;if(t.autoAddResult={success:r},!r){const r=e.errors||[];(0,i.W)(e,"notAdded.length")&&r.push(new n.yE(`Users not auto-added: ${e.notAdded.join(", ")}`)),t.autoAddResult.errors=r;const o=t.usersToAutoAdd.filter((t=>(0,s.q)(e.notAdded,t.username)));t.usersToInvite=t.usersToInvite.concat(o)}}return t}},847974:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(264263),i=r(772944),s=r(855957);function o(e){return(0,i.a)((0,n.W)(e,"groupId"),(0,n.W)(e,"usersToAutoAdd"),(0,n.W)(e,"primaryRO.authentication")).then((t=>(0,s.o)(t,e)))}},115097:(e,t,r)=>{"use strict";r.d(t,{y:()=>s});var n=r(264263),i=r(121277);function s(e){return(0,i.p)((0,n.W)(e,"groupId"),(0,n.W)(e,"usersToInvite"),(0,n.W)(e,"primaryRO.authentication")).then((t=>(e.inviteResult=t,e)))}},404042:(e,t,r)=>{"use strict";r.d(t,{y:()=>o});var n=r(264263),i=r(588297),s=r(964249);function o(e){let t=Promise.resolve(e);return e.email&&(0,n.W)(e,"inviteResult.success")&&(t=(0,s.M)(e.usersToEmail,e.email,e.primaryRO.authentication,(0,i.O)(e.requestingUser)).then((t=>(e.primaryEmailResult=t,e)))),t}},733350:(e,t,r)=>{"use strict";r.d(t,{N:()=>c});var n=r(162656),i=r(588297),s=r(264263),o=r(518944),a=r(964249);function c(e){let t=Promise.resolve(e);if(e.email&&e.secondaryRO&&(0,s.W)(e,"inviteResult.success")){const r=(0,o.t)(e,"secondaryRO.portalSelf.user",{}),s=e.usersToInvite.filter((e=>(0,n.n)(e,r)));t=(0,a.M)(s,e.email,e.secondaryRO.authentication,(0,i.O)(r)).then((t=>(e.secondaryEmailResult=t,e)))}return t}},524251:(e,t,r)=>{"use strict";r.d(t,{It:()=>n.I,Nr:()=>s.N,ol:()=>i.o,pZ:()=>o.p,yO:()=>a.y,yW:()=>c.y});var n=r(948720),i=r(855957),s=r(733350),o=r(847974),a=r(115097),c=r(404042)},162656:(e,t,r)=>{"use strict";function n(e,t){return e.orgId===t.orgId}r.d(t,{n:()=>n})},467946:(e,t,r)=>{"use strict";function n(e,t){let r=[];if(-1!==t.privileges.indexOf("portal:admin:assignToGroups")){const n=[t.orgId,t.cOrgId].filter((e=>e));r=e.filter((e=>-1!==n.indexOf(e.orgId)))}return r}r.d(t,{J:()=>n})},232659:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(162656),i=r(91271);function s(e,t,r=!1){const s=(0,i.X)(e,t).filter((e=>(0,n.n)(e,t)));return r&&s.push(t),s}},91271:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(467946);function i(e,t){const r=(0,n.J)(e,t);return e.filter((e=>!r.some((t=>t.username===e.username))))}},588297:(e,t,r)=>{"use strict";function n(e){return"org_admin"===e.role&&!e.roleId}
6r.d(t,{O:()=>n})},84926:(e,t,r)=>{"use strict";r.d(t,{J2:()=>i.J,OJ:()=>a.O,Xt:()=>o.X,nA:()=>n.n,oC:()=>s.o});var n=r(162656),i=r(467946),s=r(232659),o=r(91271),a=r(588297)},943269:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var n=r(285581),i=r(772944),s=r(121277);async function o(e,t,r,o){const a=[],c=[],u=[],l=[],d=[];for(const p of t){let t=!0;const h={username:p,add:null,invite:null},m={username:p},f=(0,n.D)(i.a),g=(0,n.D)(s.p);if(o){const n=await f(e,[m],r.authentication);h.add=n,n.notAdded&&0!==n.notAdded.length?u.push(p):(t=!1,a.push(p))}if(t){const t=await g(e,[m],r.authentication);h.invite=t,t.success?c.push(p):l.push(p)}d.push(h)}return{added:a,invited:c,notAdded:u,notInvited:l,responses:d}}},772944:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(170209);function i(e,t,r){let i=Promise.resolve(null);if(t.length){const s={id:e,users:t.map((e=>e.username)),authentication:r};i=(0,n.i1)(s)}return i}},975789:(e,t,r)=>{"use strict";r.d(t,{P$:()=>n});const n={name:"",access:"private",permissions:[],typeKeywords:[]}},964249:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(170209);function i(e,t,r,i){let s=Promise.resolve(null);if(e.length){const o={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map((e=>e.username))};i||(o.batchSize=1),s=(0,n.Dh)(o)}return s}},816783:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(496157);function i(e,t){const r=(0,n.P)("platform:portal:user:shareGroupToPublic",t).access&&"public",i=(0,n.P)("platform:portal:user:shareGroupToOrg",t).access&&"org";return{hubGroup:{type:"Group",access:"private",autoJoin:!1,isSharedUpdate:!1,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:"organization"},hubViewGroup:{type:"Group",access:r||i||"private",autoJoin:!1,isSharedUpdate:!1,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"anyone":"organization"},hubEditGroup:{type:"Group",access:"org",autoJoin:!1,isSharedUpdate:!0,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"collaborators":"organization"},hubFollowersGroup:{type:"Group",access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!0,leavingDisallowed:!1},hubAssociationsGroup:{type:"Group",access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!0,leavingDisallowed:!1,membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"anyone":"organization",protected:!0}}[e]}},932414:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HubGroup:()=>c.w,_unprotectAndRemoveGroup:()=>n.H,addGroupMembers:()=>u.b,autoAddUsers:()=>p.a,createHubGroup:()=>a.LJ,deleteHubGroup:()=>a.KD,emailOrgUsers:()=>m.M,enrichGroupSearchResult:()=>a.Fx,fetchHubGroup:()=>a.F,getWellKnownGroup:()=>l.o,inviteUsers:()=>h.p,isOpenDataGroup:()=>d.U,updateHubGroup:()=>a.q7});var n=r(919871),i=r(272254),s={};for(const e in i)["default","_unprotectAndRemoveGroup"].indexOf(e)<0&&(s[e]=()=>i[e]);r.d(t,s);var o=r(767340);s={};for(const e in o)["default","_unprotectAndRemoveGroup","_canEmailUser","_consolidateResults","_formatAutoAddResponse","_getAutoAddUsers","_getEmailUsers","_getInviteUsers","_isOrgAdmin","_processAutoAdd","_processInvite","_processPrimaryEmail","_processSecondaryEmail","addUsersToGroup"].indexOf(e)<0&&(s[e]=()=>o[e]);r.d(t,s);var a=r(228246),c=r(550896),u=r(943269),l=r(816783),d=r(150611),p=r(772944),h=r(121277),m=r(964249)},121277:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(170209);function i(e,t,r,i=20160,s="group_member"){let o=Promise.resolve(null);if(t.length){const a={id:e,users:t.map((e=>e.username)),authentication:r,role:s,expiration:i};o=(0,n.ee)(a)}return o}},150611:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});const n=e=>!!e.isOpenData},601001:()=>{},767340:(e,t,r)=>{"use strict";r.r(t);var n=r(601001),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(767268);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i)},767268:()=>{},505681:(e,t,r)=>{"use strict";r.d(t,{CK:()=>n,Mz:()=>a,b9:()=>i,i$:()=>o,if:()=>c,qG:()=>s});const n=["app","content","dataset","document","event","feedback","initiative","map","people","site","team","template","project","channel","discussion","eventAttendee","organization"];var i,s;!function(e){e.aptx="aptx",e.bpk="bpk",e.csv="csv",e.eaz="eaz",e.esriaddin="esriaddin",e.esriaddinx="esriaddinx",e.doc="doc",e.docx="docx",e.dlpk="dlpk",e.featurecollection="featurecollection",e.geojson="geojson",e.gcpk="gcpk",e.gpk="gpk",e.gpkg="gpkg",e.gpkx="gpkx",e.insightswbk="insightswbk",e.ipynb="ipynb",e.jpg="jpg",e.jpeg="jpeg",e.json="json",e.key="key",e.kml="kml",e.kmz="kmz",e.lpk="lpk",e.lpkx="lpkx",e.lyr="lyr",e.lyrx="lyrx",e.mapx="mapx",e.mmpk="mmpk",e.mpk="mpk",e.mpkx="mpkx",e.msd="msd",e.mspk="mspk",e.mxd="mxd",e.ncfg="ncfg",e.nmc="nmc",e.nmf="nmf",e.numbers="numbers",e.pages="pages",e.pagx="pagx",e.parquet="parquet",e.pdf="pdf",e.pmf="pmf",e.png="png",e.ppkx="ppkx",e.ppt="ppt",e.pptx="pptx",e.proconfigx="proconfigx",e.rpk="rpk",e.rptx="rptx",e.sd="sd",e.
6slpk="slpk",e.spk="spk",e.stylx="stylx",e.surveyaddin="surveyaddin",e.sxd="sxd",e.tif="tif",e.tiff="tiff",e.tpk="tpk",e.tpkx="tpkx",e.vsd="vsd",e.vtpk="vtpk",e.wmpk="wmpk",e.wpk="wpk",e.xls="xls",e.xml="xml",e.xlsx="xlsx",e.zip="zip",e["3dd"]="3dd",e["3vr"]="3vr",e["3ws"]="3ws",e["rft.json"]="rft.json",e["rft.xml"]="rft.xml"}(i||(i={})),function(e){e["360 VR Experience"]="360 VR Experience",e["Apache Parquet"]="Apache Parquet",e["AppBuilder Widget Package"]="AppBuilder Widget Package",e["Desktop Add In"]="Desktop Add In",e["Explorer Add In"]="Explorer Add In",e["Explorer Map"]="Explorer Map",e["Explorer Layer"]="Explorer Layer",e["Windows Mobile Package"]="Windows Mobile Package",e["ArcGIS Pro Add In"]="ArcGIS Pro Add In",e["ArcGIS Pro Configuration"]="ArcGIS Pro Configuration",e["Globe Document"]="Globe Document",e["Map Document"]="Map Document",e["ArcPad Package"]="ArcPad Package",e["Published Map"]="Published Map",e["Scene Document"]="Scene Document",e["CityEngine Web Scene"]="CityEngine Web Scene",e["Code Sample"]="Code Sample",e["CSV Collection"]="CSV Collection",e.CSV="CSV",e["CAD Drawing"]="CAD Drawing",e["Deep Learning Package"]="Deep Learning Package",e["Desktop Application"]="Desktop Application",e["Desktop Application Template"]="Desktop Application Template",e["Desktop Style"]="Desktop Style",e["Earth Configuration"]="Earth Configuration",e["Feature Collection"]="Feature Collection",e["File Geodatabase"]="File Geodatabase",e.GeoJson="GeoJson",e["Geoprocessing Package"]="Geoprocessing Package",e.GeoPackage="GeoPackage",e["Geoprocessing Sample"]="Geoprocessing Sample",e.GML="GML",e["Image Collection"]="Image Collection",e.Image="Image",e["iWork Keynote"]="iWork Keynote",e["iWork Numbers"]="iWork Numbers",e["iWork Pages"]="iWork Pages",e["KML Collection"]="KML Collection",e.KML="KML",e.Layer="Layer",e["Layer Package"]="Layer Package",e.Layout="Layout",e["Locator Package"]="Locator Package",e["Map Package"]="Map Package",e["Map Template"]="Map Template",e["Microsoft Excel"]="Microsoft Excel",e["Microsoft Powerpoint"]="Microsoft Powerpoint",e["Visio Document"]="Visio Document",e["Microsoft Word"]="Microsoft Word",e["Mobile Basemap Package"]="Mobile Basemap Package",e["Mobile Map Package"]="Mobile Map Package",e["Mobile Scene Package"]="Mobile Scene Package",e.Notebook="Notebook",e.PDF="PDF",e["Pro Map"]="Pro Map",e["Pro Report"]="Pro Report",e["Project Package"]="Project Package",e["Project Template"]="Project Template",e["Raster function template"]="Raster function template",e["Rule Package"]="Rule Package",e["Scene Package"]="Scene Package",e["Service Definition"]="Service Definition",e.Shapefile="Shapefile",e["Survey123 Add In"]="Survey123 Add In",e["Tile Package"]="Tile Package",e["Vector Tile Package"]="Vector Tile Package",e["Workflow Manager Package"]="Workflow Manager Package",e["Document Link"]="Document Link",e["Feature Service"]="Feature Service",e["Geocoding Service"]="Geocoding Service",e["Geodata Service"]="Geodata Service",e["Geometry Service"]="Geometry Service",e["Geoprocessing Service"]="Geoprocessing Service",e["Geoenrichment Service"]="Geoenrichment Service",e["Globe Service"]="Globe Service",e["Image Service"]="Image Service",e["Map Service"]="Map Service",e["Network Analysis Service"]="Network Analysis Service",e["Vector Tile Service"]="Vector Tile Service",e.WFS="WFS",e.WMS="WMS",e.WMTS="WMTS",e.OGCFeatureServer="OGCFeatureServer",e["Scene Service"]="Scene Service",e["Stream Service"]="Stream Service",e["Workflow Manager Service"]="Workflow Manager Service",e["Web Mapping Application"]="Web Mapping Application",e["Mobile Application"]="Mobile Application",e["AppBuilder Extension"]="AppBuilder Extension",e["Google Drive"]="Google Drive",e.Dropbox="Dropbox",e.OneDrive="OneDrive",e.StoryMap="StoryMap",e.Dashboard="Dashboard",e["Hub Project"]="Hub Project",e["Hub Initiative"]="Hub Initiative",e["Hub Site Application"]="Hub Site Application",e["Web Experience"]="Web Experience",e["Insights Workbook Package"]="Insights Workbook Package",e.Application="Application",e["ArcGIS Explorer Application Configuration"]="ArcGIS Explorer Application Configuration",e["ArcMap Document"]="ArcMap Document",e["Layer File"]="Layer File",e.ogcFeature="ogcFeature",e.FeatureServer="Feature Service",e.GeocodeServer="GeocodeServer",e.GeoDataServer="GeoDataServer",e.GeometryServer="GeometryServer",e.GeoenrichmentServer="GeoenrichmentServer",e.GPServer="GPServer",e.GlobeServer="GlobeServer",e.ImageServer="ImageServer",e.MapServer="MapServer",e.NAServer="NAServer",e.ElevationServer="ElevationServer",e.VectorTileServer="VectorTileServer",e["Scene Server"]="Scene Server",e.StreamServer="StreamServer",e.WMServer="WMServer",e.TiledImageServer="TiledImageServer"}(s||(s={}));const o={"360 VR Experience":{fileExt:[i["3dd"]],type:s["360 VR Experience"],t
6ypeKeywords:[]},"Apache Parquet":{fileExt:[i.parquet],type:s["Apache Parquet"],typeKeywords:[]},"AppBuilder Widget Package":{fileExt:[i.zip],type:s["AppBuilder Widget Package"],typeKeywords:[]},"Desktop Add In":{fileExt:[i.esriaddin],type:s["Desktop Add In"],typeKeywords:["Tool","Add In","Desktop Add In","ArcGIS Desktop","ArcMap","ArcGlobe","ArcScene","esriaddin"]},"Explorer Add In":{fileExt:[i.eaz],type:s["Explorer Add In"],typeKeywords:["Tool","Add In","Explorer Add In","ArcGIS Explorer","eaz"]},"Explorer Map":{fileExt:[i.nmf],type:s["Explorer Map"],typeKeywords:["Map","Explorer Map","Explorer Document","2D","3D","ArcGIS Explorer","nmf"]},"ArcGIS Explorer Application Configuration":{fileExt:[i.ncfg],type:s["Explorer Map"],typeKeywords:["Map","Explorer Map","Explorer Mapping Application","2D","3D","ArcGIS Explorer"]},"Explorer Layer":{fileExt:[i.nmc],type:s["Explorer Layer"],typeKeywords:["Data","Layer","Explorer Layer","ArcGIS Explorer","nmc"]},"Windows Mobile Package":{fileExt:[i.wmpk],type:s["Windows Mobile Package"],typeKeywords:[]},"ArcGIS Pro Add In":{fileExt:[i.esriaddinx],type:s["ArcGIS Pro Add In"],typeKeywords:["Tool","Add In","Pro Add In","esriaddinx"]},"ArcGIS Pro Configuration":{fileExt:[i.proconfigx],type:s["ArcGIS Pro Configuration"],typeKeywords:[]},"Globe Document":{fileExt:[i["3dd"]],type:s["Globe Document"],typeKeywords:["Map","Globe Document","3D","ArcGlobe","ArcGIS Server","3dd"]},"Map Document":{fileExt:[i.msd],type:s["Map Document"],typeKeywords:["Map Document","Map","2D","ArcMap","ArcGIS Server","msd"]},"ArcMap Document":{fileExt:[i.mxd],type:s["Map Document"],typeKeywords:["Map Document","Map","2D","ArcMap","ArcGIS Server"]},"ArcPad Package":{fileExt:[i.zip],type:s["ArcPad Package"],typeKeywords:["Map","Layer","Data"]},"Published Map":{fileExt:[i.pmf],type:s["Published Map"],typeKeywords:["Map","Published Map","2D","ArcReader","ArcMap","ArcGIS Server","pmf"]},"Scene Document":{fileExt:[i.sxd],type:s["Scene Document"],typeKeywords:["Map","Scene Document","3D","ArcScene","sxd"]},"CityEngine Web Scene":{fileExt:[i["3ws"]],type:s["CityEngine Web Scene"],typeKeywords:["3D","Map","Scene","Web"]},"Code Sample":{fileExt:[i.zip],type:s["Code Sample"],typeKeywords:["Code","Sample"]},"CSV Collection":{fileExt:[i.zip],type:s["CSV Collection"],typeKeywords:[]},CSV:{fileExt:[i.csv],type:s.CSV,typeKeywords:["CSV"]},"CAD Drawing":{fileExt:[i.zip],type:s["CAD Drawing"],typeKeywords:[]},"Deep Learning Package":{fileExt:[i.zip,i.dlpk],type:s["Deep Learning Package"],typeKeywords:["Deep Learning","Raster"]},"Desktop Application":{type:s["Desktop Application"],typeKeywords:["Desktop Application"]},"Desktop Application Template":{fileExt:[i.zip],type:s["Desktop Application Template"],typeKeywords:["application","template","ArcGIS desktop"]},"Desktop Style":{fileExt:[i.stylx],type:s["Desktop Style"],typeKeywords:["ArcGIS Pro","Symbology","Style","Symbols"]},"Earth Configuration":{fileExt:[i.xml],type:s["Earth Configuration"],typeKeywords:["ArcGIS Earth","Earth","Earth Configuration"]},"Feature Collection":{type:s["Feature Collection"],fileExt:[i.featurecollection],typeKeywords:[]},"File Geodatabase":{fileExt:[i.zip],type:s["File Geodatabase"],typeKeywords:[]},GeoJson:{fileExt:[i.geojson,i.json],type:s.GeoJson,typeKeywords:["Coordinates Type","CRS","Feature","FeatureCollection","GeoJSON","Geometry","GeometryCollection"]},"Geoprocessing Package":{fileExt:[i.gpk,i.gpkx],type:s["Geoprocessing Package"],typeKeywords:["ArcGIS Desktop","ArcGlobe","ArcMap","ArcScene","Geoprocessing Package","gpk","Model","Result","Script","Sharing","Tool","Toolbox"]},GeoPackage:{fileExt:[i.gpkg],type:s.GeoPackage,typeKeywords:["Data","GeoPackage","gpkg"]},"Geoprocessing Sample":{fileExt:[i.zip],type:s["Geoprocessing Sample"],typeKeywords:["tool","geoprocessing","sample"]},GML:{fileExt:[i.zip],type:s.GML,typeKeywords:[]},"Image Collection":{fileExt:[i.zip],type:s["Image Collection"],typeKeywords:[]},Image:{fileExt:[i.jpg,i.jpeg,i.png,i.tif,i.tiff],type:s.Image,typeKeywords:["Data","Image"]},"iWork Keynote":{fileExt:[i.key],type:s["iWork Keynote"],typeKeywords:["Data","Document","Mac"]},"iWork Numbers":{fileExt:[i.numbers],type:s["iWork Numbers"],typeKeywords:["Data","Document","Mac"]},"iWork Pages":{fileExt:[i.pages],type:s["iWork Pages"],typeKeywords:["Data","Document","Mac"]},"KML Collection":{fileExt:[i.zip],type:s["KML Collection"],typeKeywords:[]},KML:{type:s.KML,fileExt:[i.kml,i.kmz],typeKeywords:["Data","Map","kml"]}
6,Layer:{fileExt:[i.lyr],type:s.Layer,typeKeywords:["Data","Layer","ArcMap","ArcGlobe","ArcGIS Explorer","lyr"]},"Layer File":{fileExt:[i.lyrx],type:s.Layer,typeKeywords:["ArcGIS Pro","Layer","Layer File"]},"Layer Package":{fileExt:[i.lpk,i.lpkx],type:s["Layer Package"],typeKeywords:[]},Layout:{fileExt:[i.pagx],type:s.Layout,typeKeywords:["ArcGIS Pro","Layout","Layout File","pagx"]},"Locator Package":{fileExt:[i.gcpk],type:s["Locator Package"],typeKeywords:[]},"Map Package":{fileExt:[i.mpk,i.mpkx],type:s["Map Package"],typeKeywords:[]},"Map Template":{fileExt:[i.zip],type:s["Map Template"],typeKeywords:["map","ArcMap","template","ArcGIS desktop"]},"Microsoft Excel":{fileExt:[i.xls,i.xlsx],type:s["Microsoft Excel"],typeKeywords:["Data","Document","Microsoft Excel"]},"Microsoft Powerpoint":{fileExt:[i.ppt,i.pptx],type:s["Microsoft Powerpoint"],typeKeywords:["Data","Document","Microsoft Powerpoint"]},"Visio Document":{fileExt:[i.vsd],type:s["Visio Document"],typeKeywords:["Data","Document","Visio Document"]},"Microsoft Word":{fileExt:[i.doc,i.docx],type:s["Microsoft Word"],typeKeywords:["Data","Document"]},"Mobile Basemap Package":{fileExt:[i.bpk],type:s["Mobile Basemap Package"],typeKeywords:[]},"Mobile Map Package":{fileExt:[i.mmpk],type:s["Mobile Map Package"],typeKeywords:[]},"Mobile Scene Package":{fileExt:[i.mspk],type:s["Mobile Scene Package"],typeKeywords:[]},Notebook:{fileExt:[i.ipynb],type:s.Notebook,typeKeywords:["Notebook","Python"]},PDF:{fileExt:[i.pdf],type:s.PDF,typeKeywords:["Data","Document","PDF"]},"Pro Map":{fileExt:[i.mapx],type:s["Pro Map"],typeKeywords:["ArcGIS Pro","Map","Map File","mapx"]},"Pro Report":{fileExt:[i.rptx],type:s["Pro Report"],typeKeywords:[]},"Project Package":{fileExt:[i.ppkx],type:s["Project Package"],typeKeywords:[]},"Project Template":{fileExt:[i.aptx],type:s["Project Template"],typeKeywords:[]},"Raster function template":{fileExt:[i["rft.json"],i["rft.xml"]],type:s["Raster function template"],typeKeywords:["Raster","Functions","Processing","rft","srf","function template","templates","ArcGIS Pro"]},"Rule Package":{fileExt:[i.rpk],type:s["Rule Package"],typeKeywords:[]},"Scene Package":{fileExt:[i.slpk,i.spk],type:s["Scene Package"],typeKeywords:[]},"Service Definition":{fileExt:[i.sd],type:s["Service Definition"],typeKeywords:["Data","Service","Service Definition"]},Shapefile:{fileExt:[i.zip],type:s.Shapefile,typeKeywords:["Data","
6Layer","shapefile"]},"Survey123 Add In":{fileExt:[i.surveyaddin],type:s["Survey123 Add In"],typeKeywords:["Add In","Survey123 Add In","Tool"]},"Tile Package":{fileExt:[i.tpk,i.tpkx],type:s["Tile Package"],typeKeywords:[]},"Vector Tile Package":{fileExt:[i.vtpk],type:s["Vector Tile Package"],typeKeywords:[]},"Workflow Manager Package":{fileExt:[i.wpk],type:s["Workflow Manager Package"],typeKeywords:[]},"Document Link":{type:s["Document Link"],typeKeywords:["Data","Document"]},"Feature Service":{type:s["Feature Service"],typeKeywords:["ArcGIS Server","Data","Feature Access","Feature Service","Service","Singlelayer","Hosted Service"]},GeocodeServer:{type:s["Geocoding Service"],typeKeywords:["ArcGIS Server","Geocoding Service","Locator Service","Service","Tool","Service Proxy"]},GeoDataServer:{type:s["Geodata Service"],typeKeywords:["Data","Service","Geodata Service","ArcGIS Server"]},GeometryServer:{type:s["Geometry Service"],typeKeywords:["Tool","Service","Geometry Service","ArcGIS Server"]},GeoenrichmentServer:{type:s["Geoenrichment Service"],typeKeywords:["Geoenrichment Service","ArcGIS Server"]},GPServer:{type:s["Geoprocessing Service"],typeKeywords:["Tool","Service","Geoprocessing Service","ArcGIS Server"]},GlobeServer:{type:s["Globe Service"],typeKeywords:["Data","Service","Globe Service","ArcGIS Server"]},ImageServer:{type:s["Image Service"],typeKeywords:["Data","Service","Image Service","ArcGIS Server"]},MapServer:{type:s["Map Service"],typeKeywords:["Data","Service","Map Service","ArcGIS Server"]},NAServer:{type:s["Network Analysis Service"],typeKeywords:["Tool","Service","Network Analysis Service","ArcGIS Server"]},ElevationServer:{type:s["Image Service"],typeKeywords:["Elevation 3D Layer"]},VectorTileServer:{type:s["Vector Tile Service"],typeKeywords:[]},WFS:{type:s.WFS,typeKeywords:["Data","Service","Web Feature Service","OGC"]},WMS:{type:s.WMS,typeKeywords:["Data","Service","Web Map Service","OGC"]},WMTS:{type:s.WMTS,typeKeywords:["Data","Service","OGC"]},ogcFeature:{type:s.OGCFeatureServer,typeKeywords:["Data","Service","Feature Service","OGC","OGC Feature Service"]},SceneServer:{type:s["Scene Service"],typeKeywords:["Scene Service"]},StreamServer:{type:s["Stream Service"],typeKeywords:["Data","Service","Stream Service","ArcGIS Server"]},WMServer:{type:s["Workflow Manager Service"],typeKeywords:["Workflow Manager","ArcGIS Server","WMServer","Workflow","JTX","Job Tracking"]},TiledImageServer:{type:s["Image Service"],typeKeywords:["Tiled Imagery"]},"Web Mapping Application":{type:s["Web Mapping Application"],typeKeywords:["JavaScript","Map","Mapping Site","Online Map","Ready To Use","Web AppBuilder","Web Map (+ WAB2D or WAB3D)"]},"Mobile Application":{type:s["Mobile Application"],typeKeywords:["ArcGIS Mobile Map","Mobile Application"]},"AppBuilder Extension":{type:s["AppBuilder Extension"],typeKeywords:["Widget","App Builder"]},"Google Drive":{type:s["Google Drive"],typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},Dropbox:{type:s.Dropbox,typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},OneDrive:{type:s.OneDrive,typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},"Map Service":{type:s["Map Service"],typeKeywords:["ArcGIS Server","Data","Map Service","Service","Hosted Service"]},StoryMap:{type:s.StoryMap,typeKeywords:["arcgis-storymaps","StoryMap","Web Application (smstatusdraft or smsstatuspublished)"]},Dashboard:{type:s.Dashboard,typeKeywords:["Dashboard","Operations Dashboard"]},"Hub Initiative":{type:s["Hub Initiative"],typeKeywords:["Hub","hubInitiative","OpenData"]},"Hub Site Application":{type:s["Hub Site Application"],typeKeywords:["Hub","hubSite","hubSolution","JavaScript","Map","Mapping Site","Online Map","OpenData","Ready To Use","selfConfigured","Web Map","Registered App"]},"Web Experience":{type:s["Web Experience"],typeKeywords:["EXB Experience","JavaScript","Ready To Use Web Application","Web Experience","Web Mapping Application","Web Page","Web Site"]},"Insights Workbook Package":{type:s["Insights Workbook Package"],fileExt:[i.insightswbk],typeKeywords:["Insights","Insights Workbook Package"]}};var a,c;!function(e){e.notStarted="notStarted",e.inProgress="inProgress",e.onHold="onHold",e.complete="complete"}(a||(a={})),function(e){e.map="map",e.image="image"}(c||(c={}))},800538:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(539326);function i(e="en"){let t="en";if(e=e.toLowerCase(),n.q.indexOf(e)>-1)t=e;else{const r=e.split("-");r.length>1&&n.q.indexOf(r[0])>-1&&(t=r[0])}return t}},246007:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(675404);function i(e,t,r="cors"){const i=`${(0,n.l)(t)}/locales/${e}.json`.toLocaleLowerCase();return fetch(i,{method:"GET",credentials:"same-origin",mode:r}).then((e=>e.json())).catch((t=>{throw Error(`Attempt to fetch locale ${e} from ${i} failed: ${JSON.stringify(t)}`)}))}},552318:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(264263);function i(e){return(0,n.W)(e,"portalSelf.user.culture")||(0,n.W)(e,"portalSelf.culture")||"en-us"}},539326:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});const 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"]},437398:(e,t,r)=>{"use strict";r.d(t,{D_:()=>s.D,Zi:()=>i.Z,aF:()=>n.a,qm:()=>o.q});var n=r(800538),i=r(246007),s=r(552318),o=r(539326)},690259:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALPHA_ORGS:()=>a.wO,ASSOCIATION_REFERENCE_LIMIT:()=>n.g,AclCategory:()=>b.RI,AclSubCategory:()=>b.B8,ArcGISContext:()=>o.Mq,ArcGISContextManager:()=>a.SF,ArcgisHubDownloadError:()=>p.m4,ArcgisHubDownloadFileTooLargeError:()=>
6p.hf,CANNOT_DISCUSS:()=>b.fX,ChannelFilter:()=>b.ww,ChannelRelation:()=>b.Uz,ChannelSort:()=>b.LY,CommonSort:()=>b.jF,DeliveryMethod:()=>I.Gl,DiscussionSource:()=>b.p2,DiscussionType:()=>b.Og,DownloadOperationStatus:()=>p.My,ENTERPRISE_HOME_SUBDOMAIN:()=>o.M7,ENTERPRISE_SITES_PATH:()=>o.me,ENTERPRISE_SITES_SERVICE_STATUS:()=>a.kl,EntityEditor:()=>K.c,EntitySettingType:()=>b.qF,FileExtension:()=>j.b9,GLOBAL_EXTENT:()=>h.cq,GeoJSONPolygonToBBox:()=>h.Uf,HUB_CDN_URLMAP:()=>F.PF,HUB_LOCALES:()=>f.qm,HUB_SERVICE_STATUS:()=>a.c0,HubChannel:()=>v.lM,HubContent:()=>u.QA,HubDiscussion:()=>b.GY,HubEntityHero:()=>j.if,HubEntityStatus:()=>j.Mz,HubError:()=>ce.Z,HubEvent:()=>S.qz,HubEventAttendanceType:()=>S.wP,HubEventCapacityType:()=>S.St,HubFamilies:()=>j.CK,HubInitiative:()=>g.Mz,HubInitiativeTemplate:()=>y.ft,HubPage:()=>_.T,HubProject:()=>P.M6,HubTemplate:()=>N.Pp,ItemType:()=>j.qG,JobRecordStatus:()=>u.cq,JobRecordType:()=>u.sw,MENTION_ATTRIBUTE:()=>b.fL,NewsletterCadence:()=>I.gT,OperationError:()=>ae.Z,OperationStack:()=>oe.Z,PORTAL_EXPORT_TYPES:()=>p.Yh,PostReaction:()=>b.y4,PostRelation:()=>b.ZK,PostSort:()=>b.H_,PostStatus:()=>b.$4,PostType:()=>b.hQ,REQUIRED_PRIVS:()=>i.ol,ReactionRelation:()=>b.nF,RemoteServerError:()=>k.m,Role:()=>b.uU,STANDARD_LICENSES:()=>E.zs,SchedulerCadence:()=>C.Z2,SchedulerDeliveryMethod:()=>C.KB,SchedulerSubscriptionAction:()=>C.yL,SchedulerSystemNotificationSpecNames:()=>C.ZZ,SearchPostsFormat:()=>b.Fr,ServiceCapabilities:()=>u.GY,ServiceDownloadFormat:()=>p.YH,SharingAccess:()=>b.Iw,SortOrder:()=>b.As,SubscriptionAction:()=>I.os,SubscriptionEntityType:()=>C.LW,SystemNotificationSpecNames:()=>I.yJ,UpdateFrequency:()=>u.v9,WGS84_WKID:()=>p.mq,_addTokenToResourceUrl:()=>x.oA,_deepMapValues:()=>A.c,_getHttpAndHttpsUris:()=>
6F.mT,_getLocation:()=>F.G,_isDate:()=>A.Q6,_isFunction:()=>A.cg,_isObject:()=>A.x5,_isRegExp:()=>A.W8,_isString:()=>A.r9,_mapValues:()=>A.t2,_unprotectAndRemoveItem:()=>E.$_,acceptAssociation:()=>n.ZH,addContextToSlug:()=>u.tl,addCreateItemTypes:()=>j.i$,addDays:()=>L.E4,addHistoryEntry:()=>re.j,addSolutionResourceUrlToAssets:()=>x.lK,aggregateMetrics:()=>W.zv,allCoordinatesPossiblyWGS84:()=>h.nc,applyPropertiesToItems:()=>E.ug,arrayToObject:()=>L.FB,atob:()=>ue.atob,bBoxToExtent:()=>h.Vu,bboxToString:()=>h.CF,breakAssociation:()=>n.Cq,btoa:()=>ue.btoa,buildExistingExportsPortalQuery:()=>p.nc,buildUrl:()=>F.Q2,buildWhereClause:()=>W.M1,cacheBustUrl:()=>F.ZP,camelize:()=>L._A,canCreateChannel:()=>b.Sy,canCreateChannelV2:()=>b.GJ,canCreatePost:()=>b.sm,canCreatePostV2:()=>b.i_,canCreateReaction:()=>b.Mg,canCreateReactionV2:()=>b.Hp,canCreateReply:()=>b.jK,canCreateReplyV2:()=>b.pG,canDeleteChannel:()=>b.Ym,canDeleteChannelV2:()=>b.T2,canDeletePost:()=>b.Rz,canDeletePostV2:()=>b.l6,canEditChannel:()=>b.G6,canEditChannelV2:()=>b.xK,canEditEvent:()=>i.F5,canEditItem:()=>i.J2,canEditPost:()=>b.CY,canEditPostStatus:()=>b.G$,canEditPostStatusV2:()=>b._w,canEditPostV2:()=>b.FR,canEditSite:()=>i.hZ,canEditSiteContent:()=>i.Af,canModifyChannel:()=>b.x2,canModifyPost:()=>b.$g,canModifyPostStatus:()=>b.BP,canPostToChannel:()=>b.qU,canReadChannel:()=>b.IO,canReadChannelV2:()=>b.LW,canReadFromChannel:()=>b.lX,canUseCreateReplica:()=>p.Ki,canUseHubDownloadApi:()=>p.mG,canUseHubDownloadSystem:()=>p.r6,cannotCreatePostGroupsBlockedV2:()=>b.X9,capitalize:()=>L.kC,catalogContains:()=>se.r,categories:()=>c.b,channelToSearchResult:()=>b.Ge,chunkArray:()=>L.F3,cloneObject:()=>L.kI,commitItemUpload:()=>R.wd,compose:()=>L.qC,composeContent:()=>u.Hk,composeHubContent:()=>u.Te,constructSlug:()=>E.fU,convertClientEventToHubEvent:()=>S.eO,convertItemToContent:()=>u.ko,convertItemToDiscussion:()=>b.WP,convertItemToInitiative:()=>g.p8,convertItemToInitiativeTemplate:()=>y.QA,convertItemToPage:()=>_.VC,convertItemToProject:()=>P.j3,convertItemToTemplate:()=>N.xe,convertModelToPage:()=>_.nu,convertSolutionTemplateResourcesToAssets:()=>x.lD,convertToWellKnownLocale:()=>f.aF,convertUrlsToAnchorTags:()=>F.wV,convertUserToHubUser:()=>G.gU,createChannel:()=>b.mi,createChannelNotificationOptOut:()=>b.$6,createChannelNotificationOptOutV2:()=>b.y6,createChannelV2:()=>b.Ww,createContent:()=>u.K1,createDiscussion:()=>b.vv,createExtent:()=>h.sA,createHubChannel:()=>v.Pw,createHubEvent:()=>S.hy,createHubEventRegistration:()=>S.Tb,createId:()=>L.Mc,createInitiative:()=>g.jA,createInitiativeTemplate:()=>y.cP,createItem:()=>R.fC,createItemFromFile:()=>E.Wh,createItemFromUrl:()=>E.km,createItemFromUrlOrFile:()=>E.Pl,createModel:()=>T.NY,createPage:()=>_.D4,createPost:()=>b.qb,createPostV2:()=>b.U5,createProject:()=>P.$L,createReaction:()=>b.wC,createReactionV2:()=>b.pR,createReply:()=>b.PP,createReplyV2:()=>b.PS,createSetting:()=>b.fj,createSettingV2:()=>b.qH,createSubscription:()=>I.XW,createTemplate:()=>N.Mn,createUser:()=>I.r4,datasetToContent:()=>u.J4,datasetToItem:()=>u.IZ,deepCatalogContains:()=>ne.P,deepDeletePropByValue:()=>A.zI,deepEqual:()=>A.vZ,deepFilter:()=>A.JS,deepFind:()=>A.MX,deepFindById:()=>A.wA,deepSet:()=>A.qm,deepStringReplace:()=>A.ig,deleteContent:()=>u.yd,deleteDiscussion:()=>b.lg,deleteHubChannel:()=>v.Uq,deleteHubEvent:()=>S.Vq,deleteHubEventRegistration:()=>S.IF,deleteInitiative:()=>g.dK,deleteInitiativeTemplate:()=>y.uA,deleteItemThumbnail:()=>E.fJ,deletePage:()=>_.CT,deleteProject:()=>P.th,deleteProp:()=>E.fL,deleteTemplate:()=>N.Xc,deleteUser:()=>I.h8,deriveUserRoleV2:()=>b.AY,discussionsApiRequest:()=>b.eR,discussionsApiRequestV2:()=>b.JL,doesItemExistWithTitle:()=>E.I7,doesResourceExist:()=>x.of,editorToContent:()=>u.Bp,editorToMetric:()=>W.Ag,editorToTemplate:()=>N.OH,enrichContentSearchResult:()=>u.vl,enrichInitiativeSearchResult:()=>g.J5,enrichInitiativeTemplateSearchResult:()=>y.nV,enrichPageSearchResult:()=>_.Hy,enrichProjectSearchResult:()=>P.D6,enrichTemplateSearchResult:()=>N.Gb,enrichUserSearchResult:()=>G.RG,ensureProp:()=>A.uZ,explainQueryResult:()=>z.C,exportPosts:()=>
6b.Mv,exportPostsV2:()=>b.x3,extend:()=>L.l7,extentToBBox:()=>h.c5,extentToPolygon:()=>h.vP,failSafeUpdate:()=>E.A7,fetchAllPages:()=>E.qJ,fetchAndUploadResource:()=>x.gE,fetchAndUploadThumbnail:()=>x.dT,fetchChannel:()=>b.kI,fetchChannelNotifcationOptOut:()=>b.Of,fetchChannelNotifcationOptOutV2:()=>b.Rq,fetchChannelV2:()=>b.fA,fetchContent:()=>u.Z$,fetchDiscussion:()=>b.dK,fetchDownloadFile:()=>p.Ag,fetchEvent:()=>S.eZ,fetchHubChannel:()=>v.cy,fetchHubContent:()=>u.Jn,fetchHubTranslation:()=>f.Zi,fetchHubUser:()=>G.W6,fetchImageAsBlob:()=>x.oX,fetchInitiative:()=>g.AM,fetchInitiativeTemplate:()=>y.cw,fetchItem:()=>E.iY,fetchItemJobRecords:()=>u.SE,fetchMaxNumUserGroupsLimit:()=>O.kq,fetchModelFromItem:()=>T.UO,fetchModelResources:()=>T.wn,fetchOrg:()=>O.T7,fetchOrgLimits:()=>O.wm,fetchOrganization:()=>O.Ak,fetchPage:()=>_.H6,fetchPost:()=>b.SD,fetchPostV2:()=>b.mD,
7fetchProject:()=>P.GG,fetchSetting:()=>b.j$,fetchSettingV2:()=>b.Fn,fetchTemplate:()=>N.Dv,filterBy:()=>L.j,findBy:()=>L.zP,findItemsBySlug:()=>E.NS,flattenArray:()=>L.VF,followEntity:()=>E.Rs,getAssociatedEntitiesQuery:()=>n.QF,getAssociationStats:()=>n.Z0,getAvailableToRequestAssociationCatalogs:()=>n.G4,getAvailableToRequestEntitiesQuery:()=>n.cO,getCampaignUrl:()=>F.CX,getCardModelUrlFromEntity:()=>V.m,getCardModelUrlFromResult:()=>V.D,getCatalogGroups:()=>Y.r,getCategory:()=>u.n3,getCdnAssetUrl:()=>F.dW,getChannelAccess:()=>b.KX,getChannelGroupIds:()=>b.hw,getChannelOrgIds:()=>b.dC,getChannelUsersQuery:()=>b.Wv,getContentHomeUrl:()=>F.gp,getContentIdentifier:()=>u.WZ,getContentTypeIcon:()=>u.oB,getContentTypeLabel:()=>u.iN,getCulture:()=>f.D_,getDefaultEntitySettings:()=>b.AH,getDownloadConfiguration:()=>p.gZ,getDownloadFormats:()=>p.VU,getEntityFollowersGroupId:()=>
7E.Y_,getEntityMetrics:()=>W.Ev,getEventGroups:()=>S.gp,getExportItemTypeKeyword:()=>p.ey,getExportLayerTypeKeyword:()=>p.nW,getExtentCenter:()=>h.Dz,getFamily:()=>u._A,getFamilyTypes:()=>u.Pp,getGroupHomeUrl:()=>F.tV,getHubApiFromPortalUrl:()=>F.GG,getHubApiUrl:()=>s.g,getHubApiUrlFromPortal:()=>F.dD,getHubDownloadApiFormats:()=>p.z7,getHubEntityTypeFromPath:()=>ie.Zb,getHubLocaleAssetUrl:()=>F.ls,getHubUrlFromPortal:()=>F.Vb,getInputFeatureServiceModel:()=>w.Pc,getItemApiUrl:()=>F.pK,getItemAssets:()=>x.tF,getItemBySlug:()=>E.QR,getItemDataUrl:()=>F.mP,getItemHomeUrl:()=>F.$,getItemHubId:()=>u.O1,getItemIdentifier:()=>E.vo,getItemLayer:()=>u.l$,getItemLayerId:()=>u.Oi,getItemThumbnailUrl:()=>x.Sg,getLayerIdFromUrl:()=>u.Tf,getModel:()=>T.PD,getModelBySlug:()=>T.q9,getModelFromOptions:()=>E.G3,getOrgExtentAsBBox:()=>h.kk,getOrgThumbnailUrl:()=>x.SF,getPathForHubEntityType:()=>ie.Jc,getPendingEntitiesQuery:()=>n.cT,getPendingProjectsQuery:()=>g.dB,getPortalApiUrl:()=>F.ik,getPortalBaseFromOrgUrl:()=>F.Dw,getPortalUrl:()=>F.al,getPortalUrls:()=>u.ve,getPostCSVFileName:()=>b.vL,getPredicateValues:()=>J.H,getProp:()=>A.WJ,getProps:()=>A.AM,getProxyUrl:()=>u.b7,getReferencedEntityIds:()=>n.h9,getRequestingEntitiesQuery:()=>n.Ts,getS123EditUrl:()=>w.Zj,getS123ShareUrl:()=>w.NL,getServiceStatus:()=>u._8,getServiceTypeFromUrl:()=>F.Gb,getSourceFeatureServiceModelFromFieldworker:()=>w.MH,getSpatialRefTypeKeyword:()=>p._d,getStakeholderModel:()=>w.Rz,getStructuredLicense:()=>E.Dj,getSubscription:()=>I.pI,getSubscriptions:()=>I.tJ,getSurveyModels:()=>w.mJ,getTypeCategories:()=>u.r$,getTypes:()=>u.yu,getUniqueItemTitle:()=>E.I8,getUniqueSlug:()=>E.bb,getUser:()=>I.PR,getUserGroupsByMembership:()=>Q.q,getUserGroupsFromQuery:()=>Z.o,getUserHomeUrl:()=>F.n5,getWellKnownAssociationsCatalog:()=>n.Um,getWithDefault:()=>A.tj,hasBasePriv:()=>i.Lb,hasServiceCapability:()=>u.bI,hubApiRequest:()=>k.$,initiativeResultToCardModel:()=>g.ld,initiativeTemplateResultToCardModel:()=>y.lw,initiativeTemplateToCardModel:()=>y.we,initiativeToCardModel:()=>g.Ki,interpolate:()=>E.sX,interpolateItemId:()=>E.V2,isAGOFeatureServiceUrl:()=>u.Et,isBBox:()=>h.pi,isDiscussable:()=>b.BV,isDownloadable:()=>c.f,isDraft:()=>w.mv,isEnterprisePortalUrl:()=>F.eH,isFeatureService:()=>u.N,isFieldworkerView:()=>w.nd,isHostedFeatureServiceMainEntity:()=>u.E8,isHostedFeatureServiceMainItem:()=>u.ZM,isLayerView:()=>u.F4,isMapOrFeatureServerUrl:()=>F.TD,isNil:()=>L.kK,isOrgAdmin:()=>b.RN,isOrgAdminInOrg:()=>b.ho,isOrgChannel:()=>b.t7,isPrivateChannel:()=>b.pi,isPublicChannel:()=>b.qi,isSafeRedirectUrl:()=>F.v8,isSecureProxyServiceUrl:()=>u.wx,isService:()=>x.cs,isServicesDirectoryDisabled:()=>E.Om,isSiteType:()=>u.Z6,isSlug:()=>u.hb,isUserFollowing:()=>E.MV,isUserInOrg:()=>b.sd,isValidExtent:()=>h.ko,itemPropsNotInTemplates:()=>E.Ze,itemToContent:()=>u.iV,last:()=>L.Z$,maybeAdd:()=>L.fE,maybePush:()=>L.Yp,mergeObjects:()=>A.PM,modelToHubEditableContent:()=>u.lF,negateGroupPredicates:()=>X.O,normalizeItemType:()=>u.KF,normalizeSolutionTemplateItem:()=>E.yQ,notify:()=>C.h4,objectToArray:()=>L.JJ,objectToJsonBlob:()=>x.OA,orgExtent:()=>h.vU,parseContainmentPath:()=>ie._2,parseDatasetId:()=>u.tS,parseDiscussionURI:()=>b.hv,parseItemCategories:()=>u.UY,parseMentionedUsers:()=>b.tt,pathMap:()=>ie.hn,pickProps:()=>A.H6,portalToOrganization:()=>O.ud,portalToSearchResult:()=>O.yT,projectResultToCardModel:()=>P.MP,projectToCardModel:()=>P.So,reduceByGroupMembership:()=>b.v9,registerBrowserApp:()=>E.fd,removeChannel:()=>b.OG,removeChannelActivity:()=>b.TA,removeChannelActivityV2:()=>b.Rt,removeChannelNotificationOptOut:()=>b.fu,removeChannelNotificationOptOutV2:()=>b.KD,removeChannelV2:()=>b.sD,removeContextFromSlug:()=>u.d5,removeEmptyProps:()=>A.t_,removeHistoryEntry:()=>re.g,removePost:()=>b.M8,removePostV2:()=>b.oW,removeReaction:()=>b.WO,removeReactionV2:()=>b.Xq,removeResource:()=>x.ql,removeSetting:()=>b.Wf,removeSettingV2:()=>b.hk,replaceItemId:()=>E.P4,requestAssociation:()=>n.UQ,resolveMetric:()=>W.qd,resolveReferences:()=>A.CY,searchCatalogs:()=>ee.L,searchChannels:()=>b.r6,searchChannelsV2:()=>b.U4,searchEntityCatalogs:()=>te.D,searchPosts:()=>b.cl,searchPostsV2:()=>b.yB,serializeModel:()=>T.S3,serializeSpatialReference:()=>p.ZE,setContentType:()=>u.OG,setDiscussableKeyword:()=>b.Wb,setEntityAssociationGroup:()=>n.$c,setItemThumbnail:()=>E._s,setProp:()=>A.tg,setSlugKeyword:()=>E.KH,shareItemToGroups:()=>E.Ls,stringToBlob:()=>x.IS,stripProtocol:()=>F.G1,subscribe:()=>I.Ld,templateResultToCardModel:()=>N.ZU,templateToCardModel:()=>N.ek,toggleServiceCapability:()=>u.F7,unfollowEntity:()=>E.hZ,unique:()=>L.Tw,uniqueBy:()=>L.uw,unprotectModel:()=>E.vb,unshareItemFromGroups:()=>E.CT,updateChannel:()=>b.pW,updateChannelV2:()=>b.ip,updateContent:()=>u.x0,updateDiscussion:()=>b.Zt,updateHubChannel:()=>v.vL,updateHubEntity:()=>q.T,updateHubEvent:()=>S.qJ,updateInitiative:()=>g.xy,updateInitiativeTemplate:()=>y.w4,updateItem:()=>R.$G,updateModel:()=>T.QB,updatePage:()=>_.T$,updatePost:()=>b.CP,updatePostStatus:()=>b.LC,updatePostStatusV2:()=>b.ec,updatePostV2:()=>b.z6,updateProject:()=>P.ty,updateSetting:()=>b.m7,updateSettingV2:()=>b.SK,updateSubscription:()=>I.Mg,updateTemplate:()=>N.QB,updateUser:()=>I.Nq,upgradeProtocol:()=>F.Ue,uploadImageResource:()=>E.ZC,uploadResourcesFromUrl:()=>x.xO,upsertModelResources:()=>T.Ax,upsertResource:()=>x.Ej,userHasPrivilege:()=>b.am,userHasPrivileges:()=>b.PV,userResultToCardModel:()=>G.HL,validateUrl:()=>x.mQ,without:()=>L.zu});var n=r(767263),i=r(894952),s=r(641675),o=r(336253),a=r(127981),c=r(773807),u=r(961522),l=r(1195),d={};for(const e in l)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent"].indexOf(e)<0&&(d[e]=()=>l[e]);r.d(t,d);var p=r(652275),h=r(174564),m=r(932414);d={};for(const e in m)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
7SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent"].indexOf(e)<0&&(d[e]=()=>m[e]);r.d(t,d);var f=r(437398),g=r(885039),y=r(520351),b=r(508234),v=r(44644),w=r(863887),S=r(256935),E=r(293593),T=r(719339),I=r(891770),C=r(774843),A=r(297754),O=r(420562),_=r(703636),D=r(328209);d={};for(const e in D)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWG
7S84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage"].indexOf(e)<0&&(d[e]=()=>D[e]);r.d(t,d);
7var P=r(443087),k=r(313621),x=r(489218),R=r(88903),U=r(384460);d={};for(const e in U)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","
7isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","isPermission","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem"].indexOf(e)<0&&(d[e]=()=>U[e]);r.d(t,d);var M=r(327968);d={};for(const e in M)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
7SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","isPermission","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","CATALOG_SCHEMA_VERSION","Catalog","Collection","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeCatalogScope","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions"].indexOf(e)<0&&(d[e]=()=>M[e]);r.d(t,d);var N=r(193479),j=r(505681),$=r(668115);d={}
8;for(const e in $)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
8SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","isPermission","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","CATALOG_SCHEMA_VERSION","Catalog","Collection","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeCatalogScope","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
8isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes"].indexOf(e)<0&&(d[e]=()=>$[e]);r.d(t,d);var F=r(713417),G=r(171178),L=r(507707),H=r(362734);d={};for(const e in H)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWG
8S84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","isPermission","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","CATALOG_SCHEMA_VERSION","Catalog","Collection","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeCatalogScope","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
8isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes","HUB_CDN_URLMAP","_getHttpAndHttpsUris","_getLocation","buildUrl","cacheBustUrl","convertUrlsToAnchorTags","getCampaignUrl","getCdnAssetUrl","getContentHomeUrl","getGroupHomeUrl","getHubApiFromPortalUrl","getHubApiUrlFromPortal","getHubLocaleAssetUrl","getHubUrlFromPortal","getItemApiUrl","getItemDataUrl","getItemHomeUrl","getPortalApiUrl","getPortalBaseFromOrgUrl","getPortalUrl","getServiceTypeFromUrl","getUserHomeUrl","isEnterprisePortalUrl","isMapOrFeatureServerUrl","isSafeRedirectUrl","stripProtocol","upgradeProtocol","convertUserToHubUser","enrichUserSearchResult","fetchHubUser","userResultToCardModel","addDays","arrayToObject","camelize","capitalize","chunkArray","cloneObject","compose","createId","extend","filterBy","findBy","flattenArray","isNil","last","maybeAdd","maybePush","objectToArray","unique","uniqueBy","without"].indexOf(e)<0&&(d[e]=()=>H[e]);r.d(t,d);var B=r(589646);d={};for(const e in B)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","convertItemToContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","DISCUSSION_SETTINGS_SCHEMA","ENTERPRISE_SITE_ENTITY_NAME_SCHEMA","ENTITY_ACCESS_SCHEMA","ENTITY_CATALOG_SETUP_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validDiscussionSettingsEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","ArcgisHubDownloadFileTooLargeError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWG
8S84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","cannotCreatePostGroupsBlockedV2","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","deriveUserRoleV2","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","getInputFeatureServiceModel","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","isDraft","isFieldworkerView","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","isPermission","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","CATALOG_SCHEMA_VERSION","Catalog","Collection","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeCatalogScope","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
8isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes","HUB_CDN_URLMAP","_getHttpAndHttpsUris","_getLocation","buildUrl","cacheBustUrl","convertUrlsToAnchorTags","getCampaignUrl","getCdnAssetUrl","getContentHomeUrl","getGroupHomeUrl","getHubApiFromPortalUrl","getHubApiUrlFromPortal","getHubLocaleAssetUrl","getHubUrlFromPortal","getItemApiUrl","getItemDataUrl","getItemHomeUrl","getPortalApiUrl","getPortalBaseFromOrgUrl","getPortalUrl","getServiceTypeFromUrl","getUserHomeUrl","isEnterprisePortalUrl","isMapOrFeatureServerUrl","isSafeRedirectUrl","stripProtocol","upgradeProtocol","convertUserToHubUser","enrichUserSearchResult","fetchHubUser","userResultToCardModel","addDays","arrayToObject","camelize","capitalize","chunkArray","cloneObject","compose","createId","extend","filterBy","findBy","flattenArray","isNil","last","maybeAdd","maybePush","objectToArray","unique","uniqueBy","without","Logger","asyncForEach","base64ToUnicode","batch","clearMemoizedCache","createOperationPipeline","dasherize","ensureUniqueString","failSafe","fetchUserHubSettings","fetchUserSiteSettings","generateRandomString","getDatePickerDate","getEnvironmentFromPortalUrl","getEventThumbnail","getHubProduct","getObjectSize","getSubscriptionType","getTimePickerTime","guessTimeZone","includes","incrementString","isArrayEqual","isComboboxItemSelected","isCuid","isGuid","isUpdateGroup","mapBy","memoize","poll","processRevertableTasks","propifyString","runRevertableTask","slugify","titleize","unicodeToBase64","updateUserHubSettings","updateUserSiteSettings","wait","withoutByProp"].indexOf(e)<0&&(d[e]=()=>B[e]);r.d(t,d);var W=r(92025),q=r(457530),V=r(878187),K=r(167168),z=r(487600),Y=r(88508),J=r(654135),Q=r(674070),Z=r(611177),X=r(853179),ee=r(52223),te=r(452900),re=r(453672),ne=r(277810),ie=r(513903),se=r(47957),oe=r(615503),ae=r(66647),ce=r(841741),ue=r(899415)},554332:(e,t,r)=>{"use strict";r.d(t,{f:()=>f});var n=r(110571),i=r(2166),s=r(617665),o=r(411713),a=r(367838),c=r(215792),u=r(507707),l=r(682853),d=r(358637),p=r(850780),h=r(370427),m=r(94684);class f extends n.x{constructor(e,t){super(e,t),this._catalog=s.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new f(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=f.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.cw)(e,t.requestOptions);return f.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Initiative Template not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),e.orgUrlKey=e.orgUrlKey.toLowerCase(),Object.assign(Object.assign({},o.P3),e)}convertToCardModel(e){return(0,c.w)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,d.t)((0,u.kI)(this.entity),t,this.context.hubRequestOptions):(0,u.kI)(this.entity);return r._slug=(0,p.y)(this.entity),r}async fromEditor(e){const t=await(0,h.E)(e,this.context);return Object.entries(t).forEach((([e,t])=>{(0,m.t)(e,t,this)})),await this.save(),this.entity}update(e){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=s.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,l.w4)(this.entity,this.context.userRequestOptions):this.entity=await(0,l.cP)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.isDestroyed=!0,await(0,l.uA)(this.entity.id,this.context.userRequestOptions)}}},462794:(e,t,r)=>{"use strict";r.d(t,{W:()=>i,g:()=>n});const n={},i=[{permission:"hub:initiativeTemplate",services:["portal"]},{permission:"hub:initiativeTemplate:create",dependencies:["hub:initiativeTemplate"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:initiativeTemplate:view",dependencies:["hub:initiativeTemplate"]},{permission:"hub:initiativeTemplate:view:related",dependencies:["hub:initiativeTemplate:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:initiativeTemplate:edit",dependencies:["hub:initiativeTemplate"],authenticated:!0,entityEdit:!0},{permission:"hub:initiativeTemplate:delete",dependencies:["hub:initiativeTemplate"],authenticated:!0,entityDelete:!0},{permission:"hub:initiativeTemplate:canChangeAccess",dependencies:["hub:initiativeTemplate"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]}
8,{permission:"hub:initiativeTemplate:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:initiativeTemplate:workspace:dashboard",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:details",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:collaborators",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:settings",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:manage",dependencies:["hub:initiativeTemplate:edit"]}]},668220:(e,t,r)=>{"use strict";r.d(t,{InitiativeTemplateSchema:()=>s,g:()=>i});var n=r(181794);const i=["hub:initiativeTemplate:edit"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{previewUrl:{type:"string",if:{minLength:1},then:{format:"url"}},recommendedTemplates:{type:"array",items:{type:"string"}}})})},45970:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(853719);function i(e,t){return(0,n.g)(e,t)}},871906:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(398195),i=r(560133),s=r(462794),o=r(45970),a=r(471934);function c(e,t,r){var c;let u;return r.authentication&&(u=r.authentication.token),(t=(0,a.k)(e.item,t)).thumbnailUrl=(0,i.S)(e.item,r,u),t.features=(0,n.U)((null===(c=e.data.settings)||void 0===c?void 0:c.features)||{},s.g),t.links=(0,o.E)(e.item,r),t}},956373:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)();return e.push({entityKey:"previewUrl",storeKey:"item.properties.previewUrl"}),e.push({entityKey:"siteSolutionId",storeKey:"data.siteSolutionId"}),e.push({entityKey:"recommendedTemplates",storeKey:"data.recommendedTemplates"}),e}},411713:(e,t,r)=>{"use strict";r.d(t,{Nc:()=>s,P3:()=>i});const n="Hub Initiative Template",i={catalog:{schemaVersion:0},name:"No title provided",permissions:[],tags:[],typeKeywords:[n],schemaVersion:1,features:r(462794).g,values:{}},s={item:{type:n,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:[n],properties:{slug:"",schemaVersion:1,previewUrl:""}},data:{recommendedTemplates:[],siteSolutionId:""}}},682853:(e,t,r)=>{"use strict";r.d(t,{cP:()=>h,uA:()=>f,w4:()=>m});var n=r(719339),i=r(427033),s=r(170209),o=r(572269),a=r(411713),c=r(871906),u=r(956373),l=r(507707),d=r(822409),p=r(393960);async function h(e,t){const r=Object.assign(Object.assign({},a.P3),e);r.orgUrlKey=r.orgUrlKey.toLowerCase(),r.slug||(r.slug=(0,i.fU)(r.name,r.orgUrlKey)),await(0,p.E)(r,t),r.typeKeywords=(0,d.Wb)(r.typeKeywords,r.isDiscussable);const s=new o.c7((0,u.s)());let h=s.entityToStore(r,(0,l.kI)(a.Nc));h=await(0,n.NY)(h,t);let m=s.storeToEntity(h,{});return m=(0,c.F)(h,m,t),m}async function m(e,t){await(0,p.E)(e,t),e.typeKeywords=(0,d.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,n.PD)(e.id,t),i=new o.c7((0,u.s)()),s=i.entityToStore(e,r),a=await(0,n.QB)(s,t),l=i.storeToEntity(a,e);return e=(0,c.F)(r,l,t),l}async function f(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,s.cl)(r)}},367838:(e,t,r)=>{"use strict";r.d(t,{QA:()=>m,cw:()=>h,nV:()=>f});var n=r(170209),i=r(704059),s=r(371740),o=r(572269),a=r(427033),c=r(719339),u=r(526462),l=r(871906),d=r(956373),p=r(45970);async function h(e,t){let r;return r=(0,u.k)(e)?(0,n.rV)(e,t):(0,a.QR)(e,t),r.then((e=>e?m(e,t):null))}async function m(e,t){const r=await(0,c.UO)(e,t),n=new o.c7((0,d.s)()).storeToEntity(r,{});return(0,l.F)(r,n,t)}function f(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,s.jA)(e),rawResult:e};return n.links=(0,p.E)(e,r),n}},520351:(e,t,r)=>{"use strict";r.d(t,{QA:()=>s.QA,cP:()=>i.cP,cw:()=>s.cw,ft:()=>n.f,lw:()=>o.l,nV:()=>s.nV,uA:()=>i.uA,w4:()=>i.w4,we:()=>o.w});
8var n=r(554332),i=r(682853),s=r(367838),o=r(215792)},215792:(e,t,r)=>{"use strict";r.d(t,{l:()=>a,w:()=>o});var n=r(878187),i=r(704059),s=r(371740);const o=(e,t,r)=>{const{actionLinks:i=[],baseUrl:s="",locale:o="en-US",target:a="self"}=r||{},u=(0,n.m)(e,t,a,s);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:i,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:i="",locale:s="en-US",target:o="self"}=t||{},a=(0,n.D)(e,o,i);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,s)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,n;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(n=e.categories)||void 0===n?void 0:n.length)?[{i18nKey:"categories",value:(0,s.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,i._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},384704:(e,t,r)=>{"use strict";r.d(t,{M:()=>E});var n=r(290744),i=r(2166),s=r(507707),o=r(643331),a=r(617665),c=r(110571),u=r(332678),l=r(24910),d=r(572742),p=r(358637),h=r(518944),m=r(264263),f=r(94684),g=r(969123),y=r(170209),b=r(18343),v=r(850780),w=r(907463),S=r(370427);class E extends c.x{constructor(e,t){super(e,t),this._catalog=a.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new E(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=E.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,o.AM)(e,t.requestOptions);return E.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Initiative not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},n.S9),e)}update(e){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=a.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,o.xy)(this.entity,this.context.userRequestOptions):this.entity=await(0,o.jA)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.isDestroyed=!0,await(0,o.dK)(this.entity.id,this.context.userRequestOptions)}resolveMetric(e){const t=(0,u.E)(this.entity).find((t=>t.id===e));if(t)return(0,l.q)(t,this.context);throw new Error(`Metric ${e} not found.`)}convertToCardModel(e){return(0,d.K)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,p.t)((0,s.kI)(this.entity),t,this.context.hubRequestOptions):(0,s.kI)(this.entity),n=(0,u.E)(this.entity).find((t=>t.id===e.metricId)),i=(0,h.t)(this.entity,"view.metricDisplays",[]).find((t=>t.metricId===e.metricId))||{};r._metric=(0,g.h)(n,i);const o=(0,m.W)(this.entity,"associations.groupId");if(o){const e=await(0,y.ex)(o,this.context.requestOptions),t=(0,b.f)(e,null,this.context.userRequestOptions),n={groupAccess:t.access,membershipAccess:t.membershipAccess};r._associations=n}return r._slug=(0,v.y)(this.entity),r}async fromEditor(e){var t;const r=e._associations;delete e._associations;const n=await(0,S.E)(e,this.context),i=n.entity;Object.entries(n).forEach((([e,t])=>{(0,f.t)(e,t,this)}));const s=null===(t=i.associations)||void 0===t?void 0:t.groupId;if(s&&r){const e=(0,w.Q)(r);r.groupAccess&&await(0,y.mD)({group:{id:s,access:r.groupAccess},authentication:this.context.hubRequestOptions.authentication}),r.membershipAccess&&await(0,
9y.mD)({group:{id:s,membershipAccess:e.membershipAccess,clearEmptyFields:!0},authentication:this.context.hubRequestOptions.authentication})}return this.entity=i,await this.save(),this.entity}}},643331:(e,t,r)=>{"use strict";r.d(t,{p8:()=>N,jA:()=>x,dK:()=>M,J5:()=>j,AM:()=>U,dB:()=>$,xy:()=>R});var n=r(719339),i=r(427033),s=r(170209),o=r(572269),a=r(348157),c=r(248849),u=r(290744),l=r(752438);function d(){const e=(0,l.f)();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"contacts",storeKey:"data.contacts"}),e.push({entityKey:"timeline",storeKey:"data.timeline"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e.push({entityKey:"followersGroupId",storeKey:"item.properties.followersGroupId"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e}var p=r(560133),h=r(398195),m=r(321932),f=r(853719);function g(e,t){return(0,f.g)(e,t)}var y=r(471934),b=r(719271);function v(e,t,r){var n,i;let s;return r.authentication&&(s=r.authentication.token),(t=(0,y.k)(e.item,t)).thumbnailUrl=(0,p.S)(e.item,r,s),t.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:null===(n=e.data.view)||void 0===n?void 0:n.featuredImageUrl}),t.catalog=(0,b.c)(t.catalog||{}),t.features=(0,h.U)((null===(i=e.data.settings)||void 0===i?void 0:i.features)||{},m.T),t.links=g(e.item,r),t}var w=r(958157),S=r(225684),E=r(853179),T=r(371740),I=r(964858),C=r(393960),A=r(822409),O=r(507707),_=r(526462),D=r(704059),P=r(264263),k=r(40180);async function x(e,t){const r=Object.assign(Object.assign({},u.S9),e);r.orgUrlKey=r.orgUrlKey.toLowerCase(),r.slug||(r.slug=(0,i.fU)(r.name,r.orgUrlKey)),await(0,C.E)(r,t),r.typeKeywords=(0,I.o)(r.typeKeywords,r.status),r.typeKeywords=(0,A.Wb)(r.typeKeywords,r.isDiscussable);const s=new o.c7(d());let a=s.entityToStore(r,(0,O.kI)(u.sL));a=await(0,n.NY)(a,t);let c=s.storeToEntity(a,{});return c=v(a,c,t),c}async function R(e,t){await(0,C.E)(e,t),e.typeKeywords=(0,I.o)(e.typeKeywords,e.status),e.typeKeywords=(0,A.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,n.PD)(e.id,t),i=new o.c7(d()),s=i.entityToStore(e,r),a=await(0,n.QB)(s,t);let c=i.storeToEntity(a,e);return c=v(r,c,t),c}function U(e,t){let r;return r=(0,_.k)(e)?(0,s.rV)(e,t):(0,i.QR)(e,t),r.then((e=>e?N(e,t):null))}async function M(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,s.cl)(r)}async function N(e,t){const r=await(0,n.UO)(e,t);return v(r,new o.c7(d()).storeToEntity(r,{}),t)}async function j(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,D._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,T.jA)(e),rawResult:e},i=(t=[...t].filter(O.Tw)).map(a.u),s=(0,k.e)("enrichment",i).filter(O.Tw);let o={};
9return s.length&&(o=await(0,c.Z)(e,s,r)),i.forEach((e=>{n[e.prop]=(0,P.W)(o,e.path)})),n.links=g(e,r),n}function $(e){let t=(0,S.o)("Hub Project",`initiative|${e.id}`);const r=(0,P.W)(e,"catalog.scopes.item");return t=(0,w.W)([t,(0,E.O)(r)]),t}},321932:(e,t,r)=>{"use strict";r.d(t,{T:()=>n,Z:()=>i});const n={"hub:initiative:events":!1,"hub:initiative:content":!0,"hub:initiative:discussions":!1},i=[{permission:"hub:initiative",services:["portal"],licenses:["hub-premium"]},{permission:"hub:initiative:create",dependencies:["hub:initiative"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:initiative:view",services:["portal"],authenticated:!1,licenses:["hub-premium","hub-basic"]},{permission:"hub:initiative:owner",dependencies:["hub:initiative"],authenticated:!0,entityOwner:!0},{permission:"hub:initiative:edit",services:["portal"],authenticated:!0,entityEdit:!0,licenses:["hub-premium","hub-basic"]},{permission:"hub:initiative:delete",dependencies:["hub:initiative"],authenticated:!0,entityDelete:!0},{permission:"hub:initiative:canChangeAccess",dependencies:["hub:initiative"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:initiative:events",dependencies:["hub:initiative:view"]},{permission:"hub:initiative:content",dependencies:["hub:initiative:edit"]},{permission:"hub:initiative:discussions",dependencies:["hub:initiative:view"]},{permission:"hub:initiative:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:initiative:workspace:overview",dependencies:["hub:initiative:workspace","hub:initiative:view"]},{permission:"hub:initiative:workspace:dashboard",dependencies:["hub:initiative:workspace","hub:initiative:view"]},{permission:"hub:initiative:workspace:details",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:metrics",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:projects",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:projects:member",dependencies:["hub:initiative:workspace:projects"],assertions:[{property:"context:currentUser",type:"is-group-member",value:"entity:associations.groupId"}]},{permission:"hub:initiative:workspace:projects:manager",dependencies:["hub:initiative:workspace:projects"],assertions:[{property:"context:currentUser",type:"is-group-admin",value:"entity:associations.groupId"}]},{permission:"hub:initiative:workspace:settings",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:collaborators",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:metrics",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalogs",dependencies:["hub:initiative:workspace","hub:feature:catalogs","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalog",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalog:content",dependencies:["hub:initiative:workspace:catalog"]},{permission:"hub:initiative:workspace:catalog:events",dependencies:["hub:initiative:workspace:catalog","hub:event","hub:feature:catalogs:edit:advanced"]},{permission:"hub:initiative:manage",dependencies:["hub:initiative:edit"]},{permission:"hub:initiative:workspace:associationGroup:create",dependencies:["hub:initiative:workspace:projects","hub:group:create"]}]},300564:(e,t,r)=>{"use strict";r.d(t,{InitiativeSchema:()=>c,s:()=>a});var n=r(494067),i=r(181794),s=r(505681),o=r(925729);const a=["hub:initiative:edit","hub:initiative:create","hub:initiative:create2","hub:initiative:metrics","hub:initiative:associations","hub:initiative:settings"],c=Object.assign(Object.assign({},i.N),{properties:Object.assign(Object.assign({},i.N.properties),{_groups:{type:"array",items:{type:"string"}},status:{type:"string",default:s.Mz.notStarted,enum:Object.keys(s.Mz)},_metric:{type:"object",required:["cardTitle"],properties:n.MetricSchema.properties}}),allOf:[o.dM,o.No,o.eS,o.Jw]})},290744:(e,t,r)=>{"use strict";r.d(t,{S9:()=>s,sL:()=>o});var n=r(505681),i=r(321932);const s={name:"",tags:[],typeKeywords:["hubInitiativeV2"],catalog:{schemaVersion:0},permissions:[],schemaVersion:2.2,status:n.Mz.notStarted,features:i.T,view:{featuredContentIds:[],hero:n.if.map,metricDisplays:[]}},o={item:{type:"Hub Initiative",title:"",description:"",snippet:"",tags:[],typeKeywords:["hubInitiativeV2"],properties:{slug:"",schemaVersion:2.2}},data:{catalog:{schemaVersion:0},status:n.Mz.notStarted,view:{featuredContentIds:[],hero:n.if.map,metricDisplays:[]}}}},885039:(e,t,r)=>{"use strict";r.d(t,{AM:()=>i.AM,J5:()=>i.J5,Ki:()=>s.K,Mz:()=>n.M,dB:()=>i.dB,dK:()=>i.dK,jA:()=>i.jA,ld:()=>s.l,p8:()=>i.p8,xy:()=>i.xy});var n=r(384704),i=r(643331),s=r(572742)},572742:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,l:()=>a});var n=r(371740),i=r(878187),s=r(704059);const o=(e,t,r)=>{const{actionLinks:n=[],baseUrl:s="",locale:o="en-US",target:a="self"}=r||{},u=(0,i.m)(e,t,a,s);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:n,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:s="en-US",target:o="self"}=t||{},a=(0,i.D)(e,o,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,s)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,i;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(i=e.categories)||void 0===i?void 0:i.length)?[{i18nKey:"categories",value:(0,n.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,s._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},248849:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h,g:()=>p});
9var n=r(170209),i=r(958328),s=r(787662),o=r(615503),a=r(371740),c=r(752440),u=r(215950);const l=(e,t,r)=>{const{data:n,stack:i,requestOptions:s}=t;return i.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:p(e,n.errors)}),stack:i,requestOptions:s}},d={groupIds:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupIds");return(0,n.tX)(t.item.id,i).then((e=>{const{admin:n,member:o,other:a}=e,c=[...n,...o,...a].map((e=>e.id));return r.finish(s),{data:Object.assign(Object.assign({},t),{groupIds:c}),stack:r,requestOptions:i}})).catch((t=>l(t,e,s)))},metadata:e=>{const{data:t,stack:i,requestOptions:s}=e,o=i.start("enrichMetadata");return async function(e,t){try{const i=await(0,n.ff)(e,t);return await async function(e){const{parse:t}=await r.e(36280).then(r.t.bind(r,436280,19));return t(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}(i)}catch(e){return null}}(t.item.id,s).then((e=>(i.finish(o),{data:Object.assign(Object.assign({},t),{metadata:e}),stack:i,requestOptions:s})))},ownerUser:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichOwner"),o=Object.assign({username:t.item.owner},i);return(0,n.PR)(o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{ownerUser:e}),stack:r,requestOptions:i}))).catch((t=>l(t,e,s)))},org:e=>{const{data:t,stack:r,requestOptions:n}=e,i=r.start("enrichOrg"),s=(0,a.bV)(t.item,t.ownerUser);return(s?(0,c.T)(s,n):Promise.resolve(void 0)).then((e=>(r.finish(i),{data:Object.assign(Object.assign({},t),{org:e}),stack:r,requestOptions:n}))).catch((t=>l(t,e,i)))},data:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichData");return(0,n.m_)(t.item.id,i).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{data:e}),stack:r,requestOptions:i}))).catch((t=>l(t,e,s)))},server:e=>{const{data:t,stack:r,requestOptions:n}=e,s=r.start("enrichServer"),o=(0,i.pW)(t.item.url),a=Object.assign(Object.assign({},n),{url:o});return Promise.all([(0,i.ko)(a),(0,u.O)(t.item,n)]).then((([e,i])=>(r.finish(s),{data:Object.assign(Object.assign({},t),{server:Object.assign(Object.assign({},e),{servicesDirectoryDisabled:i})}),stack:r,requestOptions:n}))).catch((t=>l(t,e,s)))},layers:e=>{const{data:t,stack:r,requestOptions:n}=e,s=r.start("enrichLayers"),o=t.item.url,a=Object.assign(Object.assign({},n),{url:o});return(0,i.Wz)(a).then((e=>[...e.layers,...e.tables].filter((e=>"Group Layer"!==e.type)))).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{layers:e}),stack:r,requestOptions:n}))).catch((t=>l(t,e,s)))},item:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichData");return(0,n.rV)(t.item.id,i).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{item:e}),stack:r,requestOptions:i}))).catch((t=>l(t,e,s)))}},p=(e,t=[])=>[...t,{type:"Other",message:"string"==typeof e?e:e.message}],h=(e,t,r)=>{const n=t.reduce(((e,t)=>{const r=d[t];return r&&e.push(r),e}),[]);return(0,s.G)(n)({data:{item:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}},393960:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(427033),i=r(622210);const s=async(e,t)=>{let r=e.slug;const s=e.orgUrlKey.toLowerCase();r&&!r.startsWith(`${s}|`)&&(r=(0,i.Wl)(r,s));const{id:o}=e,a=o?{slug:r,existingId:o}:{slug:r};return e.slug=await(0,n.bb)(a,t),e.typeKeywords=(0,n.KH)(e.typeKeywords,e.slug),e}},817011:(e,t,r)=>{"use strict";r.d(t,{Gc:()=>s,XE:()=>n,g6:()=>o,wU:()=>i});const n="::",i="|";function s(e){return e.indexOf(n)>-1&&(e=e.replace(n,i)),e}function o(e){return e.indexOf(i)>-1&&(e=e.replace(i,n)),e}},622210:(e,t,r)=>{"use strict";r.d(t,{$M:()=>l,C5:()=>c,I2:()=>o,Wl:()=>a,ti:()=>u});var n=r(526462),i=r(817011);const s=256,o="slug";function a(e,t="",r=0){const n=[o];return t&&n.push(t.toLowerCase()),n.push(e),n.join("|").substring(0,s-r).replace(/-+$/,"").replace(new RegExp(`^${o}\\|`),"")}function c(e){return s-`${o}|${e}|`.length}const u=e=>{let t,r,s=(0,n.k)(e)&&e;if(!s){let n;[n,s]=e.split("~");const o=new RegExp(`^((.*)${i.XE}
9)?(.*)$`).exec(n);o&&(t=o[2],r=o[3])}return{id:s,slug:r,orgKey:t}},l=(e,t)=>`${e.split(i.wU).pop()}~${t}`},60386:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var n=r(170209),i=r(285581);function s(e){const t=(0,i.D)(n.ll,{success:!0}),r=(0,i.D)(n.cl,{success:!0});return t(e).then((()=>r(e)))}},590606:(e,t,r)=>{"use strict";function n(e,t){if("object"!=typeof e||null===e)return;if("string"!=typeof t)return;const r=t.split(".");for(let t=0;t<r.length-1;t++){if(!e.hasOwnProperty(r[t]))return;e=e[r[t]]}delete e[r[r.length-1]]}r.d(t,{f:()=>n})},261788:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(348753);async function i(e,t,r){const{portal:i}=r,s=`${i}/content/users/${t}/items/${e}/deleteThumbnail`;return(0,n.WY)(s,r)}},172044:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(540923),i=r(285581),s=r(954108);function o(e,t){return(0,i.D)(s.$G,{id:e.item.id,success:!0})(Object.assign({item:(0,n.S)(e)},t))}},282206:(e,t,r)=>{"use strict";r.d(t,{i:()=>c});var n=r(170209),i=r(822581),s=r(427033),o=r(817011),a=r(622210);function c(e,t){const{id:r,slug:c,orgKey:u}=(0,a.ti)(e);if(r)return(0,n.rV)(r,t);const l=(0,i.tl)(c,u||t.siteOrgKey),d=(0,o.Gc)(l);return(0,s.NS)({slug:d},t).then((e=>{if(e.length)return e;{const e=d.split("|").slice(1).join("|");return(0,s.NS)({slug:e},t)}})).then((e=>e.length?(0,n.rV)(e[0].id,t):null))}},85067:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(285581),i=r(719339);function s(e,t){const r=`${e}Model`,s=`${e}Id`;if(t[r])return Promise.resolve(t[r]);if(t[s])return(0,n.D)(i.PD,{item:{id:t[s]},isMissing:!0})(t[s],t);throw new Error(`getModelFromOptions requires either a .${r} or .${s} property.`)}},97807:(e,t,r)=>{"use strict";r.d(t,{D:()=>i,z:()=>n});const n=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"https://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"https://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"https://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"https://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"https://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"https://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"https://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:"https://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:"https://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:"https://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:"https://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"https://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:"https://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:"https://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:"https://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:"https://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:"https://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"https://opendatacommons.org/licenses/o
9dbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"https://opendatacommons.org/licenses/by/summary"}];function i(e){let t;t={type:(e=e||"")?"custom":"none",text:e};let r=!1;const i=n.filter((t=>function(e,t){return(e=e.toLowerCase()).includes(t.name.toLowerCase())||e.includes(t.url.toLowerCase())||e.includes(t.abbr.toLowerCase())}(e,t)));if(i.length&&(r=!0,t=i.pop()),!r){let r;!function(e){try{return!!new URL(e).protocol}catch(e){return!1}}(e)?function(e){return new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!<\/a>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(e)}(e)&&(r=new RegExp(/href\s?=\s?["'](.*?)["']/).exec(e)[1]):r=e,r&&(t.url=r,t.text="")}return t.text||delete t.text,t}},410156:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var n=r(817011),i=r(622210);function s(e,t=!1){const{id:r,properties:s}=e,o=null==s?void 0:s.slug;return o?(0,n.g6)(t?(0,i.$M)(o,r):o):r}},293593:(e,t,r)=>{"use strict";r.d(t,{zs:()=>w.z,$_:()=>n.$,ug:()=>i,fU:()=>S.fU,Wh:()=>D,km:()=>P,Pl:()=>M,fJ:()=>F.f,fL:()=>s.f,I7:()=>f,A7:()=>o.A,qJ:()=>v,iY:()=>q.i,NS:()=>S.NS,Rs:()=>B,Y_:()=>L,QR:()=>S.QR,vo:()=>$.v,G3:()=>a.G,Dj:()=>w.D,I8:()=>g,bb:()=>S.bb,sX:()=>c.s,V2:()=>u.V,Om:()=>j.O,MV:()=>H,Ze:()=>E.Z,yQ:()=>E.y,fd:()=>A,P4:()=>l.P,_s:()=>T._,KH:()=>S.KH,Ls:()=>d.L,hZ:()=>W,vb:()=>p.v,CT:()=>h.z,ZC:()=>N.Z});var n=r(60386);function i(e,t){return e.map((e=>(e.properties||(e.properties={}),Object.assign(e.properties,t),e)))}var s=r(590606),o=r(172044),a=r(85067),c=r(732289),u=r(147868),l=r(407515),d=r(558871),p=r(549213),h=r(232982),m=r(170209);function f(e,t,r){const n={q:`title:"${e}" AND ${Object.keys(t).map((e=>`${e}:"${t[e]}"`)).join(" AND ")}`,authentication:r};return(0,m.KT)(n).then((e=>e.results.length>0)).catch((e=>{throw Error(`Error in doesItemExistWithTitle ${e}`)}))}function g(e,t,r,n=0){let i=e;return n&&(i=`${e} ${n}`),f(i,t,r).then((s=>s?(n++,g(e,t,r,n)):i)).catch((e=>{throw Error(`Error in getUniqueItemTitle ${e}`)}))}var y=r(636980);const b=100;function v(e,t,r=-1,n){const i=t.num||b,s=t.start||1;return(-1===r?e(Object.assign(Object.assign({},t),{num:i,start:s})):Promise.resolve({nextStart:s,total:r,results:[],num:i})).then((r=>{if(-1===r.nextStart)return[r];const s=[];for(let e=r.nextStart;e<=r.total;e+=i)s.push(e);return(0,y.d)(s,(r=>e(Object.assign(Object.assign({},t),{start:r,num:i}))),n).then((e=>[r,...e]))})).then((e=>{const t=e.reduce(((e,t)=>[...e,...t.results]),[]),n=-1===r?t.length:r;return t.slice(0,n)}))}var w=r(97807),S=r(427033),E=r(144989),T=r(597111),I=r(348753),C=r(737720);function A(e,t,r){const n=`${(0,C.i)(r)}/oauth2/registerApp`,i={method:"POST",authentication:r.authentication,params:{itemId:e,appType:"browser",redirect_uris:JSON.stringify(t)}};return(0,I.WY)(n,i)}var O=r(954108),_=r(174564);async function D(e,t){const r=e.file;delete(e=Object.assign({},e)).file;const n=await(0,O.fC)(Object.assign({item:e,filename:r.name,async:!0,multipart:!0,overwrite:!0},t)),i=n.id;try{const n=6e6,s=function(e,t,r,n,i){const s=[];let o=1,a=0;for(;a<e.size;)s.push(Object.assign({file:e.slice(a,a+n,e.type),owner:t,id:r,partNum:o},i)),o+=1,a+=n;return s.reverse()}(r,e.owner,i,n,t);await(0,y.d)(s,(async e=>{if(!(await(0,m.cN)(e)).success)throw new Error("addItemPart failed")}),5),e.extent&&(0,_.pi)(e.extent)&&(e.extent=(0,_.CF)(e.extent)),await(0,O.wd)(Object.assign({id:i,item:e,owner:e.owner},t))}catch(r){throw await(0,m.it)(Object.assign({id:i,owner:e.owner},t)),r}return n}async function P(e,t){return await(0,O.fC)(Object.assign({item:e,owner:e.owner,file:e.file,dataUrl:e.dataUrl,text:e.text,multipart:e.multipart,async:e.async},t))}var k=r(989593),x=r(285581),R=r(709638);function U(e){return new Promise((t=>setTimeout(t,e)))}async function M(e){const{item:t,groups:r}=e,n=(0,k._T)(e,["item","groups"]),i=t.dataUrl||t.file;let s,o,a;if(s=t.file?await D(t,n):await P(t,n),i&&await async function(e,t,r){let n;do{if(await U(2e3),n=await(0,m.sy)(Object.assign({id:e},t)),"failed"===n.status)throw new Error(n.statusMessage)}while("completed"!==n.status)}(s.id,n),"private"!==t.access&&(o=await(0,m.zT)(Object.assign({id:s.id,owner:t.owner,access:t.access},n))),null==r?void 0:r.length){const e=(0,x.D)(m.Ju);a=await Promise.all(r.map((r=>e(Object.assign({id:s.id,owner:t.owner,groupId:r.id,confirmItemControl:(0,R.A)(r)},n)))))}return{title:t.title,createdItem:s,itemAccessResponse:o,itemSharingResponse:a}}var N=r(43421),j=r(215950),$=r(410156),F=r(261788),G=r(178491);async function L(e,t,r){let n;try{return n=await(0,G.z)(t,e,r),n.followersGroupId}catch(e){throw new Error(`Error fetching entity followers group ID: ${e}`)}}async function H(e,t,r,n){let i;return i="string"==typeof e?await L(e,r,n):e.followersGroupId,!!t.groups.find((e=>e.id===i))}async function B(e,t,r,n){if(await H(e,t,r,n))return Promise.reject("User is already following this entity.");const i=await L(e,r,n);try{return await(0,m.be)({id:i,authentication:n.hubRequestOptions.authentication}),{success:!0,username:t.username}}catch(e){throw new Error(`Error joining group: ${e}`)}}async function W(e,t,r,n){if(!await H(e,t,r,n))return Promise.reject("User is not following this entity.");const i=await L(e,r,n);try{return await(0,m.Ln)({id:i,authentication:n.hubRequestOptions.authentication}),{success:!0,username:t.username}}catch(e){throw new Error(`Error leaving group: ${e}`)}}var q=r(282206)},147868:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(732289);function i(e){const t={item:{id:e.item.id},appid:e.item.id};return(0,n.s)(e,t,{toISO:(e,t)=>
9t})}},732289:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(514215);function i(e,t,r){return(0,n.adlib)(e,t,r)}},215950:(e,t,r)=>{"use strict";r.d(t,{O:()=>o});var n=r(958328),i=r(170209),s=r(348753);const o=async(e,t)=>{let r;try{const o="string"==typeof e?await(0,i.rV)(e,t):e;if(o.url){let e=(0,n.pW)(o.url);if("public"!==o.access&&t.authentication){const r=await t.authentication.getToken(o.url,t);r&&(e=`${e}?token=${r}`)}r=200!==(await(0,s.WY)(e,Object.assign(Object.assign({},t),{rawResponse:!0,httpMethod:"GET"}))).status}else r=!0}catch(e){r=!0}return r}},144989:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i,y:()=>s});var n=r(507707);const i=["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 s(e){const t=(0,n.kI)(e);return i.forEach((e=>{delete t[e]})),t.extent="{{organization.defaultExtentBBox}}",t}},407515:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(507707),i=r(299349);function s(e,t,r="{{appid}}"){const s=(0,n.kI)(e),o=new RegExp(t,"g");return(0,i.w)(s,o,r)}},597111:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});var n=r(954108),i=r(841741);async function s(e,t,r,s,o){const a=Object.assign({item:{id:e},owner:o,params:{thumbnail:t,fileName:r},filename:r},s);try{if(!(await(0,n.$G)(a)).success)throw new i.Z("Set Project Thumbnail","Unknown error setting thumbnail.")}catch(e){throw e instanceof Error?new i.Z("Set Project Thumbnail",e.message,e):new i.Z("Set Project Thumbnail","Unknown error setting thumbnail.")}}},558871:(e,t,r)=>{"use strict";r.d(t,{L:()=>s});var n=r(170209),i=r(737745);async function s(e,t,r,s){const o=n.td.bind(void 0,Object.assign({q:`id:(${t.join(" OR ")})`,num:t.length},r)),a=e=>e.results.length===t.length;let c;try{({results:c}=t.length?await(0,i.$)(o,a):{results:[]})}catch(r){throw new Error(`Error sharing item: ${e} with groups: ${t.join(", ")}`)}return Promise.all(c.map((async t=>{const i=Object.assign(Object.assign({},r),{id:e,groupId:t.id,owner:s,confirmItemControl:t.capabilities.includes("updateitemcontrol")});try{return await(0,n.Ju)(i)}catch(r){throw new Error(`Error sharing item: ${e} with group: ${t.id}`)}})))}},427033:(e,t,r)=>{"use strict";r.d(t,{KH:()=>c,NS:()=>l,QR:()=>u,bb:()=>d,fU:()=>a});var n=r(170209),i=r(806322),s=r(622210),o=r(817011);function a(e,t=""){const r=(0,i.l)(e);return r?(0,s.Wl)(r,t.toLowerCase(),4):""}function c(e,t){const r=e.filter((e=>!e.startsWith(`${s.I2}|`)));return r.push([s.I2,t.toLowerCase()].join("|")),r}function u(e,t){return l({slug:(0,o.Gc)(e)},t).then((e=>e.length?(0,n.rV)(e[0].id,t):null))}async function l(e,t){if(!e.slug)return[];const r={filter:`typekeywords:"${e.slug.startsWith(`${s.I2}|`)?e.slug:[s.I2,e.slug].join("|")}"`};return t.authentication?r.authentication=t.authentication:t.portal&&(r.portal=t.portal),e.exclude&&(r.q=`NOT id:${e.exclude}`),(await(0,n.KT)(r)).results}function d(e,t,r=0){const n=r?[e.slug,r].join("-"):e.slug;return l({slug:n,exclude:e.existingId},t).then((i=>i.length?d(e,t,r+1):n)).catch((e=>{throw Error(`Error in getUniqueSlug ${e}`)}))}},549213:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(170209);function i(e,t){if(e.item.protected){const r=Object.assign({id:e.item.id},t);return(0,n.ll)(r)}return Promise.resolve({success:!0})}},232982:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(170209);function i(e,t,r,i){return Promise.all(t.map((async t=>{const s=Object.assign({},{id:e,groupId:t},r);i&&(s.owner=i);try{return await(0,n.lF)(s)}catch(r){throw new Error(`Error unsharing item: ${e} with group: ${t}`)}})))}},43421:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(170209),i=r(841741),s=r(737720);async function o(e,t,r,o,a,c=""){try{if(!(await(0,n.zJ)(Object.assign({id:e,owner:t,resource:r,name:o,prefix:c},a))).success)throw new i.Z("Set Item Featured Image","Unknown error setting featured image.");const u=(0,s.i)(a.portal);return c&&(c=`${c}/`),`${u}/content/items/${e}/resources/${c}${o}`}catch(e){throw e instanceof Error?new i.Z("Set Item Featured Image",e.message,e):new i.Z("Set Item Featured Image","Unknown error setting featured image.")}}},115474:(e,t,r)=>{"use strict";r.d(t,{A:()=>
9o,M:()=>a});var n=r(989593),i=r(507707),s=r(935945);function o(e={displayType:"stat-card",metricId:void 0},t,r){const{value:i,valueType:o,dynamicMetric:c}=e,u=(0,n._T)(e,["value","valueType","dynamicMetric"]),{layerId:l,itemId:d,field:p,statistic:h,serviceUrl:m,fieldType:f,sourceLink:g,sourceTitle:y,allowExpressionSet:b,expressionSet:v,legacyWhere:w}=c||{},{entityInfo:S,metricName:E}=r||{},T={source:"dynamic"===e.type?{type:"service-query",serviceUrl:m,layerId:l,field:p,statistic:h,where:w||a(b?v:[])}:{type:"static-value",value:i,valueType:o},name:E||t,entityInfo:S||{id:void 0,name:void 0,type:void 0},id:t};return delete u.itemId,{metric:T,displayConfig:Object.assign(Object.assign({},u),{displayType:u.displayType||"stat-card",visibility:u.visibility||s.Q$.hidden,metricId:t,fieldType:f,itemId:d,expressionSet:v,allowExpressionSet:b,statistic:h,sourceLink:"dynamic"===e.type&&g?g:u.sourceLink,sourceTitle:"dynamic"===e.type&&y?y:u.sourceTitle,allowLink:"dynamic"===e.type?u.allowDynamicLink:u.allowLink,type:e.type})}}function a(e=[]){const t=e.map((e=>{const{field:t,values:r,relationship:n}=e,o=e=>e.replace&&e.replace(/(['])/g,"$1$1");if(!(r&&r.length&&t&&t.name))return!1;let a;switch(t.type){case"esriFieldTypeString":a=n===s.TS.LIKE?`${t.name} like '%${r[0]}%'`:`(${t.name} IN (${r.map((e=>`'${o(e)}'`)).join(", ")}))`;break;case"esriFieldTypeDate":"string"==typeof r[0]&&(a=`${t.name} >= timestamp '${o(r[0])} 00:00:00'`),"string"==typeof r[1]&&(a=`${t.name} <= timestamp '${o(r[1])} 23:59:59'`),"string"==typeof r[0]&&"string"==typeof r[1]&&(a=`${t.name} >= timestamp '${o(r[0])} 00:00:00' AND ${t.name} <= timestamp '${o(r[1])} 23:59:59'`);break;default:(0,i.kK)(r[0])||(a=`(${t.name}) >= ${r[0]}`),(0,i.kK)(r[1])||(a=`(${t.name}) <= ${r[1]}`),(0,i.kK)(r[0])||(0,i.kK)(r[1])||(a=`(${t.name}) >= ${r[0]} AND (${t.name}) <= ${r[1]}`)}return a})).filter(Boolean).join(" AND ")||"1=1";return encodeURIComponent(t)}},332678:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(264263),i=r(507707);function s(e){const t={id:e.id,name:e.name,type:e.type};return(e.metrics||[]).map((r=>{r.entityInfo=Object.assign({},t);const s=r.source;if("item-query"===s.type&&s.collectionKey){const t=s.collectionKey,r=(0,n.W)(e.catalog,`collections[findBy(key,'${t}')].scope`);r&&(s.scope=(0,i.kI)(r))}return r.source=s,r}))}},92025:(e,t,r)=>{"use strict";r.d(t,{zv:()=>s,M1:()=>o.M,Ag:()=>o.A,Ev:()=>n.E,qd:()=>i.q});var n=r(332678),i=r(24910);function s(e,t,r){const n=e.map((e=>e.attributes[t]));let i=null;switch(r){case"sum":i=n.reduce(((e,t)=>e+t),0);break;case"count":i=n.length;break;case"avg":i=n.reduce(((e,t)=>e+t),0)/n.length;break;case"min":i=n.reduce(((e,t)=>Math.min(e,t)),Number.MAX_VALUE);break;case"max":i=n.reduce(((e,t)=>Math.max(e,t)),Number.MIN_VALUE);break;case"countByValue":i=n.reduce(((e,t)=>(e[t]?e[t]+=1:e[t]=1,e)),{})}return i}var o=r(115474)},969123:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(989593);function i(e,t){const{allowExpressionSet:r,expressionSet:i,fieldType:s,itemId:o}=t,a=(0,n._T)(t,["allowExpressionSet","expressionSet","fieldType","itemId"]);let c=Object.assign({},a);if(e&&e.source)switch(e.source.type||""){case"service-query":c=Object.assign(Object.assign({type:"dynamic",dynamicMetric:Object.assign(Object.assign({},e.source),{itemId:o,expressionSet:i,allowExpressionSet:r,fieldType:s,sourceLink:t.sourceLink,sourceTitle:t.sourceTitle})},c),{sourceLink:void 0,sourceTitle:void 0});break;case"static-value":c=Object.assign({type:"static",value:e.source.value,valueType:e.source.valueType},c)}return c}},24910:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(958328),i=r(264263),s=r(958157),o=r(356013);async function a(e,t){switch(e.source.type){case"static-value":return function(e,t){const r=e.source,n=e.id.split("_")[0],i={attributes:{id:e.entityInfo.id,name:e.entityInfo.name,type:e.entityInfo.type,[n]:r.value,valueType:r.valueType}};return Promise.resolve({features:[i],generatedAt:(new Date).getTime()})}(e);case"service-query":return async function(e,t){const r=e.source,s=e.id.split("_")[0];r.where=r.where||"1=1";const o={onStatisticField:r.field,statisticType:r.statistic,outStatisticFieldName:r.field},a=r.serviceUrl+`/${r.layerId}`,c=await(0,n.QH)({url:a,where:r.where,f:"json",outStatistics:[o],authentication:t.requestOptions.authentication}),u=(0,i.W)(c,`features[0].attributes.${r.field}`);return{features:[{attributes:{id:e.entityInfo.id,name:e.entityInfo.name,type:e.entityInfo.type,[s]:u}}],generatedAt:(new Date).getTime()}}(e,t);case"item-query":return async function(e,t){const r=e.source,n=e.id.split("_")[0],c={typekeywords:r.keywords};r.itemTypes&&(c.type=r.itemTypes);const u={targetEntity:"item",filters:[{operation:"AND",predicates:[c]}]},l=r.scope||{targetEntity:"item",filters:[]},d=(0,s.W)([u,l]),p={requestOptions:t.hubRequestOptions,num:100},h=await(0,o.hw)(d,p),m=await h.results.reduce((async(e,s)=>{const o=await e,c=(0,i.W)(s,r.propertyPath),u={attributes:{id:s.id,name:s.title,type:s.type,[n]:null}};if(c)if("string"==typeof c||"number"==typeof c)u.attributes[n]=c,o.push(u);else{c.entityInfo=u.attributes;const e=await a(c,t);o.push(...e.features)}return o}
9),Promise.resolve([]));return{features:await Promise.all(m),generatedAt:(new Date).getTime()}}(e,t);default:throw new Error("Unknown metric type passed in.")}}},719339:(e,t,r)=>{"use strict";r.d(t,{Ax:()=>f,NY:()=>h,PD:()=>d,QB:()=>m,S3:()=>n.S,UO:()=>g,q9:()=>p,wn:()=>y});var n=r(540923),i=r(170209),s=r(954108),o=r(174564),a=r(427033),c=r(254962),u=r(507707),l=r(285581);function d(e,t){return Promise.all([(0,i.rV)(e,t),(0,i.m_)(e,t)]).then((e=>({item:e[0],data:e[1]})))}function p(e,t){return(0,a.QR)(e,t).then((e=>{const r=[Promise.resolve(e)];return e?r.push((0,i.m_)(e.id,t)):r.push(Promise.resolve(null)),Promise.all(r)})).then((e=>e[0]?{item:e[0],data:e[1]}:null))}async function h(e,t){const r=(0,u.kI)(e.item);return r.data=(0,u.kI)(e.data),r.extent&&"string"!=typeof r.extent&&(r.extent=(0,o.CF)(r.extent)),d((await(0,s.fC)(Object.assign({item:r},t))).id,t)}function m(e,t){const r=(0,u.kI)(e.item);r.data=(0,u.kI)(e.data),r.extent&&"string"!=typeof r.extent&&(r.extent=(0,o.CF)(r.extent)),function(e){return["description","snippet","tags","categories","licenseInfo"].some((t=>{var r;return""===e[t]||0===(null===(r=e[t])||void 0===r?void 0:r.length)}))}(r)&&(t.params=Object.assign(Object.assign({},t.params),{clearEmptyFields:!0}));const n=Object.assign({item:r},t);return(0,s.$G)(n).then((()=>r.data?d(r.id,t):(0,i.rV)(r.id,t).then((e=>({item:e})))))}async function f(e,t,r){const n=[],i=[];return t.forEach((t=>{n.push((0,c.E)(e.item.id,e.item.owner,t.resource,t.filename,r)),i.push(t.filename)})),Promise.all(n).then((()=>{const r=t.reduce(((e,t)=>(e[t.filename.split(".").shift()]=t.resource,e)),{});return Object.assign({resources:r},e)}))}async function g(e,t){return{item:e,data:await(0,i.m_)(e.id,t).catch((()=>null))}}async function y(e,t,r){return Object.entries(t).reduce((async(t,[n,s])=>{const o=(0,l.D)(i.AA,null),a=await o(e.id,Object.assign({fileName:s,readAs:s.split(".").pop()},r));return a&&(t[n]=a),t}),{})}},540923:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(507707);function i(e){const t=(0,n.kI)(e.item);return t.text=JSON.stringify(e.data),t}},774843:(e,t,r)=>{"use strict";r.d(t,{Z2:()=>a,KB:()=>i,yL:()=>c,ZZ:()=>s,LW:()=>o,h4:()=>l});class n extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var i,s,o,a,c;!function(e){e.EMAIL="EMAIL"}(i||(i={})),function(e){e.TELEMETRY_REPORT="TELEMETRY_REPORT",e.EVENT="EVENT",e.DISCUSSION_ON_ENTITY="DISCUSSION_ON_ENTITY"}(s||(s={})),function(e){e.DISCUSSION="DISCUSSION"}(o||(o={})),function(e){e.ON_EVENT="ON_EVENT",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY"}(a||(a={})),function(e){e.DISCUSSION_POST_PENDING="DISCUSSION_POST_PENDING"}(c||(c={}));const u=(e,t)=>async function(e,t){const{url:r,method:i,data:s}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:i,cache:a,credentials:c,mode:o};s&&(p.body=JSON.stringify(s));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new n(m,d,f,JSON.stringify(g.message))}({url:"/api/newsletters-scheduler/v1/subscriptions/notify",method:"POST",headers:{"Content-Type":"application/json"},data:e},t);async function l(e){return e.token=await function(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}(e),u(e.data,e)}},891770:(e,t,r)=>{"use strict";function n(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}async function i(e,t){const{url:r,method:n,data:i}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:n,cache:a,credentials:c,mode:o};i&&(p.body=JSON.stringify(i));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new s(m,d,f,JSON.stringify(g.message))}r.d(t,{Gl:()=>a,gT:()=>c,os:()=>m,yJ:()=>u,XW:()=>C,r4:()=>D,h8:()=>x,pI:()=>O,tJ:()=>A,PR:()=>P,Ld:()=>I,Mg:()=>_,Nq:()=>k});
9class s extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var o,a,c,u,l,d,p,h,m;!function(e){e.DISCUSSION="DISCUSSION"}(o||(o={})),function(e){e.EMAIL="EMAIL"}(a||(a={})),function(e){e.ON_EVENT="ON_EVENT",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY"}(c||(c={})),function(e){e.TELEMETRY_REPORT="TELEMETRY_REPORT",e.EVENT="EVENT",e.DISCUSSION_ON_ENTITY="DISCUSSION_ON_ENTITY"}(u||(u={})),function(e){e.ASC="ASC",e.DESC="DESC"}(l||(l={})),function(e){e.AND="AND",e.OR="OR"}(d||(d={})),function(e){e.content="content",e.dataset="dataset",e.document="document",e.event="event",e.feedback="feedback",e.initiative="initiative",e.people="people",e.site="site",e.team="team",e.template="template",e.project="project",e.channel="channel",e.discussion="discussion",e.eventAttendee="eventAttendee"}(p||(p={})),function(e){e.item="item",e.group="group",e.user="user",e.portalUser="portalUser",e.communityUser="communityUser",e.groupMember="groupMember",e.event="event",e.channel="channel",e.discussionPost="discussionPost",e.eventAttendee="eventAttendee"}(h||(h={})),function(e){e.DISCUSSION_POST_PENDING="DISCUSSION_POST_PENDING"}(m||(m={}));const f=(e,t)=>i({url:"/api/newsletters/v1/subscriptions",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),g=(e,t)=>i({url:"/api/newsletters/v1/subscriptions",method:"GET",params:e},t),y=(e,t)=>i({url:"/api/newsletters/v1/subscriptions/subscribe",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),b=(e,t)=>i({url:`/api/newsletters/v1/subscriptions/${e}`,method:"GET"},t),v=(e,t,r)=>i({url:`/api/newsletters/v1/subscriptions/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),w=(e,t)=>i({url:"/api/newsletters/v1/users",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),S=(e,t)=>i({url:`/api/newsletters/v1/users/${e}`,method:"GET"},t),E=(e,t,r)=>i({url:`/api/newsletters/v1/users/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),T=(e,t)=>
9i({url:`/api/newsletters/v1/users/${e}`,method:"DELETE"},t);async function I(e){return e.token=await n(e),y(e.data,e)}async function C(e){return e.token=await n(e),f(e.data,e)}async function A(e){return e.token=await n(e),g(e.data,e)}async function O(e){return e.token=await n(e),b(e.subscriptionId,e)}async function _(e){return e.token=await n(e),v(e.subscriptionId,e.data,e)}async function D(e){return e.token=await n(e),w(e.data,e)}async function P(e){return e.token=await n(e),S(e.userId,e)}async function k(e){return e.token=await n(e),E(e.userId,e.data,e)}async function x(e){return e.token=await n(e),T(e.userId,e)}},861867:(e,t,r)=>{"use strict";r.d(t,{Q6:()=>o,W8:()=>u,c:()=>i,cg:()=>a,r9:()=>s,x5:()=>c});var n=r(939042);function i(e,t,r){return r=r||"",Array.isArray(e)?e.map(s):!e||!c(e)||o(e)||u(e)||a(e)?t(e,r):Object.assign({},e,(0,n.t)(e,s));function s(e,n){const s=r?`${r}.${n}`:String(n);return i(e,t,s)}}function s(e){return"string"==typeof e||e instanceof String}function o(e){return e instanceof Date}function a(e){return"function"==typeof e}function c(e){return"object"==typeof e}function u(e){return e instanceof RegExp}},939042:(e,t,r)=>{"use strict";function n(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=t(e[n],n,e),r}),{})}r.d(t,{t:()=>n})},212347:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(507707);function i(e,t,r={},i=!1){const s=t.split(".");let o=e;const a=s.length-1;s.forEach(((e,t)=>{o.hasOwnProperty(e)&&null!=o[e]?t===a&&("object"!=typeof o[e]||Array.isArray(o[e])?o[e]=r:o[e]=i?(0,n.kI)(r):Object.assign(o[e],(0,n.kI)(r))):o[e]=t===a?r:{},o=o[e]}))}},299349:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(861867);function i(e,t,r){return(0,n.c)(e,(function(e){if(!(0,n.r9)(e))return e;let i;return i=(0,n.W8)(t)?t:new RegExp(t,"g"),e.replace(i,r)}))}},140738:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(861867);function i(e,t){if(e===t)return!0;if(e&&t&&(0,n.x5)(e)&&(0,n.x5)(t)){if(Array.isArray(e)!==Array.isArray(t))return!1;const r=Object.keys(e);return r.length===Object.keys(t).length&&r.every((r=>i(e[r],t[r])))}return!1}},635163:(e,t,r)=>{"use strict";r.d(t,{M:()=>s,w:()=>i});var n=r(695826);function i(e,t){return s(e,(e=>e.id===t))}function s(e,t){return Array.isArray(e)?e.reduce(((e,r)=>{if(t(r))e=r;else if((0,n.r)(r)){const n=s(r,t);n&&(e=n)}return e}),void 0):(0,n.r)(e)?t(e)?e:Object.keys(e).reduce(((r,i)=>{if((0,n.r)(e[i])){const n=s(e[i],t);n&&(r=n)}return r}),void 0):void 0}},264263:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(e,t)=>t.split(".").reduce((function(t,r){const i=/\[(.*?)\]$/.exec(r);if(i){const e=i[1],n=r.replace(i[0],"");if(parseInt(e,10)>-1){const r=parseInt(e,10);return Array.isArray(t[n])&&t[n][r]?t[n][r]:void 0}return function(e,t){const r=t.split("(");if(!r||2!==r.length)return;let n;const i=r[0],s=r[1].replace(")","").split(",").map((e=>e.trim()));if("findBy"===i){const t=s[0];let r;o=s[1],r=isNaN(parseFloat(o))?s[1].replace(/'/g,""):parseFloat(s[1]),n=e.find((e=>e[t]===r))}else n=void 0;var o;return n}(t[n],e)}return t&&void 0!==t[r]?null!==t[r]&&t[r].$use?n(e,t[r].$use):t[r]:void 0}),e)},518944:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(264263);function i(e,t,r){const i=(0,n.W)(e,t);return void 0!==i?i:r}},297754:(e,t,r)=>{"use strict";r.d(t,{c:()=>n.c,Q6:()=>n.Q6,cg:()=>n.cg,x5:()=>n.x5,W8:()=>n.W8,r9:()=>n.r9,t2:()=>i.t,zI:()=>S,vZ:()=>w.v,JS:()=>f,MX:()=>g.M,wA:()=>g.w,qm:()=>s.q,ig:()=>d.w,uZ:()=>o,WJ:()=>a.W,AM:()=>c,tj:()=>u.t,PM:()=>p.P,H6:()=>v.H,t_:()=>l.t,CY:()=>b,tg:()=>h.t});var n=r(861867),i=r(939042),s=r(212347);function o(e,t){return(0,s.q)(e,t)}var a=r(264263);function c(e,t){return t.reduce(((t,r)=>{const n=(0,a.W)(e,r);return n&&t.push(n),t}),[])}var u=r(518944),l=r(157093),d=r(299349),p=r(183530),h=r(94684),m=r(695826);function f(e,t){return Array.isArray(e)?e.reduce(((e,r)=>{if(t(r))if((0,m.r)(r)){const n=f(r,t);e=[...e,n]}else e=[...e,r];return e}),[]):(0,m.r)(e)?Object.keys(e).reduce(((r,n)=>{if(t(e[n]))if((0,m.r)(e[n]))if("undefined"!=typeof Blob&&e[n]instanceof Blob)r[n]=e[n];else{const i=f(e[n],t);r[n]=i}else r[n]=e[n];return r}),{}):void 0}var g=r(635163),y=r(507707);function b(e,t){const r=Object.keys(e);return t=t||(0,y.kI)(e),r.reduce((function(r,i){if(Array.isArray(e[i]))r[i]=e[i].map((e=>b(e,t)));
9else if(!e[i]||!(0,n.x5)(e[i])||(0,n.Q6)(e[i])||(0,n.W8)(e[i])||(0,n.cg)(e[i]))r[i]=e[i];else if(e[i]&&e[i].$use){const s=(0,a.W)(t,e[i].$use);(0,n.x5)(s)?r[i]=b(s,t):r[i]=s}else r[i]=b(e[i],t);return r}),{})}var v=r(969953),w=r(140738);function S(e,t){if(!(0,w.v)(e,t))return Array.isArray(e)?e.reduce(((e,r)=>{if((0,m.r)(r)){const n=S(r,t);void 0!==n&&(e=[...e,n])}else r!==t&&(e=[...e,r]);return e}),[]):(0,n.x5)(e)?Object.keys(e).reduce(((r,n)=>{if((0,m.r)(e[n])&&!(0,w.v)(e[n],t)){const i=S(e[n],t);r[n]=i}else(0,w.v)(e[n],t)||(r=Object.assign(Object.assign({},r),{[n]:e[n]}));return r}),{}):e}},695826:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(861867);function i(e){let t=!1;return!e||!(0,n.x5)(e)||(0,n.Q6)(e)||(0,n.W8)(e)||(0,n.cg)(e)||(t=!0),t}},183530:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(264263),i=r(212347);function s(e,t,r){return Array.isArray(r)&&r.length?(r.forEach((r=>{void 0!==(0,n.W)(e,r)&&(0,i.q)(t,r,(0,n.W)(e,r))})),t):e}},969953:(e,t,r)=>{"use strict";r.d(t,{H:()=>i});var n=r(183530);function i(e,t){return(0,n.P)(e,{},t)}},157093:(e,t,r)=>{"use strict";function n(e){return Object.keys(e).forEach((t=>{e[t]&&"object"==typeof e[t]?n(e[t]):null==e[t]&&delete e[t]})),e}r.d(t,{t:()=>n})},94684:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(212347);function i(e,t,r,i=!1){Array.isArray(e)&&(e=e.join(".")),(0,n.q)(r,e,t,i)}},752440:(e,t,r)=>{"use strict";r.d(t,{T:()=>o});var n=r(264263),i=r(974195),s=r(170209);function o(e,t){let r=(0,n.W)(t,"portal")||(0,n.W)(t,"authentication.portal")||"www.arcgis.com";r=r.split("/sharing/rest")[0];const o=`${(0,i.D)(r)}/sharing/rest`;return(0,s._0)(e,Object.assign(Object.assign({},t),{portal:o}))}},687934:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>s,ud:()=>a,yT:()=>o});var n=r(752440),i=r(248802);async function s(e,t){return a(await(0,n.T)(e,t),t.authentication.token)}function o(e){const t=a(e);return{id:t.id,title:t.name,name:t.name,url:t.url,type:"Organization",family:"organization",source:"portal",createdDate:t.createdDate,createdDateSource:t.createdDateSource,updatedDate:t.updatedDate,updatedDateSource:t.updatedDateSource,thumbnailUrl:t.thumbnailUrl,thumbnail:t.thumbnail,description:t.description,access:t.access,tags:t.tags,typeKeywords:t.typeKeywords,links:t.links}}function a(e,t){let r=`https://${e.portalHostname}`;return e.urlKey&&(r=`https://${e.urlKey}.${e.customBaseUrl}`),{id:e.id,orgId:e.id,access:e.access,name:e.name,summary:e.description,description:e.description,type:"Organization",source:"portal",createdDate:new Date(e.created),createdDateSource:"portal",updatedDate:new Date(e.modified),updatedDateSource:"portal",portal:e,thumbnail:e.thumbnail,thumbnailUrl:(0,i.S)(e,t),url:r,links:{self:r,thumbnail:(0,i.S)(e,t)},typeKeywords:[],tags:[]}}},984177:(e,t,r)=>{"use strict";r.d(t,{k:()=>s,w:()=>i});var n=r(348753);function i(e,t,r,i){const s=`${i.authentication.portal}/portals/${e}/limits?limitsType=${t}&limitName=${r}&f=json`;return(0,n.WY)(s,i)}function s(e,t){return i(e,"Groups","MaxNumUserGroups",t).then((e=>e.limitValue)).catch((e=>512))}},420562:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>s.Ak,T7:()=>n.T,kq:()=>i.k,ud:()=>s.ud,wm:()=>i.w,yT:()=>s.yT});var n=r(752440),i=r(984177),s=r(687934)},417031:(e,t,r)=>{"use strict";r.d(t,{T:()=>p});var n=r(560992),i=r(2166),s=r(110571),o=r(272997),a=r(507707),c=r(358637),u=r(850780),l=r(370427),d=r(94684);class p extends s.x{constructor(e,t){super(e,t)}static fromJson(e,t){const r=this.applyDefaults(e,t);return new p(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=p.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,o.H6)(e,t.hubRequestOptions);return p.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Page not found."):e}}static applyDefaults(e,t){e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey||""),e.orgUrlKey=e.orgUrlKey.toLowerCase();const r=Object.assign(Object.assign({},n.XJ),e);return r.type=t.isPortal?n.GH:n.t9,r}update(e){if(this.isDestroyed)throw new Error("HubPage is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubPage is already destroyed.")
10;this.entity.id?this.entity=await(0,o.T$)(this.entity,this.context.userRequestOptions):this.entity=await(0,o.D4)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubPage is already destroyed.");this.isDestroyed=!0,await(0,o.CT)(this.entity.id,this.context.userRequestOptions)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,c.t)((0,a.kI)(this.entity),t,this.context.hubRequestOptions):(0,a.kI)(this.entity);return r._slug=(0,u.y)(this.entity),r}async fromEditor(e){const t=await(0,l.E)(e,this.context);return Object.entries(t).forEach((([e,t])=>{(0,d.t)(e,t,this)})),await this.save(),this.entity}}},272997:(e,t,r)=>{"use strict";r.d(t,{VC:()=>x,nu:()=>k,D4:()=>_,CT:()=>R,Hy:()=>U,H6:()=>P,T$:()=>D});var n=r(704059),i=r(371740),s=r(248849),o=r(264263),a=r(348157),c=r(507707),u=r(40180),l=r(427033),d=r(719339),p=r(572269),h=r(752438);function m(){const e=(0,h.f)();return["headContent","layout"].forEach((t=>{e.push({entityKey:t,storeKey:`data.values.${t}`})})),e}var f=r(560133),g=r(398195),y=r(821623),b=r(471934),v=r(853719),w=r(410156);function S(e,t){const r=(0,v.g)(e,t),n=(0,i.bC)(e.type,(0,w.v)(e,!0),e.typeKeywords);return Object.assign(Object.assign({},r),{siteRelative:n,layoutRelative:`/pages/${e.id}/edit`})}var E=r(560992),T=r(972551);function I(e,t,r){var n;let i;r.authentication&&(i=r.authentication.token),t=(0,b.k)(e.item,t);const s=(0,f.S)(e.item,r,i);return t.thumbnailUrl=s,t.links=S(e.item,r),t.features=(0,g.U)((null===(n=e.data.settings)||void 0===n?void 0:n.features)||{},y.IA),function(e){if(e.schemaVersion===E.Cw)return e;const t=function(e){if(e.schemaVersion>=1.1)return e;
10const t=(0,c.kI)(e),{slug:r,orgUrlKey:n,typeKeywords:i}=(0,T.P)(t.slug||"",t.orgUrlKey||"",t.typeKeywords||[]);return t.slug=r,t.orgUrlKey=n,t.typeKeywords=i,t.schemaVersion=1.1,t}(e);return t}(t)}var C=r(170209),A=r(393960),O=r(282206);async function _(e,t){const r=Object.assign(Object.assign({},E.XJ),e);r.orgUrlKey=r.orgUrlKey.toLowerCase(),r.slug||(r.slug=(0,l.fU)(r.name,r.orgUrlKey)),await(0,A.E)(r,t);const n=new p.c7(m());let i=n.entityToStore(r,(0,c.kI)(E.Mn));i=await(0,d.NY)(i,t);let s=n.storeToEntity(i,{});return s=I(i,s,t),s}async function D(e,t){await(0,A.E)(e,t);const r=await(0,d.PD)(e.id,t),n=new p.c7(m()),i=n.entityToStore(e,r),s=await(0,d.QB)(i,t);let o=n.storeToEntity(s,e);return o=I(r,o,t),o}async function P(e,t){const r=await(0,O.i)(e,t);return r?x(r,t):null}function k(e,t){return I(e,new p.c7(m()).storeToEntity(e,{}),t)}async function x(e,t){return k(await(0,d.UO)(e,t),t)}async function R(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,C.cl)(r)}async function U(e,t,r){const l={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,n._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,i.jA)(e),rawResult:e},d=(t=[...t].filter(c.Tw)).map(a.u),p=(0,u.e)("enrichment",d).filter(c.Tw);let h={};return p.length&&(h=await(0,s.Z)(e,p,r)),d.forEach((e=>{l[e.prop]=(0,o.W)(h,e.path)})),l.links=S(e,r),l}},821623:(e,t,r)=>{"use strict";r.d(t,{IA:()=>n,Q8:()=>i,bS:()=>s});const n={},i=[{permission:"hub:page",services:["portal"]},{permission:"hub:page:create",dependencies:["hub:page"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:page:view",dependencies:["hub:page"]},{permission:"hub:page:edit",dependencies:["hub:page"],authenticated:!0,entityEdit:!0},{permission:"hub:page:delete",dependencies:["hub:page"],authenticated:!0,entityDelete:!0},{permission:"hub:page:canChangeAccess",dependencies:["hub:page"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:page:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:page:workspace:overview",availability:["alpha"],dependencies:["hub:page:workspace","hub:page:view"]},{permission:"hub:page:workspace:dashboard",dependencies:["hub:page:workspace","hub:page:view"]},{permission:"hub:page:workspace:details",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:workspace:collaborators",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:workspace:settings",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:manage",dependencies:["hub:page:edit"]}],s=["data.values.layout","data.values.headContent"]},404216:(e,t,r)=>{"use strict";r.d(t,{PageSchema:()=>s,X:()=>i});var n=r(181794);const i=["hub:page:edit","hub:page:create"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign({},n.N.properties)})},560992:(e,t,r)=>{"use strict";r.d(t,{Cw:()=>o,GH:()=>i,Mn:()=>c,XJ:()=>a,t9:()=>n});const n="Hub Page",i="Site Page",s="hubPage",o=1.1,a={name:"",permissions:[],schemaVersion:o,tags:[],typeKeywords:[s],view:{contacts:[],featuredContentIds:[],showMap:!0},layout:{sections:[]}},c={item:{type:n,title:"",description:"",snippet:"",tags:[],typeKeywords:[s],properties:{slug:"",schemaVersion:o}},data:{values:{layout:{}}}}},703636:(e,t,r)=>{"use strict";r.d(t,{CT:()=>n.CT,D4:()=>n.D4,H6:()=>n.H6,Hy:()=>n.Hy,T:()=>i.T,T$:()=>n.T$,VC:()=>n.VC,nu:()=>n.nu});var n=r(272997),i=r(417031)},421977:(e,t,r)=>{"use strict";r.d(t,{G:()=>l,H:()=>d});var n=r(321932),i=r(986326),s=r(27879),o=r(43416),a=r(821623),c=r(462794),u=r(447465);const l=[...s.Xm,...i.c,...n.Z,{permission:"hub:discussion",services:["discussions"]},{permission:"hub:discussion:create",dependencies:["hub:discussion"],authenticated:!0,privileges:["portal:user:createItem"],licenses:["hub-premium"]},{permission:"hub:discussion:view",dependencies:["hub:discussion"],authenticated:!1,licenses:["hub-basic","hub-premium"]},{permission:"hub:discussion:edit",authenticated:!0,dependencies:["hub:discussion"],licenses:["hub-basic","hub-premium"],entityEdit:!0},{permission:"hub:discussion:delete",authenticated:!0,dependencies:["hub:discussion"],licenses:["hub-basic","hub-premium"],entityDelete:!0}
10,{permission:"hub:discussion:owner",dependencies:["hub:discussion"],authenticated:!0,entityOwner:!0},{permission:"hub:discussion:canChangeAccess",dependencies:["hub:discussion"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:discussion:workspace:overview",dependencies:["hub:discussion:view"]},{permission:"hub:discussion:workspace:dashboard",dependencies:["hub:discussion:view"]},{permission:"hub:discussion:workspace:details",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:settings",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:settings:discussions",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:collaborators",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:metrics",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:manage",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:catalog",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:catalog:content",dependencies:["hub:discussion:workspace:catalog"]},{permission:"hub:discussion:workspace:catalog:events",dependencies:["hub:discussion:workspace:catalog","hub:event","hub:feature:catalogs:edit:advanced"]},...o.qG,{permission:"hub:content",services:["portal"]},{permission:"hub:content:create",services:["portal"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:content:view",services:["portal"],authenticated:!1},{permission:"hub:content:view:related",dependencies:["hub:content:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:content:view:connected",dependencies:["hub:content:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"},{property:"entity:type",type:"included-in",value:["Feature Service","Map Service"]}]},{permission:"hub:content:edit",authenticated:!0,services:["portal"],entityEdit:!0},{permission:"hub:content:delete",authenticated:!0,services:["portal"],entityDelete:!0},{permission:"hub:content:canChangeAccess",dependencies:["hub:content"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:content:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:content:workspace:overview",availability:["alpha"],dependencies:["hub:content:workspace","hub:content:view"]},{permission:"hub:content:workspace:dashboard",dependencies:["hub:content:workspace","hub:content:view"]},{permission:"hub:content:workspace:details",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:workspace:settings",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:workspace:settings:schedule",dependencies:["hub:content:workspace:settings"],environments:["devext","qaext","production"],services:["hub-downloads"]},{permission:"hub:content:workspace:collaborators",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:manage",dependencies:["hub:content:edit"]},{permission:"hub:content:canRecordDownloadErrors",environments:["qaext","devext"]},{permission:"hub:content:downloads:displayErrors",availability:["alpha"],environments:["qaext","devext"]},{permission:"hub:content:document:create",dependencies:["hub:content:create"]},{permission:"hub:content:workspace:settings:discussions",dependencies:["hub:content:workspace","hub:content:edit"],licenses:["hub-basic","hub-premium"]},{permission:"hub:group",services:["portal"]},{permission:"hub:group:create",dependencies:["hub:group"],authenticated:!0,privileges:["portal:user:createGroup"],assertions:[{property:"context:currentUser.groups",type:"length-lt",value:"context:portal.limits.MaxNumUserGroups"}]},{permission:"hub:group:create:view",dependencies:["hub:group:create"]},{permission:"hub:group:create:edit",dependencies:["hub:group:create"],privileges:["portal:admin:createUpdateCapableGroup"]},{permission:"hub:group:view",dependencies:["hub:group"]},{permission:"hub:group:edit",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:updateGroups"]}
10,{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:updateGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:delete",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:deleteGroups"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:deleteGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:manage",assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:updateGroups","portal:admin:deleteGroups","portal:admin:assignToGroups","portal:admin:shareToGroup"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:updateGroups","portal:admin:deleteGroups","portal:admin:assignToGroups","portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:owner",dependencies:["hub:group"],authenticated:!0,entityOwner:!0},{permission:"hub:group:canChangeAccess",dependencies:["hub:group:edit"]},{permission:"hub:group:canAssignMembers",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:assignToGroups"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:assignToGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:workspace",dependencies:["hub:feature:workspace","hub:group:manage"]},{permission:"hub:group:workspace:overview",availability:["alpha"],dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:details",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:settings",dependencies:["hub:group:workspace"]},{permission:"hub:group:settings:discussions",services:["discussions"],dependencies:["hub:group:workspace:settings"],licenses:["hub-basic","hub-premium"]},{permission:"hub:group:workspace:content",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:members",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:events",services:["events"],dependencies:["hub:group:workspace"],licenses:["hub-premium"]},{permission:"hub:group:shareContent",dependencies:["hub:group"],authenticated:!0,privileges:["portal:user:shareToGroup"],assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-member",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:shareToGroup"]},{conditions:[{property:"entity:isViewOnly",type:"eq",value:!1},{property:"context:currentUser.privileges",type:"without",value:["portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-member",value:"entity:id"},{conditions:[{property:"entity:isViewOnly",type:"eq",value:!0},{property:"context:currentUser.privileges",type:"without",value:["portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},...a.Q8,...u.i,{permission:"platform:features:user:edit",services:["portal"],authenticated:!0,privileges:["features:user:edit"]},{permission:"platform:features:user:fullEdit",services:["portal"],authenticated:!0,privileges:["features:user:fullEdit"]},{permission:"platform:features:user:manageVersions",services:["portal"],authenticated:!0,privileges:["features:user:manageVersions"]},{permission:"platform:marketplace:admin:manage",services:["portal"],authenticated:!0,privileges:["marketplace:admin:manage"]},{permission:"platform:marketplace:admin:purchase",services:["portal"],authenticated:!0,privileges:["marketplace:admin:purchase"]},{permission:"platform:marketplace:admin:startTrial",services:["portal"],authenticated:!0,privileges:["marketplace:admin:startTrial"]}
10,{permission:"platform:opendata:user:designateGroup",services:["portal"],authenticated:!0,privileges:["opendata:user:designateGroup"]},{permission:"platform:opendata:user:openDataAdmin",services:["portal"],authenticated:!0,privileges:["opendata:user:openDataAdmin"]},{permission:"platform:portal:admin:assignToGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:assignToGroups"]},{permission:"platform:portal:admin:categorizeItems",services:["portal"],authenticated:!0,privileges:["portal:admin:categorizeItems"]},{permission:"platform:portal:admin:changeUserRoles",services:["portal"],authenticated:!0,privileges:["portal:admin:changeUserRoles"]},{permission:"platform:portal:admin:createGPWebhook",services:["portal"],authenticated:!0,privileges:["portal:admin:createGPWebhook"]},{permission:"platform:portal:admin:createUpdateCapableGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:createUpdateCapableGroup"]},{permission:"platform:portal:admin:createLeavingDisallowedGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:createLeavingDisallowedGroup"]},{permission:"platform:portal:admin:deleteGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteGroups"]},{permission:"platform:portal:admin:deleteItems",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteItems"]},{permission:"platform:portal:admin:deleteUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteUsers"]},{permission:"platform:portal:admin:disableUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:disableUsers"]},{permission:"platform:portal:admin:inviteUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:inviteUsers"]},{permission:"platform:portal:admin:manageCollaborations",services:["portal"],authenticated:!0,privileges:["portal:admin:manageCollaborations"]},{permission:"platform:portal:admin:manageCredits",services:["portal"],authenticated:!0,privileges:["portal:admin:manageCredits"]},{permission:"platform:portal:admin:manageEnterpriseGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:manageEnterpriseGroups"]},{permission:"platform:portal:admin:manageLicenses",services:["portal"],authenticated:!0,privileges:["portal:admin:manageLicenses"]},{permission:"platform:portal:admin:manageRoles",services:["portal"],authenticated:!0,privileges:["portal:admin:manageRoles"]},{permission:"platform:portal:admin:manageSecurity",services:["portal"],authenticated:!0,privileges:["portal:admin:manageSecurity"]},{permission:"platform:portal:admin:manageServers",services:["portal"],authenticated:!0,privileges:["portal:admin:manageServers"]},{permission:"platform:portal:admin:manageUtilityServices",services:["portal"],authenticated:!0,privileges:["portal:admin:manageUtilityServices"]},{permission:"platform:portal:admin:manageWebhooks",services:["portal"],authenticated:!0,privileges:["portal:admin:manageWebhooks"]},{permission:"platform:portal:admin:manageWebsite",services:["portal"],authenticated:!0,privileges:["portal:admin:manageWebsite"]},{permission:"platform:portal:admin:reassignGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignGroups"]},{permission:"platform:portal:admin:reassignItems",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignItems"]},{permission:"platform:portal:admin:reassignUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignUsers"]},{permission:"platform:portal:admin:shareToGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToGroup"]},{permission:"platform:portal:admin:shareToOrg",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToOrg"]},{permission:"platform:portal:admin:shareToPublic",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToPublic"]},{permission:"platform:portal:admin:updateGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:updateGroups"]},{permission:"platform:portal:admin:updateItemCategorySchema",services:["portal"],authenticated:!0,privileges:["portal:admin:updateItemCategorySchema"]},{permission:"platform:portal:admin:updateItems",services:["portal"],authenticated:!0,privileges:["portal:admin:updateItems"]},{permission:"platform:portal:admin:updateMemberCategorySchema",services:["portal"],authenticated:!0,privileges:["portal:admin:updateMemberCategorySchema"]},{permission:"platform:portal:admin:updateUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:updateUsers"]},{permission:"platform:portal:admin:viewGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:viewGroups"]},{permission:"platform:portal:admin:viewItems",services:["portal"],authenticated:!0,privileges:["portal:admin:viewItems"]},{permission:"platform:portal:admin:viewUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:viewUsers"]},{permission:"platform:portal:publisher:bulkPublishFromDataStores",services:["portal"],authenticated:!0,privileges:["portal:publisher:bulkPublishFromDataStores"]},{permission:"platform:portal:publisher:createDataPipelines",services:["portal"],authenticated:!0,privileges:["portal:publisher:createDataPipelines"]},{permission:"platform:portal:publisher:createFeatureWebhook",services:["portal"],authenticated:!0,privileges:["portal:publisher:createFeatureWebhook"]},{permission:"platform:portal:publisher:publishBigDataAnalytics",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishBigDataAnalytics"]},{permission:"platform:portal:publisher:publishDynamicImagery",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishDynamicImagery"]},{permission:"platform:portal:publisher:publishFeatures",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishFeatures"]},{permission:"platform:portal:publisher:publishFeeds",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishFeeds"]},{permission:"platform:portal:publisher:publishKnowledgeGraph",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishKnowledgeGraph"]},{permission:"platform:portal:publisher:publishRealTimeAnalytics",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishRealTimeAnalytics"]},{permission:"platform:portal:publisher:publishScenes",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishScenes"]},{permission:"platform:portal:publisher:publishServerGPServices",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishServerGPServices"]},{permission:"platform:portal:publisher:publishServerServices",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishServerServices"]},{permission:"platform:portal:publisher:publishTiledImagery",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishTiledImagery"]},{permission:"platform:portal:publisher:publishTiles",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishTiles"]},{permission:"platform:portal:publisher:registerDataStores",services:["portal"],authenticated:!0,privileges:["portal:publisher:registerDataStores"]},{permission:"platform:portal:user:addExternalMembersToGroup",services:["portal"],authenticated:!0,privileges:["portal:user:addExternalMembersToGroup"]},{permission:"platform:portal:user:categorizeItems",services:["portal"],authenticated:!0,privileges:["portal:user:categorizeItems"]},{permission:"platform:portal:user:createGroup",services:["portal"],authenticated:!0,privileges:["portal:user:createGroup"]},{permission:"platform:portal:user:createItem",services:["portal"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"platform:portal:user:invitePartneredCollaborationMembers",services:["portal"],authenticated:!0,privileges:["portal:user:invitePartneredCollaborationMembers"]},{permission:"platform:portal:user:joinGroup",services:["portal"],authenticated:!0,privileges:["portal:user:joinGroup"]},{permission:"platform:portal:user:joinNonOrgGroup",services:["portal"],authenticated:!0,privileges:["portal:user:joinNonOrgGroup"]},{permission:"platform:portal:user:reassignItems",services:["portal"],authenticated:!0,privileges:["portal:user:reassignItems"]},{permission:"platform:portal:user:receiveItems",services:["portal"],authenticated:!0,privileges:["portal:user:receiveItems"]},{permission:"platform:portal:user:runWebTool",services:["portal"],authenticated:!0,privileges:["portal:user:runWebTool"]},{permission:"platform:portal:user:shareGroupToOrg",services:["portal"],authenticated:!0,privileges:["portal:user:shareGroupToOrg"]},{permission:"platform:portal:user:shareGroupToPublic",services:["portal"],authenticated:!0,privileges:["portal:user:shareGroupToPublic"]},{permission:"platform:portal:user:shareToGroup",services:["portal"],authenticated:!0,privileges:["portal:user:shareToGroup"]},{permission:"platform:portal:user:shareToOrg",services:["portal"],authenticated:!0,privileges:["portal:user:shareToOrg"]},{permission:"platform:portal:user:shareToPublic",services:["portal"],authenticated:!0,privileges:["portal:user:shareToPublic"]},{permission:"platform:portal:user:viewHostedFeatureServices",services:["portal"],authenticated:!0,privileges:["portal:user:viewHostedFeatureServices"]},{permission:"platform:portal:user:viewHostedTileServices",services:["portal"],authenticated:!0,privileges:["portal:user:viewHostedTileServices"]},{permission:"platform:portal:user:viewOrgGroups",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgGroups"]},{permission:"platform:portal:user:viewOrgItems",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgItems"]},{permission:"platform:portal:user:viewOrgUsers",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgUsers"]},{permission:"platform:portal:user:viewTracks",services:["portal"],authenticated:!0,privileges:["portal:user:viewTracks"]},{permission:"platform:premium:publisher:createAdvancedNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:createAdvancedNotebooks"]},{permission:"platform:premium:publisher:createNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:createNotebooks"]},{permission:"platform:premium:publisher:geoanalytics",services:["portal"],authenticated:!0,privileges:["premium:publisher:geoanalytics"]},{permission:"platform:premium:publisher:rasteranalysis",services:["portal"],authenticated:!0,privileges:["premium:publisher:rasteranalysis"]},{permission:"platform:premium:publisher:scheduleNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:scheduleNotebooks"]},{permission:"platform:premium:user:demographics",services:["portal"],authenticated:!0,privileges:["premium:user:demographics"]},{permission:"platform:premium:user:elevation",services:["portal"],authenticated:!0,privileges:["premium:user:elevation"]},{permission:"platform:premium:user:featurereport",services:["portal"],authenticated:!0,privileges:["premium:user:featurereport"]},{permission:"platform:premium:user:geocode:stored",services:["portal"],authenticated:!0,privileges:["premium:user:geocode:stored"]},{permission:"platform:premium:user:geocode:temporary",services:["portal"],authenticated:!0,privileges:["premium:user:geocode:temporary"]},{permission:"platform:premium:user:geocode",services:["portal"],authenticated:!0,privileges:["premium:user:geocode"]},{permission:"platform:premium:user:geoenrichment",services:["portal"],authenticated:!0,privileges:["premium:user:geoenrichment"]}
10,{permission:"platform:premium:user:networkanalysis:closestfacility",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:closestfacility"]},{permission:"platform:premium:user:networkanalysis:locationallocation",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:locationallocation"]},{permission:"platform:premium:user:networkanalysis:optimizedrouting",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:optimizedrouting"]},{permission:"platform:premium:user:networkanalysis:origindestinationcostmatrix",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:origindestinationcostmatrix"]},{permission:"platform:premium:user:networkanalysis:routing",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:routing"]},{permission:"platform:premium:user:networkanalysis:servicearea",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:servicearea"]},{permission:"platform:premium:user:networkanalysis:vehiclerouting",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:vehiclerouting"]},{permission:"platform:premium:user:networkanalysis",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis"]},{permission:"platform:premium:user:places",services:["portal"],authenticated:!0,privileges:["premium:user:places"]},{permission:"platform:premium:user:spatialanalysis",services:["portal"],authenticated:!0,privileges:["premium:user:spatialanalysis"]},...c.W,{permission:"hub:gating:workspace:released"},{permission:"hub:platform:ai-assistant",licenses:["hub-premium"],services:["hub-ai-assistant"],assertions:[{property:"context:portalSettings.aiAssistantsEnabled",type:"eq",value:!0},{property:"context:portalSettings.blockBetaApps",type:"eq",value:!1}]},{permission:"hub:feature:ai-assistant",availability:["alpha"],flagValue:!1,entityConfigurable:!0},{permission:"hub:feature:privacy",environments:["devext"]},{permission:"hub:feature:workspace",dependencies:["hub:gating:workspace:released"]},{permission:"hub:feature:user:preferences",environments:["devext","qaext","production"]},{permission:"hub:environment:qaext",environments:["qaext"]},{permission:"hub:environment:devext",environments:["devext"]},{permission:"hub:environment:production",environments:["production"]},{permission:"hub:environment:enterprise",environments:["enterprise"]},{permission:"hub:card:follow",environments:["qaext"],availability:["flag"],licenses:["hub-basic","hub-premium"]},{permission:"hub:feature:workspace:user",dependencies:["hub:feature:workspace"]},{permission:"hub:feature:workspace:org",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:keyboardshortcuts",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:history",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:newentityview",environments:["qaext"],availability:["flag"]},{permission:"hub:feature:catalogs",environments:["qaext"],availability:["alpha"]},{permission:"hub:feature:catalogs:edit:advanced",entityEdit:!0,licenses:["hub-premium"],assertions:[{property:"entity:type",type:"neq",value:"Hub Site Application"}]},{permission:"hub:feature:catalogs:edit:appearance",dependencies:["hub:feature:catalogs:edit:advanced"],environments:["qaext"],availability:["alpha"]},{permission:"hub:feature:inline-workspace",environments:["devext"],availability:["alpha"]},{permission:"hub:feature:pagescatalog",environments:["qaext"],availability:["alpha"]},{permission:"hub:license:hub-premium",licenses:["hub-premium"]},{permission:"hub:license:hub-basic",licenses:["hub-basic"]},{permission:"hub:license:enterprise-sites",licenses:["enterprise-sites"]},{permission:"hub:availability:alpha",availability:["alpha"]},{permission:"hub:availability:beta",availability:["beta"]},{permission:"hub:availability:general",availability:["general"]},{permission:"hub:event",services:["events"],dependencies:["hub:feature:workspace"],licenses:["hub-premium"]},{permission:"hub:event:create",dependencies:["hub:event"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:event:view",services:["events"],licenses:["hub-basic","hub-premium"]},{permission:"hub:event:edit",authenticated:!0,services:["events"],dependencies:["hub:feature:workspace"],licenses:["hub-basic","hub-premium"],entityEdit:!0},{permission:"hub:event:delete",authenticated:!0,dependencies:["hub:event"],entityDelete:!0}
10,{permission:"hub:event:owner",dependencies:["hub:event"],authenticated:!0,entityOwner:!0},{permission:"hub:event:canChangeAccess",dependencies:["hub:event"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:canChangeAccess",type:"eq",value:!0}]},{permission:"hub:event:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:event:workspace:dashboard",dependencies:["hub:event:workspace","hub:event:view"]},{permission:"hub:event:workspace:details",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:settings",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:collaborators",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:registrants",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:content",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:catalog",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:catalog:content",dependencies:["hub:event:workspace:catalog"]},{permission:"hub:event:workspace:catalog:events",dependencies:["hub:event:workspace:catalog","hub:event","hub:feature:catalogs:edit:advanced"]},{permission:"hub:event:manage",dependencies:["hub:event:edit"]},{permission:"hub:user",services:["portal"]},{permission:"hub:user:view",dependencies:["hub:user"],authenticated:!1},{permission:"hub:user:owner",dependencies:["hub:user"],authenticated:!0,entityOwner:!0},{permission:"hub:user:edit",dependencies:["hub:user:owner"]},{permission:"hub:user:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:user:workspace:overview",dependencies:["hub:user:workspace"]},{permission:"hub:user:workspace:content",dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:workspace:groups",dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:workspace:events",services:["events"],dependencies:["hub:user:workspace","hub:user:owner"],licenses:["hub-premium"]},{permission:"hub:user:workspace:settings",environments:["devext","qaext","production"],dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:manage",dependencies:["hub:user:edit"]}];function d(e){return l.find((t=>t.permission===e))}},398195:(e,t,r)=>{"use strict";function n(e,t){const r=Object.assign(Object.assign({},t),e),n=Object.keys(t);return Object.keys(r).reduce(((e,t)=>(n.includes(t)||e.push(t),e)),[]).forEach((e=>{delete r[e]})),r}r.d(t,{U:()=>n})},496157:(e,t,r)=>{"use strict";r.d(t,{P:()=>C});var n=r(518944),i=r(264263);const s=[{response:"granted",code:"PC100"},{response:"org-member",code:"PC101"},{response:"not-org-member",code:"PC102"},{response:"group-member",code:"PC103"},{response:"not-group-member",code:"PC104"},{response:"not-group-admin",code:"PC105"},{response:"is-user",code:"PC106"},{response:"not-owner",code:"PC107"},{response:"not-licensed",code:"PC108"},{response:"not-licensed-available",code:"PC109"},{response:"not-available",code:"PC110"},{response:"not-granted",code:"PC111"},{response:"no-edit-access",code:"PC112"},{response:"edit-access",code:"PC113"},{response:"invalid-permission",code:"PC114"},{response:"privilege-required",code:"PC115"},{response:"service-offline",code:"PC116"},{response:"service-maintenance",code:"PC117"},{response:"entity-required",code:"PC118"},{response:"not-authenticated",code:"PC119"},{response:"not-alpha-org",code:"PC120"},{response:"property-missing",code:"PC121"},{response:"property-not-array",code:"PC122"},{response:"array-contains-invalid-value",code:"PC123"},{response:"array-missing-required-value",code:"PC124"},{response:"property-mismatch",code:"PC125"},{response:"user-not-group-member",code:"PC126"},{response:"user-not-group-manager",code:"PC127"},{response:"user-not-group-owner",code:"PC128"},{response:"assertion-property-not-found",code:"PC129"},{response:"assertion-failed",code:"PC130"},{response:"assertion-requires-numeric-values",code:"PC131"},{response:"property-match",code:"PC132"},{response:"not-beta-org",code:"PC133"},{response:"not-in-environment",code:"PC134"},{response:"feature-disabled",code:"PC135"},{response:"feature-enabled",code:"PC136"},{response:"no-policy-exists",code:"PC137"},{response:"disabled-by-entity-flag",code:"PC137"},{response:"disabled-by-feature-flag",code:"PC137"}];function o(e){const t=s.find((t=>t.response===e));return(null==t?void 0:t.code)||"PC000"}function a(e,t,r){var n;const i=[];if(null===(n=e.licenses)||void 0===n?void 0:n.length){let r="granted";e.licenses.includes(t.hubLicense)||(r="not-available","hub-premium"===e.licenses[0]&&"hub-basic"===t.hubLicense&&(r="not-licensed"));const n={name:`license in ${e.licenses.join(", ")}
10`,value:t.hubLicense,code:o(r),response:r};i.push(n)}return i}var c=r(421977),u=r(196831);function l(e,t,r){const n=[];if(e.hasOwnProperty("authenticated")){let r="granted";e.authenticated&&!t.isAuthenticated&&(r="not-authenticated");const i={name:"authentication",value:`required: ${e.authenticated}`,code:o(r),response:r};n.push(i)}return n}function d(e,t,r){var n;const i=[];if(e.entityOwner){let e="granted",s="entity owner required";t.isAuthenticated?r?(s=`entity owner required: ${r.owner}`,r.owner!==t.currentUser.username&&(e="not-owner")):e="entity-required":e="not-authenticated";const a={name:s,value:`current user: ${null===(n=t.currentUser)||void 0===n?void 0:n.username}`,code:o(e),response:e};i.push(a)}return i}function p(e,t,r){const i=[];if(e.hasOwnProperty("entityEdit")){let t="granted";r?e.entityEdit&&!r.canEdit?t="no-edit-access":!e.entityEdit&&r.canEdit&&(t="edit-access"):t="entity-required";const s={name:"entity edit required",value:`entity.canEdit: ${(0,n.t)(r,"canEdit",!1)}`,code:o(t),response:t};i.push(s)}return i}function h(e,t,r){const i=[];if(e.hasOwnProperty("entityDelete")){let t="granted";r?e.entityDelete&&!r.canDelete?t="no-delete-access":!e.entityDelete&&r.canDelete&&(t="delete-access"):t="entity-required";const s={name:"entity delete required",value:`entity.canDelete: ${(0,n.t)(r,"canDelete",!1)}`,code:o(t),response:t};i.push(s)}return i}function m(e,t,r){var n;let i=[];return(null===(n=e.privileges)||void 0===n?void 0:n.length)&&(i=e.privileges.map((e=>{let r="granted",n="privilege present";return t.isAuthenticated?t.currentUser.privileges.includes(e)||(r="privilege-required",n="privilege missing"):(r="not-authenticated",n="not authenticated"),{name:`privilege required: ${e}`,value:n,response:r,code:o(r)}}))),i}var f=r(40180);function g(e,t,r){let n="granted";const s={entity:t,context:r},a=b(e.property),c=(0,i.W)(s,a.path);void 0===c&&(n="assertion-property-not-found");let u=e.value;if("string"==typeof u&&u.indexOf(":")>-1){const t=b(e.value);u=(0,i.W)(s,t.path),void 0===u&&(n="assertion-property-not-found")}if(void 0!==c&&void 0!==u)switch(e.type){case"eq":case"neq":n=function(e,t,r){let n="granted";return("eq"===e.type&&t!==r||"neq"===e.type&&t===r)&&(n="assertion-failed"),n}(e,c,u);break;case"starts-with":case"ends-with":case"not-starts-with":case"not-ends-with":n=function(e,t,r){let n="granted";return"starts-with"!==e.type||t.startsWith(r)?"not-starts-with"===e.type&&t.startsWith(r)?n="assertion-failed":"ends-with"!==e.type||t.endsWith(r)?"not-ends-with"===e.type&&t.endsWith(r)&&(n="assertion-failed"):n="assertion-failed":n="assertion-failed",n}(e,c,u);break;case"contains":case"contains-some":case"without":n=function(e,t,r){let n="granted";if(Array.isArray(t)){const i=t;"contains"===e.type&&(Array.isArray(r)?r.every((e=>i.includes(e)))||(n="array-missing-required-value"):i.includes(r)||(n="array-missing-required-value")),"contains-some"===e.type&&(Array.isArray(r)?r.some((e=>i.includes(e)))||(n="array-missing-required-value"):n="assertion-requires-array-value"),"without"===e.type&&(Array.isArray(r)?r.some((e=>i.includes(e)))&&(n="array-contains-invalid-value"):i.includes(r)&&(n="array-contains-invalid-value"))}else n="property-not-array";return n}(e,c,u);break;case"included-in":n=function(e,t,r){let n="granted";return Array.isArray(r)?r.includes(t)||(n="array-missing-required-value"):n="property-not-array",n}(0,c,u);break;case"gt":case"lt":n=function(e,t,r){let n="granted";return"number"==typeof t&&"number"==typeof r||(n="assertion-requires-numeric-values"),("gt"!==e.type||t>r)&&("lt"!==e.type||t<r)||(n="assertion-failed"),n}(e,c,u);break;case"length-gt":case"length-lt":n=function(e,t,r){let n="granted";return"string"==typeof t||Array.isArray(t)?"number"!=typeof r?n="assertion-requires-numeric-values":("length-gt"!==e.type||t.length>r)&&("length-lt"!==e.type||t.length<r)||(n="assertion-failed"):n="property-has-no-length",n}(e,c,u);break;case"is-group-admin":case"is-not-group-admin":case"is-group-member":case"is-not-group-member":case"is-group-owner":case"is-not-group-owner":n=function(e,t,r,n){let i="granted";const s=n.currentUser.groups||[];let o=(0,f.e)("id",s),a="user-not-group-member";return"is-group-member"===e.type&&(a="user-not-group-member",o=y(s,["admin","owner","member"])),"is-not-group-member"===e.type&&(a="user-is-group-member",o=y(s,["admin","owner","member"])),"is-group-admin"===e.type&&(a="user-not-group-manager",o=y(s,["admin","owner"])),"is-not-group-admin"===e.type&&(a="user-is-group-manager",o=y(s,["admin","owner"])),"is-group-owner"===e.type&&(a="user-not-group-owner",o=y(s,["owner"])),"is-not-group-owner"===e.type&&(a="user-is-group-owner",o=y(s,["owner"])),(e.type.includes("not")?o.includes(r):!o.includes(r))&&(i=a),i}(e,0,u,r)}return{name:`assertion: ${e.property} ${e.type} ${e.value}`,value:c,code:o(n),response:n}}function y(e,t){return e.reduce(((e,r)=>
10(t.includes(r.userMembership.memberType)&&e.push(r.id),e)),[])}function b(e){let t="entity",r=`entity.${e}`;return e.indexOf(":")>-1&&(t=e.split(":")[0],r=`${t}.${e.split(":")[1]}`),{root:t,path:r}}function v(e,t,r){let n=[];return e.assertions&&(n=e.assertions.reduce(((e,n)=>{var i;let s=!0;if((null===(i=n.conditions)||void 0===i?void 0:i.length)&&(s=n.conditions.every((e=>"granted"===g(e,r,t).response))),s){const i=g(n,r,t);e=[...e,i]}return e}),[])),n}function w(e,t,r){const n=[];if(e.environments&&e.environments.length){let r="granted";e.environments.includes(t.environment)||(r="not-in-environment");const i={name:`user in ${e.environments.join(",")} org`,value:t.environment,code:o(r),response:r};n.push(i)}return n}function S(e,t,r){let n=[];if(e.availability&&e.availability.length){const r=[];t.isAlphaOrg&&r.push("alpha"),t.isBetaOrg&&r.push("beta"),r.length||r.push("general"),n=e.availability.reduce(((e,t)=>{let n="granted";r.includes(t)||(n="flag"===t?"feature-flag-required":`not-${t}-org`);let i=`user in ${t} org`;"flag"===t&&(i="with feature flag");const s={name:i,value:r.join(", "),code:o(n),response:n};return e.push(s),e}),[])}return n}function E(e,t,r){let n=[];if(e.services){const r=t.serviceStatus;n=e.services.map((e=>{let t="granted";return"online"!==r[e]&&(t=`service-${r[e]}`),{name:`service ${e} online`,value:`service is ${r[e]}`,code:o(t),response:t}}))}return n}var T=r(554799);function I(e,t,r){var n;let i=[];return(null===(n=e.dependencies)||void 0===n?void 0:n.length)&&(i=e.dependencies.reduce(((e,n)=>{const i=C(n,t,r);return[...e,...i.checks]}),[])),i}function C(e,t,r){var s;const f="string"==typeof(null==r?void 0:r.label)?r.label:"",g="object"==typeof r&&null!==r&&"entity"in r?r.entity:r;if(!(0,u.m)(e)){const t={policy:e,access:!1,response:"invalid-permission",code:o("invalid-permission"),checks:[]};return A(t,f),t}const y=(0,c.H)(e);if(!y){const t={policy:e,access:!1,response:"no-policy-exists",code:o("no-policy-exists"),checks:[]};return A(t,f),t}const b={hasFlag:!1,value:!1,type:"none"};if(y.entityConfigurable&&(null==g?void 0:g.features)&&"object"==typeof g.features&&null!==g.features&&Object.prototype.hasOwnProperty.call(g.features,e)&&(b.hasFlag=!0,b.value=g.features[e],b.type="entity"),t.featureFlags&&Object.prototype.hasOwnProperty.call(t.featureFlags,e)&&(b.hasFlag=!0,b.value=t.featureFlags[e],b.type="uri-flag"),null===(s=t.userHubSettings)||void 0===s?void 0:s.features){const r=(0,n.t)(t,"userHubSettings.features",{});Object.keys(r).forEach((t=>{e===`hub:feature:${t}`&&(b.hasFlag=!0,b.value=(0,i.W)(r,t),b.type="feature")}))}if(b.hasFlag&&!b.value){const t=`disabled-by-${b.type}-flag`,r={policy:e,access:!1,response:t,code:o(t),checks:[{response:t,code:o(t),name:`Feature Flag: ${e}`}]};return A(r,f),r}const T=[E,l,m,d,p,h,a,v],C=[S,w];let O=[];O=b.hasFlag&&b.value?"feature"===b.type?[...T]:[I,...T]:[...C,I,...T];const _=O.reduce(((e,r)=>[...e,...r(y,t,g)]),[]),D={policy:e,access:!0,response:"granted",code:o("granted"),checks:[]};if(_.forEach((e=>{"granted"!==e.response&&"granted"===D.response&&(D.response=e.response,D.code=e.code,D.access=!1)})),D.checks=_,g){const r=(0,n.t)(g,"permissions",[]).filter((t=>t.permission===e)).map((e=>function(e,t){const r=t.currentUser||{groups:[]},n=r.groups||[];let s="not-granted";const a=e.collaborationType,c=e.collaborationId;if("user"===a&&(s=c===r.username?"granted":"not-granted"),"org"===a&&(s=c===r.orgId?"granted":"not-org-member"),"group"===a&&(s=n.find((e=>e.id===c))?"granted":"not-group-member"),"group-admin"===a){const e=n.find((e=>e.id===c)),t=(0,i.W)(e,"userMembership.memberType");s=["admin","owner"].includes(t)?"granted":"not-group-admin"}return"authenticated"===a&&(s=t.isAuthenticated?"granted":"not-authenticated"),"anonymous"===a&&(s="granted"),{name:"entity:policy",value:`${e.collaborationType}:${e.collaborationId}`,response:s,code:o(s)}}(e,t))),s=r.find((e=>"granted"===e.response));r.length&&!s&&"granted"===D.response&&(D.access=!1,D.response="not-granted"),D.checks=[...D.checks,...r]}return A(D,f),D}function A(e,t){e.access||T.Y.warn(`checkPermission: ${t} ${e.policy} : ${e.response}`,e)}},328209:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HubPermissionsPolicies:()=>n.G,addPermissionPolicy:()=>s.a,checkPermission:()=>i.P,getPermissionPolicy:()=>n.H,isPermission:()=>c.m,removePermissionPolicy:()=>s.T});var n=r(421977),i=r(496157),s=r(513918),o=r(976960),a={};for(const e in o)["default","HubPermissionsPolicies","getPermissionPolicy","checkPermission","addPermissionPolicy","removePermissionPolicy"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a);var c=r(196831)},196831:(e,t,r)=>{"use strict";r.d(t,{m:()=>i})
11;
11const n=["hub:site","hub:site:create","hub:site:delete","hub:site:edit","hub:site:view","hub:site:owner","hub:site:canChangeAccess","hub:site:events","hub:site:content","hub:site:discussions","hub:site:feature:follow","hub:site:feature:discussions","hub:site:workspace","hub:site:workspace:overview","hub:site:workspace:dashboard","hub:site:workspace:details","hub:site:workspace:settings","hub:site:workspace:collaborators","hub:site:workspace:catalog","hub:site:workspace:catalog:content","hub:site:workspace:catalog:events","hub:site:workspace:catalog:upgrade","hub:site:workspace:metrics","hub:site:workspace:followers","hub:site:workspace:followers:member","hub:site:workspace:followers:manager","hub:site:workspace:followers:create","hub:site:workspace:pages","hub:site:workspace:events","hub:site:workspace:projects","hub:site:workspace:initiatives","hub:site:manage","hub:site:workspace:feeds","hub:site:workspace:assistant","hub:site:workspace:settings:discussions","hub:site:assistant:access","hub:project","hub:project:create","hub:project:delete","hub:project:edit","hub:project:view","hub:project:owner","hub:project:canChangeAccess","hub:project:events","hub:project:content","hub:project:discussions","hub:project:associations","hub:project:workspace","hub:project:workspace:overview","hub:project:workspace:dashboard","hub:project:workspace:details","hub:project:workspace:initiatives","hub:project:workspace:settings","hub:project:workspace:collaborators","hub:project:workspace:events","hub:project:workspace:metrics","hub:project:workspace:catalog","hub:project:workspace:catalog:content","hub:project:workspace:catalog:events","hub:project:manage","hub:initiative","hub:initiative:create","hub:initiative:delete","hub:initiative:edit","hub:initiative:view","hub:initiative:owner","hub:initiative:canChangeAccess","hub:initiative:events","hub:initiative:content","hub:initiative:discussions","hub:initiative:workspace","hub:initiative:workspace:overview","hub:initiative:workspace:dashboard","hub:initiative:workspace:details","hub:initiative:workspace:metrics","hub:initiative:workspace:projects","hub:initiative:workspace:projects:member","hub:initiative:workspace:projects:manager","hub:initiative:workspace:settings","hub:initiative:workspace:collaborators","hub:initiative:workspace:metrics","hub:initiative:workspace:catalogs","hub:initiative:workspace:catalog","hub:initiative:workspace:catalog:content","hub:initiative:workspace:catalog:events","hub:initiative:workspace:associationGroup:create","hub:initiative:manage","hub:content","hub:content:create","hub:content:delete","hub:content:edit","hub:content:view","hub:content:view:related","hub:content:view:connected","hub:content:canChangeAccess","hub:content:workspace","hub:content:workspace:overview","hub:content:workspace:dashboard","hub:content:workspace:details","hub:content:workspace:settings","hub:content:workspace:settings:schedule","hub:content:workspace:settings:discussions","hub:content:workspace:collaborators","hub:content:manage","hub:content:canRecordDownloadErrors","hub:content:downloads:displayErrors","hub:content:document:create","hub:group","hub:group:create","hub:group:create:view","hub:group:create:edit","hub:group:delete","hub:group:edit","hub:group:view","hub:group:owner","hub:group:canChangeAccess","hub:group:canAssignMembers","hub:group:workspace","hub:group:workspace:overview","hub:group:workspace:dashboard","hub:group:workspace:details","hub:group:workspace:settings","hub:group:settings:discussions","hub:group:workspace:collaborators","hub:group:workspace:content","hub:group:workspace:members","hub:group:workspace:events","hub:group:shareContent","hub:group:manage","hub:page","hub:page:create","hub:page:delete","hub:page:edit","hub:page:view","hub:page:canChangeAccess","hub:page:workspace","hub:page:workspace:overview","hub:page:workspace:dashboard","hub:page:workspace:details","hub:page:workspace:settings","hub:page:workspace:collaborators","hub:page:manage","platform:features:user:edit","platform:features:user:fullEdit","platform:features:user:manageVersions","platform:marketplace:admin:manage","platform:marketplace:admin:purchase","platform:marketplace:admin:startTrial","platform:opendata:user:designateGroup","platform:opendata:user:openDataAdmin","platform:portal:admin:assignToGroups","platform:portal:admin:categorizeItems","platform:portal:admin:changeUserRoles","platform:portal:admin:createGPWebhook","platform:portal:admin:createUpdateCapableGroup","platform:portal:admin:createLeavingDisallowedGroup","platform:portal:admin:deleteGroups","platform:portal:admin:deleteItems","platform:portal:admin:deleteUsers","platform:portal:admin:disableUsers","platform:portal:admin:inviteUsers","platform:portal:admin:manageCollaborations","platform:portal:admin:manageCredits","platform:portal:admin:manageEnterpriseGroups","platform:portal:admin:manageLicenses","platform:portal:admin:manageRoles","platform:portal:admin:manageSecurity","platform:portal:admin:manageServers","platform:portal:admin:manageUtilityServices","platform:portal:admin:manageWebhooks","platform:portal:admin:manageWebsite","platform:portal:admin:reassignGroups","platform:portal:admin:reassignItems","platform:portal:admin:reassignUsers","platform:portal:admin:shareToGroup","platform:portal:admin:shareToOrg","platform:portal:admin:shareToPublic","platform:portal:admin:updateGroups","platform:portal:admin:updateItemCategorySchema","platform:portal:admin:updateItems","platform:portal:admin:updateMemberCategorySchema","platform:portal:admin:updateUsers","platform:portal:admin:viewGroups","platform:portal:admin:viewItems","platform:portal:admin:viewUsers","platform:portal:publisher:bulkPublishFromDataStores","platform:portal:publisher:createDataPipelines","platform:portal:publisher:createFeatureWebhook","platform:portal:publisher:publishBigDataAnalytics","platform:portal:publisher:publishDynamicImagery","platform:portal:publisher:publishFeatures","platform:portal:publisher:publishFeeds","platform:portal:publisher:publishKnowledgeGraph","platform:portal:publisher:publishRealTimeAnalytics","platform:portal:publisher:publishScenes","platform:portal:publisher:publishServerGPServices","platform:portal:publisher:publishServerServices","platform:portal:publisher:publishTiledImagery","platform:portal:publisher:publishTiles","platform:portal:publisher:registerDataStores","platform:portal:user:addExternalMembersToGroup","platform:portal:user:categorizeItems","platform:portal:user:createGroup","platform:portal:user:createItem","platform:portal:user:invitePartneredCollaborationMembers","platform:portal:user:joinGroup","platform:portal:user:joinNonOrgGroup","platform:portal:user:reassignItems","platform:portal:user:receiveItems","platform:portal:user:runWebTool","platform:portal:user:shareGroupToOrg","platform:portal:user:shareGroupToPublic","platform:portal:user:shareToGroup","platform:portal:user:shareToOrg","platform:portal:user:shareToPublic","platform:portal:user:viewHostedFeatureServices","platform:portal:user:viewHostedTileServices","platform:portal:user:viewOrgGroups","platform:portal:user:viewOrgItems","platform:portal:user:viewOrgUsers","platform:portal:user:viewTracks","platform:premium:publisher:createAdvancedNotebooks","platform:premium:publisher:createNotebooks","platform:premium:publisher:geoanalytics","platform:premium:publisher:rasteranalysis","platform:premium:publisher:scheduleNotebooks","platform:premium:user:demographics","platform:premium:user:elevation","platform:premium:user:featurereport","platform:premium:user:geocode:stored","platform:premium:user:geocode:temporary","platform:premium:user:geocode","platform:premium:user:geoenrichment","platform:premium:user:networkanalysis:close
11stfacility","platform:premium:user:networkanalysis:locationallocation","platform:premium:user:networkanalysis:optimizedrouting","platform:premium:user:networkanalysis:origindestinationcostmatrix","platform:premium:user:networkanalysis:routing","platform:premium:user:networkanalysis:servicearea","platform:premium:user:networkanalysis:vehiclerouting","platform:premium:user:networkanalysis","platform:premium:user:places","platform:premium:user:spatialanalysis","hub:discussion","hub:discussion:create","hub:discussion:delete","hub:discussion:edit","hub:discussion:view","hub:discussion:owner","hub:discussion:canChangeAccess","hub:discussion:workspace:overview","hub:discussion:workspace:dashboard","hub:discussion:workspace:details","hub:discussion:workspace:settings","hub:discussion:workspace:collaborators","hub:discussion:workspace:metrics","hub:discussion:workspace:settings:discussions","hub:discussion:manage","temp:hub:discussion:create","hub:discussion:workspace:catalog","hub:discussion:workspace:catalog:content","hub:discussion:workspace:catalog:events","hub:initiativeTemplate","hub
11:initiativeTemplate:create","hub:initiativeTemplate:delete","hub:initiativeTemplate:edit","hub:initiativeTemplate:view","hub:initiativeTemplate:view:related","hub:initiativeTemplate:canChangeAccess","hub:initiativeTemplate:workspace","hub:initiativeTemplate:workspace:dashboard","hub:initiativeTemplate:workspace:details","hub:initiativeTemplate:workspace:collaborators","hub:initiativeTemplate:workspace:settings","hub:initiativeTemplate:manage","hub:template","hub:template:create","hub:template:delete","hub:template:edit","hub:template:manage","hub:template:view","hub:template:view:related","hub:template:canChangeAccess","hub:template:workspace","hub:template:workspace:details","hub:template:workspace:dashboard","hub:template:workspace:collaborators","hub:template:workspace:settings","hub:gating:workspace:released","hub:feature:ai-assistant","hub:platform:ai-assistant","hub:feature:privacy","hub:feature:workspace","hub:feature:user:preferences","hub:card:follow","hub:feature:workspace:user","hub:feature:workspace:org","hub:feature:keyboardshortcuts","hub:feature:newentityview","hub:feature:history","hub:feature:catalogs","hub:feature:catalogs:edit:advanced","hub:feature:catalogs:edit:appearance","hub:feature:inline-workspace","hub:feature:pagescatalog","hub:license:hub-premium","hub:license:hub-basic","hub:license:enterprise-sites","hub:availability:alpha","hub:availability:beta","hub:availability:general","hub:environment:qaext","hub:environment:devext","hub:environment:production","hub:environment:enterprise","hub:event","hub:event:create","hub:event:edit","hub:event:delete","hub:event:view","hub:event:owner","hub:event:canChangeAccess","hub:event:workspace","hub:event:workspace:dashboard","hub:event:workspace:details","hub:event:workspace:settings","hub:event:workspace:collaborators","hub:event:workspace:manage","hub:event:workspace:registrants","hub:event:workspace:content","hub:event:workspace:catalog","hub:event:workspace:catalog:content","hub:event:workspace:catalog:events","hub:event:manage","hub:user","hub:user:view","hub:user:edit","hub:user:owner","hub:user:workspace","hub:user:workspace:overview","hub:user:workspace:settings","hub:user:workspace:content","hub:user:workspace:groups","hub:user:workspace:events","hub:user:workspace:shared-with-me","hub:user:manage","hub:channel","hub:channel:create","hub:channel:delete","hub:channel:edit","hub:channel:view","hub:channel:owner","hub:channel:manage","hub:channel:read","hub:channel:write","hub:channel:readWrite","hub:channel:moderate"];function i(e){return n.includes(e)}},849239:()=>{},252892:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});const n={user:"user",group:"group",groupAdmin:"group-admin",org:"org",orgAdmin:"org-admin",authenticated:"authenticated",anonymous:"anonymous",owner:"owner"}},258922:()=>{},996085:()=>{},59077:()=>{},131121:()=>{},81725:()=>{},325359:()=>{},976960:(e,t,r)=>{"use strict";r.r(t),r.d(t,{COLLABORATION_TYPES:()=>o.C});var n=r(849239),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(258922);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(252892),a=r(996085);i={};for(const e in a)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>a[e]);r.d(t,i);var c=r(59077);i={};for(const e in c)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>c[e]);r.d(t,i);var u=r(131121);i={};for(const e in u)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>u[e]);r.d(t,i);var l=r(81725);i={};for(const e in l)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>l[e]);r.d(t,i);var d=r(325359);i={};for(const e in d)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>d[e]);r.d(t,i)},513918:(e,t,r)=>{"use strict";r.d(t,{T:()=>s,a:()=>i});var n=r(507707);function i(e=[],t){const r=s(e,t.permission,t.collaborationId);return r.push(t),r}function s(e=[],t,r){return(0,n.kI)(e).filter((e=>e.permission!==t||e.collaborationId!==r))}},340116:(e,t,r)=>{"use strict";r.d(t,{M:()=>v});var n=r(16449),i=r(617665),s=r(110571),o=r(2166),a=r(112987),c=r(332678),u=r(24910),l=r(805945),d=r(507707),p=r(619333),h=r(358637),m=r(518944),f=r(94684),g=r(969123),y=r(850780),b=r(370427);class v extends s.x{constructor(e,t){super(e,t),this._catalog=i.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new v(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=v.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.GG)(e,t.requestOptions);return v.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Project not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),e.orgUrlKey=e.orgUrlKey.toLowerCase(),Object.assign(Object.assign({},n.O7),e)}convertToCardModel(e){return(0,l.S)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,h.t)((0,d.kI)(this.entity),t,this.context.hubRequestOptions):(0,d.kI)(this.entity);r._groups=[];const n=(0,c.E)(this.entity).find((t=>t.id===e.metricId)),i=(0,m.t)(this.entity,"view.metricDisplays",[]).find((t=>t.metricId===e.metricId))||{};return r._metric=(0,g.h)(n,i),r._slug=(0,y.y)(this.entity),r}async fromEditor(e,t){const r=await(0,b.E)(e,this.context);return Object.entries(r).forEach((([e,t])=>{(0,f.t)(e,t,this)})),await this.save(),this.entity}update(e){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=i.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,p.t)(this.entity,this.context.userRequestOptions):this.entity=await(0,p.$)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.isDestroyed=!0;const{deleteProject:e}=await Promise.resolve().then(r.bind(r,619333));await e(this.entity.id,this.context.userRequestOptions)}resolveMetric(e){const t=(0,c.E)(this.entity).find((t=>t.id===e));if(t)return(0,u.q)(t,this.context);throw new Error(`Metric ${e} not found.`)}}},986326:(e,t,r)=>{"use strict";r.d(t,{c:()=>i,g:()=>n});const n={"hub:project:events":!1,"hub:project:content":!0,"hub:project:discussions":!1},i=[{permission:"hub:project",services:["portal"],licenses:["hub-premium"]},{permission:"hub:project:create",authenticated:!0,dependencies:["hub:project"],privileges:["portal:user:createItem"]},{permission:"hub:project:view",services:["portal"]},{permission:"hub:project:edit",services:["portal"],authenticated:!0,entityEdit:!0,licenses:["hub-premium","hub-basic"]},{permission:"hub:project:delete",dependencies:["hub:project"],authenticated:!0,entityDelete:!0}
11,{permission:"hub:project:owner",dependencies:["hub:project"],authenticated:!0,entityOwner:!0},{permission:"hub:project:canChangeAccess",dependencies:["hub:project"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:project:events",dependencies:["hub:project:view"],entityConfigurable:!0},{permission:"hub:project:content",dependencies:["hub:project:edit"]},{permission:"hub:project:discussions",dependencies:["hub:project:view"]},{permission:"hub:project:associations",dependencies:["hub:project:view"]},{permission:"hub:project:workspace"},{permission:"hub:project:workspace:overview",dependencies:["hub:project:workspace","hub:project:view"]},{permission:"hub:project:workspace:dashboard",dependencies:["hub:project:workspace","hub:project:view"]},{permission:"hub:project:workspace:details",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:initiatives",dependencies:["hub:project:workspace","hub:project:associations","hub:project:edit"]},{permission:"hub:project:workspace:settings",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:collaborators",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:metrics",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:catalog",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:catalog:content",dependencies:["hub:project:workspace:catalog"]},{permission:"hub:project:workspace:catalog:events",dependencies:["hub:project:workspace:catalog","hub:event","hub:feature:catalogs:edit:advanced"]},{permission:"hub:project:manage",dependencies:["hub:project:edit"]}]},665072:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,ProjectSchema:()=>c});var n=r(494067),i=r(925729),s=r(181794),o=r(505681);const a=["hub:project:create","hub:project:create2","hub:project:edit","hub:project:metrics","hub:project:settings"],c=Object.assign(Object.assign({},s.N),{properties:Object.assign(Object.assign({},s.N.properties),{_groups:{type:"array",items:{type:"string"}},status:{type:"string",default:o.Mz.notStarted,enum:Object.keys(o.Mz)},_metric:{type:"object",required:["cardTitle"],properties:n.MetricSchema.properties}}),allOf:[i.dM,i.No,i.eS,i.Jw]})},33476:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(853719);function i(e,t){return(0,n.g)(e,t)}},888554:(e,t,r)=>{"use strict";r.d(t,{F:()=>p});var n=r(560133),i=r(398195),s=r(986326),o=r(33476),a=r(471934),c=r(719271),u=r(507707),l=r(16449),d=r(972551);function p(e,t,r){var p,h;let m;return r.authentication&&(m=r.authentication.token),(t=(0,a.k)(e.item,t)).thumbnailUrl=(0,n.S)(e.item,r,m),t.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:null===(p=e.data.view)||void 0===p?void 0:p.featuredImageUrl}),t.catalog=(0,c.c)(t.catalog||{}),t.features=(0,i.U)((null===(h=e.data.settings)||void 0===h?void 0:h.features)||{},s.g),t.links=(0,o.E)(e.item,r),function(e){if(e.schemaVersion===l.Rq)return e;let t=function(e){if(e.schemaVersion>=1.1)return e;
11const t=(0,u.kI)(e),{slug:r,orgUrlKey:n,typeKeywords:i}=(0,d.P)(t.slug||"",t.orgUrlKey||"",t.typeKeywords||[]);return t.slug=r,t.orgUrlKey=n,t.typeKeywords=i,t.schemaVersion=1.1,t}(e);return t=function(e){if(e.schemaVersion>=1.2)return e;const t=(0,u.kI)(e);return t.view&&t.view.timeline&&t.view.timeline.stages&&Array.isArray(t.view.timeline.stages)&&(t.view.timeline.stages=t.view.timeline.stages.filter((e=>!!e.title))),t.schemaVersion=1.2,t}(t),t}(t)}},31148:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e}},16449:(e,t,r)=>{"use strict";r.d(t,{O7:()=>a,Rq:()=>o,rd:()=>c});var n=r(321932),i=r(505681);const s="Hub Project",o=1.2,a={catalog:{schemaVersion:0},name:"",permissions:[],schemaVersion:o,status:i.Mz.notStarted,tags:[],typeKeywords:[s],view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]},features:n.T},c={item:{type:s,title:"",description:"",snippet:"",tags:[],typeKeywords:[s],properties:{slug:"",schemaVersion:o}},data:{display:"about",permissions:[],catalog:{schemaVersion:0},status:i.Mz.notStarted,view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]}}}},619333:(e,t,r)=>{"use strict";r.d(t,{$:()=>m,deleteProject:()=>g,t:()=>f});var n=r(719339),i=r(427033),s=r(170209),o=r(572269),a=r(16449),c=r(888554),u=r(31148),l=r(507707),d=r(822409),p=r(964858),h=r(393960);async function m(e,t){const r=Object.assign(Object.assign({},a.O7),e);r.orgUrlKey=r.orgUrlKey.toLowerCase(),r.slug||(r.slug=(0,i.fU)(r.name,r.orgUrlKey)),await(0,h.E)(r,t),r.typeKeywords=(0,p.o)(r.typeKeywords,r.status),r.typeKeywords=(0,d.Wb)(r.typeKeywords,r.isDiscussable);const s=new o.c7((0,u.s)());let m=s.entityToStore(r,(0,l.kI)(a.rd));m=await(0,n.NY)(m,t);let f=s.storeToEntity(m,{});return f=(0,c.F)(m,f,t),f}async function f(e,t){await(0,h.E)(e,t),e.typeKeywords=(0,p.o)(e.typeKeywords,e.status),e.typeKeywords=(0,d.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,n.PD)(e.id,t),i=new o.c7((0,u.s)()),s=i.entityToStore(e,r),a=await(0,n.QB)(s,t);let l=i.storeToEntity(a,e);return l=(0,c.F)(r,l,t),l}async function g(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,s.cl)(r)}},112987:(e,t,r)=>{"use strict";r.d(t,{D6:()=>w,GG:()=>b,j3:()=>v});var n=r(170209),i=r(704059),s=r(572269),o=r(427033),a=r(248849),c=r(719339),u=r(348157),l=r(526462),d=r(40180),p=r(888554),h=r(31148),m=r(507707),f=r(264263),g=r(33476),y=r(371740);async function b(e,t){let r;return r=(0,l.k)(e)?(0,n.rV)(e,t):(0,o.QR)(e,t),r.then((e=>e?v(e,t):null))}async function v(e,t){const r=await(0,c.UO)(e,t),n=new s.c7((0,h.s)()).storeToEntity(r,{});return(0,p.F)(r,n,t)}async function w(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,y.jA)(e),rawResult:e},s=(t=[...t].filter(m.Tw)).map(u.u),o=(0,d.e)("enrichment",s).filter(m.Tw);let c={};
11return o.length&&(c=await(0,a.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,f.W)(c,e.path)})),n.links=(0,g.E)(e,r),n}},443087:(e,t,r)=>{"use strict";r.d(t,{$L:()=>i.$,D6:()=>s.D6,GG:()=>s.GG,M6:()=>n.M,MP:()=>o.M,So:()=>o.S,j3:()=>s.j3,th:()=>i.deleteProject,ty:()=>i.t});var n=r(340116),i=r(619333),s=r(112987),o=r(805945)},805945:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,S:()=>o});var n=r(704059),i=r(371740),s=r(878187);const o=(e,t,r)=>{const{actionLinks:n=[],baseUrl:i="",locale:o="en-US",target:a="self"}=r||{},u=(0,s.m)(e,t,a,i);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:n,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:i="en-US",target:o="self"}=t||{},a=(0,s.D)(e,o,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,i)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,s;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(s=e.categories)||void 0===s?void 0:s.length)?[{i18nKey:"categories",value:(0,i.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,n._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},313621:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,m:()=>s});var n=r(641675),i=r(5828);class s extends Error{constructor(e,t,r){super(e),this.status=r,this.url=t}}function o(e,t){const r=Object.assign({httpMethod:"GET"},t),o=r.fetch||fetch,a=Object.assign({"Content-Type":"application/json"},r.headers);let c,u;"GET"===r.httpMethod?c=r.params:u=JSON.stringify(r.params);const l=(0,i.Q)({host:(0,n.g)(r),path:`/api/v3/${e}`.replace(/\/\//g,"/"),query:c});return o(l,{method:r.httpMethod,headers:a,body:u}).then((e=>{if(e.ok)return e.json();throw new s(e.statusText,l,e.status)}))}},102452:(e,t,r)=>{"use strict";function n(e,t){let r=e;return-1===e.indexOf("token")&&e.indexOf(t.authentication.portal)>-1&&(r=`${e}?token=${t.authentication.token}`),r}r.d(t,{o:()=>n})},178240:(e,t,r)=>{"use strict";r.d(t,{l:()=>i});var n=r(737720);function i(e,t){let r=e.assets||e.resources||[];if(e.bundleItemId){const i=`${(0,n.i)(t.portalSelf)}/content/items/${e.bundleItemId}`,s=e.itemId;r=r.map((e=>({name:e.name,type:e.type||"resource",url:`${i}/resources/${s}-${e.name}`})))}return r}},374940:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(170209);async function i(e,t,r){return(0,n.C)(e,r).then((e=>!!e.resources.find((e=>e.resource===t))))}},334330:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(170209),i=r(548518);function s(e){return(0,i.o)(e.url).then((t=>(0,n.zJ)({id:e.id,owner:e.owner,name:e.fileName,resource:t,authentication:e.authentication})))}},360255:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var n=r(548518),i=r(954108);function s(e){return(0,n.o)(e.url).then((t=>(0,i.$G)({item:{id:e.id,owner:e.owner},params:{fileName:e.fileName,thumbnail:t},authentication:e.authentication}).catch((e=>Promise.resolve())))).catch((e=>Promise.resolve()))}},548518:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(348753);async function i(e,t={}){return t.credentials||(t.credentials="same-origin"),(0,n.jH)(e)&&await(0,n.jz)(e),fetch(e,t).then((e=>e.blob()))}},858252:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(737720),i=r(560133),s=r(170209);function o(e,t){const r=`${(0,n.i)(t.portalSelf)}/content/items/${e.id}`,o=(0,i.S)(e,t),a=[];return o&&a.push({name:e.thumbnail,url:o,type:"thumbnail"}),(0,s.C)(e.id,t).then((e=>{const t=e.resources.map((e=>({name:e.resource,type:"resource",url:`${r}/resources/${e.resource}`})));return a.concat(t)}))}},560133:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(6194);function i(e,t,r){if(!e||!e.thumbnail)return null;let{token:i,width:s}=r||{};i||"string"!=typeof r||(i=r);const o=(0,n.p)(e,t,i),[a,c]=o.split("?"),u=new URLSearchParams(c);u.delete("f"),s&&u.append("w",String(s));const l=u.toString(),d=`${a}/info/${e.thumbnail}`;return l?`${d}?${l}`:d}},248802:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(153105);function i(e,t){let r=null;return(null==e?void 0:e.thumbnail)&&(r=`${(0,n.a)(e)}/sharing/rest/portals/${e.id}/resources/${e.thumbnail}`,t&&"public"!==e.access&&(r=`${r}?token=${t}`)),r}},489218:(e,t,r)=>{"use strict";r.d(t,{oA:()=>n.o,lK:()=>m.l,lD:()=>s,of:()=>O.o,gE:()=>o.g,dT:()=>a.d,oX:()=>c.o,tF:()=>u.t,Sg:()=>l.S,SF:()=>d.S,cs:()=>T.c,OA:()=>f.O,ql:()=>A.q,IS:()=>p.I,xO:()=>h.x,Ej:()=>C.E,mQ:()=>I});var n=r(102452),i=r(737720);function s(e,t){let r=[];if(e.resources&&e.bundleItemId){const n=`${(0,i.i)(t.portalSelf)}/content/items/${e.bundleItemId}`,s=e.itemId;r=e.resources.map((e=>({name:e,type:"resource",url:`${n}/resources/${s}-${e}`})))}return r}var o=r(334330),a=r(360255),c=r(548518),u=r(858252),l=r(560133),d=r(248802),p=r(553008),h=r(843350),m=r(178240),f=r(560486),g=r(505681),y=r(554799),b=r(348753);const v=/(feature)server(\/|\/(\d+))?$/i;function w(e){let t;
11try{const r=new URL(e);t="/"!==r.pathname?r.pathname.split("/").pop():r.hostname}catch(e){throw new Error("Error getting file name from data url")}return t}function S(e,t){return{title:t.name,description:t.description,extent:t.extent,url:e}}function E(e,t){const r=t.serviceDescription||t.description,n=function(e){return/\/services\/(.+)\/(feature|map|image)server/i.exec(e)[1]}(e);return{title:n,description:r,extent:t.fullExtent||t.initialExtent,url:e}}var T=r(570582);async function I(e){if(!function(e){try{return!!new URL(e)}catch(e){return y.Y.error("Error parsing URL"),!1}}(e))return{pass:!1,error:"invalidFormat"};const t=function(e){return v.test(e)}(e);if((0,T.c)(e)&&!t)return{pass:!1,error:"invalidFormat"};let r,n,i={};try{if(i=t?await async function(e){const t=new URL(e);t.searchParams.set("f","json"),(0,b.jH)(e)&&await(0,b.jz)(e);const r=await fetch(t.href);if(!r.ok)return{ok:!1};const n=await r.json();if(n.error)return{ok:!1};const i=function(e){const t=v.exec(e);return t&&!!t[3]}(e)?S:E;return{ok:!0,item:i(e,n)}}(e):await async function(e){(0,b.jH)(e)&&await(0,b.jz)(e);const t=await fetch(e,{method:"HEAD"});return{ok:t.ok,headers:t.headers}}(e),!i.ok)return{pass:!1,error:"invalidUrl"}}catch(e){y.Y.error("error requesting url")}var s;return n=i.item?i.item:{title:w(e),url:e},i.headers&&(r=function(e){let t,r=e.get("Content-Type");if(r)return r=r.split(";").shift(),"text/csv"===r?t=g.qG.CSV:"application/vnd.ms-excel"===r||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===r?t=g.qG["Microsoft Excel"]:"application/pdf"===r?t=g.qG.PDF:"image/jpeg"===r||"image/jpg"===r||"image/png"===r?t=g.qG.Image:"application/geo+json"===r&&(t=g.qG.GeoJson),t}(i.headers)),t?r=g.qG["Feature Service"]:r||(r=function(e){const t=e.toLowerCase().split(".").pop();let r;return"csv"===t?r=g.qG.CSV:"xls"===t||"xlsx"===t?r=g.qG["Microsoft Excel"]:"pdf"===t?r=g.qG.PDF:"jpeg"===t||"jpg"===t||"png"===t?r=g.qG.Image:"geojson"===t&&(r=g.qG.GeoJson),r}(e)),r&&(n.type=r),n.type&&(s=n.type,!["Feature Service","Document Link"].includes(s))&&(n.dataUrl=n.url),{pass:!0,type:r,item:n}}var C=r(254962),A=r(702060),O=r(374940)},570582:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});const n=/\/[a-zA-Z]+server(\/|\/(\d+))?$/i;function i(e){return n.test(e)}},560486:(e,t,r)=>{"use strict";function n(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}r.d(t,{O:()=>n})},702060:(e,t,r)=>{"use strict";r.d(t,{q:()=>s});var n=r(170209),i=r(841741);async function s(e,t,r,s){try{const o=await(0,n.ug)(Object.assign({id:e,resource:t,owner:r},s));if(!o.success)throw new i.Z("Remove Item Resource","Unknown error removing resource.");return o}catch(e){throw e instanceof Error?new i.Z("Remove Item Resource",e.message,e):new i.Z("Remove Item Resource","Unknown error removing resource.")}}},553008:(e,t,r)=>{"use strict";function n(e,t="application/octet-stream"){if("undefined"!=typeof Blob){const r=[];for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);const n=new Uint8Array(r);return new Blob([n],{type:t})}throw new Error("stringToBlob is not currently supported on Node")}r.d(t,{I:()=>n})},843350:(e,t,r)=>{"use strict";r.d(t,{x:()=>o});var n=r(334330),i=r(360255),s=r(102452);function o(e,t,r){if(Array.isArray(t)){const o=t.reduce(((t,o)=>{if(o.url){const a={id:e.item.id,owner:e.item.owner,fileName:o.name,url:(0,s.o)(o.url,r),authentication:r.authentication};"thumbnail"===o.type?t.push((0,i.d)(a)):t.push((0,n.g)(a))}return t}),[]);return Promise.all(o)}return Promise.resolve([])}},254962:(e,t,r)=>{"use strict";r.d(t,{E:()=>u});var n=r(170209),i=r(841741),s=r(374940),o=r(560486),a=r(553008),c=r(737720);async function u(e,t,r,u,l,d=""){try{const p=u.split(".").pop(),h=await(0,s.o)(e,u,l)?n.zy:n.zJ;let m=r;if("json"===p&&(m=(0,o.O)(r)),"txt"===p&&(m=(0,a.I)(r)),!(await h(Object.assign({id:e,owner:t,resource:m,name:u,prefix:d},l))).success)throw new i.Z("Add Item Resource",`Error adding resource ${u} to item ${e}.`);return`${(0,c.i)(l.portal)}/content/items/${e}/resources/${d?`${d}/`:""}${u}`}catch(t){throw t instanceof Error?new i.Z("Add Item Resource",t.message,t):new i.Z("Add Item Resource",`Error adding resource ${u} to item ${e}.`)}}},88903:(e,t,r)=>{"use strict";r.d(t,{$G:()=>n.$G,fC:()=>n.fC,wd:()=>n.wd});var n=r(954108)},954108:(e,t,r)=>{"use strict";r.d(t,{wd:()=>a,fC:()=>s,$G:()=>o});var n=r(170209);function i(e){return e.params=Object.assign(Object.assign({},e.params),function(e){const t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"
11===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}(e.item)),e}function s(...e){return(0,n.fC)(i(e[0]))}function o(...e){return(0,n.$G)(i(e[0]))}function a(...e){return(0,n.wd)(i(e[0]))}},617665:(e,t,r)=>{"use strict";r.d(t,{g:()=>S});var n=r(127981),i=r(47957),s=r(841741),o=r(507707),a=r(40180),c=r(170209),u=r(877440),l=r(264263),d=r(29258),p=r(665688),h=r(526462),m=r(480367),f=r(3861),g=r(251745),y=r(178491),b=r(619943),v=r(185744),w=r(719271);class S{constructor(e,t){this._containsCache={},this._catalog=e,this._context=t}static async init(e,t,r){t||(t=(await n.SF.create()).context);const i=await async function(e,t,r){let n;if(0===e.indexOf("http")){let i=e;i=(0,p.G)(i),i.includes("#")||(i=i.split("/")[0]);const s=await(0,f.F)(i,t.hubRequestOptions),o=await(0,d.IN)(s.siteId,t.hubRequestOptions);n=(0,l.W)(o,(null==r?void 0:r.prop)||"catalog")}else if((0,h.k)(e)){let i;if(null==r?void 0:r.hubEntityType)i=r.hubEntityType;else{const r=await(0,c.rV)(e,t.requestOptions);i=(0,g.T)(r.type)}const s=await(0,y.z)(i,e,t);n=(0,l.W)(s,(null==r?void 0:r.prop)||"catalog")}else{if(!(0,m.l)(e))throw new s.Z("Catalog.init","Identifier must be a url, item or event id");{const i=await(0,u.d)(e,t.hubRequestOptions);n=(0,l.W)(i,(null==r?void 0:r.prop)||"catalog")}}return n}(e,t,r);if(i)return new S(i,t);throw new s.Z("Catalog.fetch","No catalog found for the entity")}static fromJson(e,t){const r=(0,w.c)(e);return new S(r,t)}toJson(){return(0,o.kI)(this._catalog)}get schemaVersion(){return this._catalog.schemaVersion}get title(){return this._catalog.title}set title(e){this._catalog.title=e}get scopes(){return this._catalog.scopes||{}}get availableScopes(){return Object.keys(this.scopes)}get displayConfig(){return this._catalog.displayConfig}getScope(e){var t;return null===(t=this._catalog.scopes)||void 0===t?void 0:t[e]}setScope(e,t){this._catalog.scopes[e]=t}get collections(){return this._catalog.collections||[]}get collectionNames(){return(0,a.e)("key",this.collections)}getCollection(e){const t=this.getCollectionJson(e);return b.F.fromJson(t,this._context)}addCollection(e){var t;(null===(t=this._catalog.collections)||void 0===t?void 0:t.length)?this._catalog.collections.push(e):this._catalog.collections=[e]}getCollectionJson(e){const t=this.collections.find((t=>t.key===e));if(t){const e=(0,o.kI)(t),r=this.getScope(e.scope.targetEntity);return(null==r?void 0:r.filters)&&(e.scope.filters=[...e.scope.filters||[],...r.filters]),e}throw new s.Z("getCollectionJson",`Collection "${e}" is not present in the Catalog`)}getCustomCollection(e,t){const r=this.getCustomCollectionJson(e,t);return b.F.fromJson(r,this._context)}getCustomCollectionJson(e,t){const r=this.getScope(e);return{key:`${e}-custom`,label:`${e} Custom`,targetEntity:e,scope:{targetEntity:e,filters:[...(null==r?void 0:r.filters)||[],...t]}}}async searchItems(e,t){if(t||(t=this.getDefaultSearchOptions("item")),this.getScope("item"))return t.targetEntity="item",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for items",data:{scope:"item"}}],Promise.resolve(e)}}async contains(e,t){const r=Date.now();if(this._containsCache[e]){const t=(0,o.kI)(this._containsCache[e]);return t.duration=Date.now()-r,Promise.resolve(t)}{const n=await(0,i.r)(e,this._catalog,this._context,t);return this._containsCache[e]=n,n.duration=Date.now()-r,n}}async searchGroups(e,t){if(t||(t=this.getDefaultSearchOptions("group")),this.get
11Scope("group"))return t.targetEntity="group",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for groups",data:{scope:"group"}}],Promise.resolve(e)}}async searchUsers(e,t={}){if(this.getScope("user"))return t.targetEntity="user",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for user",data:{scope:"user"}}],Promise.resolve(e)}}async searchCollections(e,t={}){let r,n=!0;"string"==typeof e?(n=!1,r={targetEntity:"item",filters:[{predicates:[{term:e}]}]}):r=e;const i=[],s=this.collectionNames.reduce(((e,s)=>{const o=this.getCollection(s);return n?o.targetEntity===r.targetEntity&&(i.push(s),e.push(o.search(r,t))):(i.push(s),r.targetEntity=o.targetEntity,e.push(o.search(r,t))),e}),[]),o=await Promise.all(s),a={};for(let e=0;e<i.length;e++)a[i[e]]=o[e];return a}async searchScopes(e,t={},r){let n;n="string"==typeof e?{targetEntity:"item",filters:[{predicates:[{term:e}]}]}:e;const i=[],s=this.availableScopes.reduce(((e,s)=>{if(!r||r.includes(s)){i.push(s);const r=(0,o.kI)(n),a=(0,o.kI)(t);r.targetEntity=s,a.targetEntity=s,e.push(this.search(r,a))}return e}),[]),a=await Promise.all(s),c={};for(let e=0;e<i.length;e++)c[i[e]]=a[e];return c}async search(e,t){let r,n=t.targetEntity;"string"==typeof e?r={targetEntity:n,filters:[{predicates:[{term:e}]}]}:(n=e.targetEntity,r=(0,o.kI)(e));const i=this.getScope(n);i&&(r.filters=[...r.filters,...i.filters]);const s=(0,o.kI)(t);return delete s.authentication,s.requestOptions=this._context.hubRequestOptions,(0,v.B)(r,s)}getEmptyResult(){return{results:[],total:0,hasNext:!1,next:null}}getDefaultSearchOptions(e){return{targetEntity:e,num:10,start:1,requestOptions:this._context.hubRequestOptions}}}},619943:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(185744),i=r(507707);class s{constructor(e,t){this._collection=e,this._context=t}static fromJson(e,t){return new s(e,t)}toJson(){return(0,i.kI)(this._collection)}get label(){return this._collection.label}get key(){return this._collection.key}get include(){return this._collection.include||[]}get scope(){return this._collection.scope}get sortField(){return this._collection.sortField||"title"}get sortDirection(){return this._collection.sortDirection||"asc"}get targetEntity(){return this._collection.targetEntity}async search(e,t={}){let r;r="string"==typeof e?{targetEntity:this._collection.targetEntity,filters:[{predicates:[{term:e}]}]}:(0,i.kI)(e),r.filters=[...r.filters,...this.scope.filters];const s=(0,i.kI)(t);return s.requestOptions=this._context.hubRequestOptions,s.sortField=t.sortField||this.sortField,s.sortOrder=t.sortOrder||this.sortDirection,s.include=t.include||this.include,(0,n.B)(r,s)}}},437450:(e,t,r)=>{"use strict";function n(e,t,r,n,i,s){return{schemaVersion:1,title:s||`{{${e}catalog.${t}:translate}}`,scopes:{[i]:{targetEntity:i,filters:r}},collections:n}}r.d(t,{Y:()=>n})},80568:(e,t,r)=>{"use strict";r.d(t,{D:()=>o});var n=r(348753),i=r(507707),s=r(264263);function o(e,t,r,o){const a=(0,i.kI)(e);return e.authentication&&(a.authentication=n.$l.deserialize(e.authentication.serialize())),(0,s.W)(e,"requestOptions.authentication")&&(a.requestOptions.authentication=n.$l.deserialize(e.requestOptions.authentication.serialize())),a.start=t>-1?t:r+1,()=>o(a)}},984370:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(568893);function i(e,t){let r=null;const i=t.filter((t=>t.predicates.find((t=>!(0,n.B)(t[e])))));if(i.length>1)throw new Error(`Only 1 IFilter can have a '${e}' predicate but ${i.length} were detected`);if(i.length){const t=i[0],s=t.predicates.filter((t=>!(0,n.B)(t[e])));if(s.length>1)throw new Error(`Only 1 '${e}' predicate is allowed but ${s.length} were detected`);if("AND"!==t.operation&&t.predicates.length>1)throw new Error(`'${e}' predicates cannot be OR'd to other predicates`);const o=s[0],a=o[e];if("string"!=typeof a&&"boolean"!=typeof a)throw new Error(`'${e}' predicate must be a string or boolean primitive. string[] and IMatchOptions are not allowed.`);r=o}return r}},568893:(e,t,r)=>{"use strict";function n(e){return null==e||""===e}r.d(t,{B:()=>n})},832010:(e,t,r)=>{"use strict";r.d(t,{AI:()=>l,ff:()=>u,qj:()=>a});var n=r(94684),i=r(264263),s=r(507707),o=r(589585);const a=["created","modified","lastlogin"],c=["bbox","categoriesAsParam","categoryFilter","filterType","isopendata","isviewonly","memberType","name","searchUserAccess","searchUserName","term","openData"],u=[...a,...c];function l(e){const t={};return Object.entries(e).forEach((([r,l])=>{if(u.includes(r)||(0,n.t)(r,(0,o.N0)(l),t),a.includes(r)){const a=(0,s.kI)((0,i.W)(e,r));"relative-date"===(0,i.W)(e,`${r}.type`)?(0,n.t)(r,(0,o.SN)(a),t):(0,n.t)(r,a,t)}c.includes(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(0,n.t)(r,l,t)})),t}},568008:(e,t,r)=>{"use strict";function n(e){let t="item";return["group","event","user","channel","organization"].includes(e.toLowerCase())&&(t=e.toLocaleLowerCase()),"group member"===e.toLowerCase()&&(t="groupMember"),t}r.d(t,{x:()=>n})},73728:(e,t,r)=>{"use strict";r.d(t,{Zx:()=>i});var n=r(568893);function i(e){return e.filters.map(s).filter(u).join(" AND ")}function s(e){const t=e.operation||"OR";return`(${e.predicates.map(o).filter(u).join(` ${t} `)})`}function o(e){return`(${Object.entries(e).filter((([e,t])=>"term"!==e&&"bbox"!==e&&"fields"!==e&&"flatten"!==e&&!(0,n.B)(t))).reduce(((e,[t,r])=>{let n;var i;return"string"==typeof r||"boolean"==typeof r?n=a(t,r):Array.isArray(r)?n=function(e,t){return`${e} IN (${t.map(c).join(", ")})`}(t,r):(i=r,n=Number.isInteger(i.from)&&Number.isInteger(i.to)?function(e,t){return`${e} BETWEEN ${t.from} AND ${t.to}`}(t,r):function(e,t){const r=function(e,t){let r;return Array.isArray(t)?r=`${e} IN (${t.map(c).join(", ")})`:t&&(r=a(e,t)),r}(e,t.any),n=function(e,t){let r;return Array.isArray(t)?r=t.map((t=>a(e,t))).join(" AND "):t&&(r=a(e,t)),r}(e,t.all),i=function(e,t){let r;return t&&(r=`${e} NOT IN (${(Array.isArray(t)?t:[t]).map(c).join(", ")})`),r}(e,t.not);return[r,n,i].filter((e=>!!e)).join(" AND ")}(t,r)),e.push(n),e}),[]).join(" AND ")})`}function a(e,t){return`${e}=${"string"==typeof t?c(t):t}`}function c(e){return/\s/.test(e)?`'${e}'`:e}function u(e){return"()"!==e}},481900:(e,t,r)=>{"use strict";
11function n(e,t){const r=new URL(t.requestOptions.hubApiUrl).hostname;return"discussionPost"===e.targetEntity?`https://${r}/api/search/v2/collections/discussion-post`:`https://${r}/api/search/v1/collections/all`}r.d(t,{e:()=>n})},22451:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(313621),i=r(507707),s=r(568893);async function o(e,t,r){const o=e+function(e){const t=Object.entries(e).filter((([e,t])=>!(0,s.B)(t))).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return t&&`?${t}`}((0,i.kI)(t)),a=r.requestOptions.fetch||fetch,c=await a(o,{method:"GET"});if(!c.ok)throw new n.m(c.statusText,o,c.status);return c.json()}},884446:(e,t,r)=>{"use strict";function n(e,t,r,n){const i=e.links.find((e=>"next"===e.rel));let s=()=>null;return i&&(s=()=>{const e=+new URL(i.href).searchParams.get("startindex"),s=Object.assign(Object.assign({},n),{start:e});return u(t,r,s)}),s}r.d(t,{S:()=>u});var i=r(356013),s=r(264263),o=r(984370),a=r(73728),c=r(22451);async function u(e,t,r){const u=function(e,t){const r=(0,a.Zx)(e),n=(0,s.W)(t,"requestOptions.authentication.token"),i=t.num,c=t.start,u=function(e){const t=(0,o.$)("term",e.filters);return null==t?void 0:t.term}(e),l=function(e){const{sortField:t,sortOrder:r}=e;let n;return t&&(n="desc"===r?`-properties.${t}`:`properties.${t}`),n}(t),d=function(e){const t=(0,o.$)("bbox",e.filters);return null==t?void 0:t.bbox}(e),p=function(e){const t=(0,o.$)("flatten",e.filters);return null==t?void 0:t.flatten}(e),h=function(e){const t=(0,o.$)("fields",e.filters);return null==t?void 0:t.fields}(e);return{filter:r,token:n,limit:i,startindex:c,q:u,sortBy:l,bbox:d,flatten:p,fields:h}}(t,r);return async function(e,t,r,s){return"discussionPost"===r.targetEntity?async function(e,t,r,i){const s=await Promise.all(e.features.map((e=>async function(e){return{id:e.id,name:e.properties.title,summary:e.properties.body,createdDate:new Date(e.properties.createdAt),createdDateSource:"properties.createdAt",updatedDate:new Date(e.properties.updatedAt),updatedDateSource:"properties.updatedAt",type:"post",owner:e.properties.creator,location:null,created:new Date(e.properties.createdAt),modified:new Date(e.properties.updatedAt),title:e.properties.title,rawResult:e,access:null,family:null}}(e)))),o=n(e,t,r,i),a=e.links.find((e=>"next"===e.rel));return{total:e.numberMatched,results:s,hasNext:!!a,next:o}}(e,t,r,s):async function(e,t,r,s){const o=await Promise.all(e.features.map((e=>async function(e,t,r){const n=e.properties,s=await(0,i.Qm)(n,t,r);return s.source=e.properties.source,s.license=e.properties.license,s}(e,s.include,s.requestOptions)))),a=n(e,t,r,s),c=e.links.find((e=>"next"===e.rel));return{total:e.numberMatched,results:o,hasNext:!!c,next:a}}(e,t,r,s)}(await(0,c.d)(e,u,r),e,t,r)}},348157:(e,t,r)=>{"use strict";function n(e){const t=e.split(" AS "),r=t[0],n=t[1]||r.split(".").reverse()[0];return{enrichment:r.split(".")[0],path:r,prop:n}}r.d(t,{u:()=>n})},356013:(e,t,r)=>{"use strict";r.d(t,{qI:()=>O,X3:()=>S,Qm:()=>C,XZ:()=>v,hw:()=>w});var n=r(170209),i=r(655790),s=r(272997),o=r(112987),a=r(29258),c=r(643331),u=r(874761),l=r(505681),d=r(589585),p=r(80568);function h(e){var t;return(null===(t=e.aggregations)||void 0===t?void 0:t.counts)?e.aggregations.counts.map((e=>({mode:"terms",field:e.fieldName,values:e.fieldValues}))):[]}var m=r(832010),f=r(841741),g=r(605376),y=r(507707),b=r(704059);async function v(e,t){return I(E(t,(0,d.Fn)(e)))}function w(e,t){return T(E(t,e))}function S(e){const t=(0,y.kI)(e);return t.filters=t.filters.map((e=>(e.predicates=e.predicates.map(m.AI),e))),t}function E(e,t){var r;if(!e.requestOptions)throw new f.Z("portalSearchItems","options.requestOptions is required.");const n=(0,d.Bq)(t),s=(0,i.O)(n);return["num","sortField","sortOrder","include","start","httpMethod","requestOptions"].forEach((t=>{e.hasOwnProperty(t)&&(s[t]=e[t])})),e.requestOptions.authentication?s.authentication=e.requestOptions.authentication:s.portal=e.requestOptions.portal,(null===(r=e.aggFields)||void 0===r?void 0:r.length)&&(s.countFields=e.aggFields.join(","),s.countSize=e.aggLimit||10),s}async function T(e){const t=await(0,n.KT)(e),r=h(t);return{total:t.total,results:t.results,aggregations:r,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,T),executedQuerySize:(0,d.tS)(e.q)}}async function I(e){const t=await(0,n.KT)(e),r=await Promise.all(t.results.map((t=>C(t,e.include,e.requestOptions)))),i=h(t);return{total:t.total,results:r,aggregations:i,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,I),executedQuerySize:(0,d.tS)(e.q)}}async function C(e,t=[],r){let n=g.v;switch(e.type){case"Hub Site Application":case"Site Application":n=a.nK;break;case"Hub Page":case"Site Page":n=s.Hy;break;case"Hub Project":n=o.D6;break;case"Hub Initiative":n=c.J5;break;case"Solution":n=u.Gb;break;case"Web Mapping Application":e.typeKeywords.includes("hubSite")&&(n=a.nK)}return n(e,t,r)}const A={$application:[{type:{any:["Web Mapping Application","Application","Insights","Web Experience"],not:["Insights Theme","Insights Model"]},typekeywords:{not:["hubSite","Story Map"]}},{type:"Web Mapping Experience",typekeywords:"EXB Experience"}],$dashboard:[{type:{any:["Dashboard"],not:["Operation View"]},typekeywords:{not:["Extension","ArcGIS Operation View"]}}],$dataset:[{type:{any:["Scene Service","Feature Collection","Route Layer","Layer","
11Explorer Layer","Tile Package","Vector Tile Package","Scene Package","Layer Package","Feature Service","Stream Service","Map Service","Vector Tile Service","Image Service","WMS","WFS","WMTS","KML","KML Collection","Globe Service","CSV","Shapefile","GeoJson","Service Definition","File Geodatabase","CAD Drawing","Relational Database Connection"],not:["Web Mapping Application","Geodata Service"]}},{typekeywords:["OGC","Geodata Service"]}],$document:[{type:["PDF","Microsoft Excel","Microsoft Word","Microsoft Powerpoint","iWork Keynote","iWork Pages","iWork Numbers","Visio Document","Document Link"]}],$initiative:[{type:"Hub Initiative",typekeywords:"hubInitiativeV2"}],$experience:[{type:"Web Experience"}],$feedback:[{type:"Form"}],$page:[{typekeywords:"hubPage"}],$site:[{type:["Hub Site Application","Site Application"]}],$storymap:[{type:"Storymap"},{type:"Web Mapping Application",typekeywords:"Story Map"}],$template:[{type:["Web Mapping Application","Hub Initiative","Hub Initiative Template","Solution"],typekeywords:{any:["hubInitiativeTemplate","hubSolutionTemplate","Template"],not:"Deployed"}}],$webmap:[{type:{any:["Web Map","Web Scene"],not:"Web Mapping Application"}}]};function O(e){const t=(0,y.kI)(e);return t.filters=t.filters.map((e=>{let t=!1;return e.predicates=e.predicates.reduce(((e,r)=>{if(function(e){let t=!1;return"string"==typeof e&&(t=e in A),t}(r.type)){const i=(n=r.type,A[n]);e=[...e,...i],t=!0}else r.type&&"string"!=typeof r.type&&!Array.isArray(r.type)?(Object.keys(r.type).forEach((e=>{const t=r.type[e];Array.isArray(t)&&(r.type[e]=t.reduce(((e,t)=>{if(function(e){let t=!1;return e&&"$"===e.charAt(0)&&l.CK.includes(e.slice(1))&&(t=!0),t}(t)){const r=t.slice(1),n=(0,b.P)(r);e=[...e,...n]}else e.push(t);return e}),[]))})),e.push(r)):e.push(r);var n;return e}),[]),t&&(e.operation="OR"),e})),t}},958157:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=e=>{const t=(e=e.filter((e=>e)))[0].targetEntity;if(e.some((e=>e.targetEntity!==t)))throw new Error("Cannot combine queries for different entity types");const r=e.reduce(((e,t)=>[...e,...t.filters]),[]);return{targetEntity:t,filters:r}}},487600:(e,t,r)=>{"use strict";r.d(t,{C:()=>v});var n=r(507707),i=r(832010),s=r(170209),o=r(518944),a=r(264263);async function c(e,t,r){
12throw new Error("Not implemented")}async function u(e,t,r){throw new Error("Not implemented")}async function l(e,t,r){const i=Object.keys(e)[0],c=e[i],u={predicate:(0,n.kI)(e),matched:!0,reasons:[]},l={};if("group"===i){const e=await(0,s.tX)(t.id,r);l.groups=[...(0,o.t)(e,"admin",[]),...(0,o.t)(e,"member",[]),...(0,o.t)(e,"other",[])].map((e=>({id:e.id,title:e.title}))),t.group=l.groups.map((e=>e.id))}const m=(0,a.W)(t,i);if(m){const e={any:d,all:p,not:h};Object.keys(e).forEach((t=>{const r=(0,a.W)(c,t);if(r){const n=(0,a.W)(e,t)(i,r,m);n.meta=l,u.reasons.push(n)}})),u.matched=u.reasons.every((e=>e.matched))}else u.matched=!1,u.reasons.push({attribute:i,matched:!1,message:`Property ${i} not present on search result, cannot provide explanation`});return Promise.resolve(u)}function d(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"IN",matched:!1,requirement:m(t).join(","),message:"No match"},{matches:i}=f(m(t),m(r));return n.matched=i.length>0,n.matched?n.message=`Value(s) ${n.values} contained at least one of value from [${n.requirement}]`:n.message=`Value(s) ${n.values} did not contain any of value from [${n.requirement}]`,n}function p(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"ALL",requirement:m(t).join(","),matched:!1,message:"No match"},{options:i,matches:s}=f(m(t),m(r));return n.matched=s.length===i.length,n.matched?n.message=`Value(s) ${n.values} contained all values from [${n.requirement}]`:n.message=`Value(s) ${n.values} did not contain all values from [${n.requirement}]`,n}function h(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"NOT_IN",requirement:m(t).join(","),matched:!1,message:"No match"},{matches:i}=f(m(t),m(r));return n.matched=0===i.length,n.matched?n.message=`Value(s) ${n.values} is not contained in [${n.requirement}]`:n.message=`Value(s) ${n.values} is contained in [${n.requirement}]`,n}function m(e){return Array.isArray(e)?e:[e]}function f(e,t){const r={options:e,values:t,matches:[]};return r.matches=e.reduce(((e,r)=>(t.includes(r)&&e.push(r),e)),[]),r}async function g(e,t,r){const n=Object.keys(e)[0];let s=l;return i.ff.includes(n)&&(s=i.qj.includes(n)?c:u),s(e,t,r)}async function y(e,t,r){const i={filter:(0,n.kI)(e),matched:!1,reasons:[]};for(const n of e.predicates){const e=await g(n,t,r);i.reasons.push(e)}return"OR"===e.operation?i.matched=i.reasons.some((e=>e.matched)):i.matched=i.reasons.every((e=>e.matched)),i}var b=r(589585);async function v(e,t,r){if("item"!==t.targetEntity)throw new Error('explainQueryResult: Only queries with targetEntity: "item" are supported');const i=(0,b.Bq)(t),s=[];for(const t of i.filters){const n=await y(t,e,r);s.push(n)}const o=s.reduce(((e,t)=>(t.matched||(e=!1),e)),!0),a=[];
12return s.forEach((e=>{e.reasons.forEach((e=>{e.reasons.forEach((e=>{a.push(e)}))}))})),{result:(0,n.kI)(e),query:(0,n.kI)(t),matched:o,reasons:s,summary:a}}},88508:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(507707),i=r(617665),s=r(611177);function o(e,t){const r={owner:[],member:[],admin:[]},o=i.g.fromJson(e,t),a=o.collectionNames.map((e=>{const r=o.getCollection(e);return(0,s.o)(r.scope,t.currentUser)}));return[...Object.keys(e.scopes).reduce(((t,r)=>((e.collections||[]).some((e=>e.targetEntity===r))||t.push(r),t)),[]).map((e=>{const r=o.getScope(e);return(0,s.o)(r,t.currentUser)})),...a].forEach((e=>{r.owner=[...r.owner,...e.owner],r.member=[...r.member,...e.member],r.admin=[...r.admin,...e.admin]})),r.owner=r.owner.filter(n.Tw),r.member=r.member.filter(n.Tw),r.admin=r.admin.filter(n.Tw),r}},654135:(e,t,r)=>{"use strict";r.d(t,{H:()=>o});var n=r(518944),i=r(507707),s=r(356013);function o(e,t,r=["any","all"]){return(0,s.X3)(t).filters.reduce(((e,t)=>[...e,...t.predicates]),[]).reduce(((t,i)=>(r.forEach((r=>{t=[...t,...(0,n.t)(i,`${e}.${r}`,[])]})),t)),[]).filter(i.Tw)}},674070:(e,t,r)=>{"use strict";function n(e){const t={owner:[],member:[],admin:[]};return(e.groups||[]).forEach((e=>{var r,n,i;"owner"===(null===(r=e.userMembership)||void 0===r?void 0:r.memberType)&&t.owner.push(e.id),"admin"===(null===(n=e.userMembership)||void 0===n?void 0:n.memberType)&&t.admin.push(e.id),"member"!==(null===(i=e.userMembership)||void 0===i?void 0:i.memberType)||e.isViewOnly||t.member.push(e.id)})),t}r.d(t,{q:()=>n})},611177:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(654135),i=r(674070);function s(e,t){let r={owner:[],member:[],admin:[]};const s=(0,n.H)("group",e),o=(0,i.q)(t);if(s.length){const e=["owner","admin","member"];s.forEach((t=>{e.forEach((e=>{o[e].includes(t)&&r[e].push(t)}))}))}else r=o;return r}},185744:(e,t,r)=>{"use strict";r.d(t,{B:()=>se});var n=r(989593),i=r(841741),s=r(264263),o=r(507707),a=r(655790),c=r(170209),u=r(832010),l=r(80568),d=r(292796),p=r(285581),h=r(969953),m=r(94684);async function f(e,t){let r;if(e.filters.forEach((e=>{e.predicates.forEach((e=>{const t=(0,s.W)(e,"group");Array.isArray(t)?r=t[0]:"string"==typeof t?r=t:"object"==typeof t&&(r=(0,s.W)(t,"any[0]")||(0,s.W)(t,"all[0]"))}))})),!r)throw new i.Z("portalSearchGroupMembers","Group Id required. Please pass as a predicate in the query.");e.filters=e.filters.map((e=>{const t=["name","memberType","joined"];return e.predicates=e.predicates.map((e=>(e.term&&(e.name=e.term,delete e.term),e))).map((e=>(0,h.H)(e,t))).filter((e=>Object.entries(e).length>0)).map(u.AI),e}));const n=(0,a.O)(e);return["num","sortField","sortOrder","include","start"].forEach((e=>{t.hasOwnProperty(e)&&(n[e]=t[e])})),n.groupId=r,n.requestOptions=t.requestOptions,g(n)}async function g(e){const t=Object.assign(Object.assign({},e),e.requestOptions),r=await(0,c.zv)(e.groupId,t),n=await Promise.all(r.users.map((t=>async function(e,t=[],r){const n={username:e.username,memberType:e.memberType||"member",access:"private",fullName:null,firstName:null,lastName:null,description:null,orgId:null,groups:[],tags:[],thumbnail:null,created:null,modified:null,isGroupOwner:e.isGroupOwner},i=(0,p.D)(c.PR,n),s=await i({username:e.username,authentication:r.authentication,portal:r.portal});return Object.keys(n).forEach((e=>{s.hasOwnProperty(e)&&""!==s[e]&&(0,m.t)(e,s[e],n)})),(0,d.RG)(n,["org.name as OrgName",...t],r)}(Object.assign(Object.assign({},t),{isGroupOwner:r.owner.username===t.username}),e.include,e.requestOptions))));return{total:r.total,results:n,hasNext:r.nextStart>-1,next:(0,l.D)(e,r.nextStart,r.total,g)}}var y=r(356013),b=r(228246),v=r(589585);async function w(e,t){if(!t.requestOptions)throw new i.Z("portalSearchGroups","options.requestOptions is required.");e.filters=e.filters.map((e=>(e.predicates=e.predicates.map(u.AI),e)));const r=(0,a.O)(e);return["num","sortField","sortOrder","include","start","httpMethod","requestOptions"].forEach((e=>{t.hasOwnProperty(e)&&(r[e]=t[e])})),t.requestOptions.authentication?r.authentication=t.requestOptions.authentication:r.portal=t.requestOptions.portal,S(r)}async function S(e){const t=await(0,c.td)(e),r=await Promise.all(t.results.map((t=>async function(e,t=[],r){return(0,b.Fx)(e,t,r)}(t,e.include,e.requestOptions))));return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,l.D)(e,t.nextStart,t.total,S),executedQuerySize:(0,v.tS)(e.q)}}function E(e,t,r){if(!t.requestOptions)throw new i.Z(r,"requestOptions: IHubRequestOptions is required.");
12if(!t.requestOptions.authentication)throw new i.Z(r,"requestOptions must pass authentication.");const n=(0,o.kI)(e);n.filters=n.filters.map((e=>(e.predicates=e.predicates.map(u.AI),e)));const s=(0,a.O)(n);return["num","sortField","sortOrder","include","start","requestOptions"].forEach((e=>{t.hasOwnProperty(e)&&(s[e]=t[e])})),s.authentication=t.requestOptions.authentication,s}function T(e,t){const r=E(e,t,"searchPortalUsersLegacy");return O(Object.assign(Object.assign({},r),{include:["org.name as OrgName",...r.include||[]]}))}function I(e,t){return O(E(e,t,"searchPortalUsers"))}function C(e,t){return _(E(e,t,"searchCommunityUsers"))}function A(e,t){return Promise.all(t.results.map((t=>function(e,t=[],r){return(0,d.RG)(e,t,r)}(t,e.include,e.requestOptions))))}async function O(e){const t=await(0,c.pz)(e),r=await A(e,t);return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,l.D)(e,t.nextStart,t.total,O),executedQuerySize:(0,v.tS)(e.q)}}async function _(e){const t=await(0,c.p3)(e),r=await A(e,t);return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,l.D)(e,t.nextStart,t.total,_),executedQuerySize:(0,v.tS)(e.q)}}var D=r(481900),P=r(73728),k=r(22451),x=r(884446);async function R(e,t){var r;const n=(0,v.Bq)(e);if(null===(r=t.aggFields)||void 0===r?void 0:r.length)return async function(e,t){const r=`${(0,D.e)(e,t)}/aggregations`,n=function(e,t){return{aggregations:`terms(fields=(${t.aggFields.join()}))`,filter:(0,P.Zx)(e),token:(0,s.W)(t,"requestOptions.authentication.token")}}(e,t);return{total:0,results:[],hasNext:!1,next:()=>null,aggregations:(await(0,k.d)(r,n,t)).aggregations.aggregations.map((e=>({mode:"terms",field:e.field,values:e.aggregations.map((e=>({value:e.label,count:e.value})))})))}}(n,t);const i=`${(0,D.e)(n,t)}/items`;return(0,x.S)(i,n,t)}var U=r(710705),M=r(211472);const N=e=>e.reduce(((e,t)=>"object"==typeof t&&null!==t&&"not"in t?Object.assign(Object.assign({},e),{notIds:[...e.notIds,...Array.isArray(t.not)?t.not:[t.not]]}):"string"==typeof t?Object.assign(Object.assign({},e),{ids:[...e.ids,t]}):e),{ids:[],notIds:[]});function j(e){return e.reduce(((e,t)=>t.predicates.reduce(((e,t)=>Object.keys(t).reduce(((e,r)=>{const n=(Array.isArray(t[r])?t[r]:[t[r]]).reduce(((e,t)=>e.includes(t)?e:[...e,t]),e[r]||[]);return Object.assign(Object.assign({},e),{[r]:n})}),e)),e)),{})}const $={access:M.LY.ACCESS,created:M.LY.CREATED_AT,modified:M.LY.UPDATED_AT,owner:M.LY.CREATOR,lastActivity:M.LY.LAST_ACTIVITY},F={desc:M.As.DESC,asc:M.As.ASC};var G=r(822409),L=r(636980),H=r(325833);const B=async(e,t)=>{if(!t.requestOptions)throw new i.Z("hubSearchChannels","options.requestOptions is required");const r=function(e){var t,r,n,i,s,a,c,u,l,d,p;const h={},m=j(e);if((null===(t=m.term)||void 0===t?void 0:t.length)&&(h.name=m.term[0]),(null===(r=m.group)||void 0===r?void 0:r.length)&&(h.groups=m.group),(null===(n=m.access)||void 0===n?void 0:n.length)&&(h.access=m.access),(null===(i=m.orgId)||void 0===i?void 0:i.length)&&(h.orgIds=m.orgId),(null===(s=m.discussion)||void 0===s?void 0:s.length)&&(h.discussion=m.discussion[0]),!0===(null===(a=m.hasUserPosts)||void 0===a?void 0:a[0])&&(h.filterBy=M.ww.HAS_USER_POSTS),(null===(c=m.role)||void 0===c?void 0:c.length)&&(h.roles=m.role),(null===(u=m.owner)||void 0===u?void 0:u.length)&&(h.creator=m.owner[0]),null===(l=m.id)||void 0===l?void 0:l.length){const{ids:e,notIds:t}=N(m.id);e.length&&(h.ids=e),t.length&&(h.notIds=t.filter(o.Tw))}return(null===(d=m.createdDateRange)||void 0===d?void 0:d.length)&&(h.createdBefore=new Date(m.createdDateRange[0].to),h.createdAfter=new Date(m.createdDateRange[0].from)),(null===(p=m.updatedDateRange)||void 0===p?void 0:p.length)&&(h.updatedBefore=new Date(m.updatedDateRange[0].to),h.updatedAfter=new Date(m.updatedDateRange[0].from)),h}(e.filters),n=function(e){const t={relations:[M.Uz.CHANNEL_ACL]};return e.num&&(t.num=e.num),e.start&&(t.start=e.start),e.sortField&&$[e.sortField]&&(t.sortBy=$[e.sortField]),e.sortOrder&&F[e.sortOrder]&&(t.sortOrder=F[e.sortOrder]),t}(t),{total:s,nextStart:a,items:u}=await(0,U.U4)(Object.assign({data:Object.assign(Object.assign({},r),n)},t.requestOptions)),l=await async function(e,t){var r;let n=[];if(null===(r=t.include)||void 0===r?void 0:r.includes("groups")){const r=e.reduce(((e,t)=>(0,G.hw)(t).reduce(((e,t)=>e.includes(t)?e:[...e,t]),e)),[]),i=await(0,L.d)((0,H.D)(r,100),(e=>
12(0,c.td)(Object.assign({q:e.map((e=>`id:${e}`)).join(" OR "),num:e.length},t.requestOptions))),5);n=i.reduce(((e,t)=>[...e,...t.results]),[])}return e.map((e=>{var r;return(0,G.Ge)(e,(null===(r=t.include)||void 0===r?void 0:r.includes("groups"))?(0,G.hw)(e).map((e=>n.find((({id:t})=>t===e))||null)):[])}))}(u,t);return{total:s,results:l,hasNext:a>-1,next:()=>B(e,Object.assign(Object.assign({},t),{start:a}))}};var W=r(590317),q=r(205097),V=r(994512),K=r(899989);function z(e,t){return e.map((e=>function(e,t){return t[e]||t[e.toUpperCase()]||t[e.toLowerCase()]||e}(e,t)))}async function Y(e,t){const r=function(e){var t,r,n,i,s,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S,E;const T=j(e),I={};if((null===(t=T.access)||void 0===t?void 0:t.length)&&(I.access=z(T.access,q.bY)),(null===(r=T.canEdit)||void 0===r?void 0:r.length)&&(I.canEdit=T.canEdit[0]),(null===(n=T.entityId)||void 0===n?void 0:n.length)&&(I.entityIds=T.entityId),(null===(i=T.entityType)||void 0===i?void 0:i.length)&&(I.entityTypes=z(T.entityType,q.Cb)),null===(s=T.id)||void 0===s?void 0:s.length){const{ids:e,notIds:t}=N(T.id);e.length&&(I.eventIds=e.filter(o.Tw)),t.length&&(I.notEventIds=t.filter(o.Tw))}if((null===(a=T.term)||void 0===a?void 0:a.length)&&(I.title=T.term[0]),(null===(c=T.orgId)||void 0===c?void 0:c.length)&&(I.orgId=T.orgId[0]),(null===(u=T.categories)||void 0===u?void 0:u.length)&&(I.categories=T.categories),(null===(l=T.tags)||void 0===l?void 0:l.length)&&(I.tags=T.tags),null===(d=T.group)||void 0===d?void 0:d.length){const{ids:e,notIds:t}=N(T.group);if(e.length&&(I.sharedToGroups=e),t.length){const e=t.filter(o.Tw);I.withoutEditGroups=e,I.withoutReadGroups=e}}return(null===(p=T.attendanceType)||void 0===p?void 0:p.length)&&(I.attendanceTypes=z(T.attendanceType,q.uA)),(null===(h=T.owner)||void 0===h?void 0:h.length)&&(I.createdByIds=T.owner),I.status=(null===(m=T.status)||void 0===m?void 0:m.length)?z(T.status,q.N3):[q.N3.PLANNED,q.N3.CANCELED],(null===(f=T.startDateRange)||void 0===f?void 0:f.length)?(T.startDateRange[0].to&&(I.startDateTimeBefore=new Date(T.startDateRange[0].to).toISOString()),T.startDateRange[0].from&&(I.startDateTimeAfter=new Date(T.startDateRange[0].from).toISOString())):((null===(g=T.startDateBefore)||void 0===g?void 0:g.length)&&(I.startDateTimeBefore=new Date(T.startDateBefore[0]).toISOString()),(null===(y=T.startDateAfter)||void 0===y?void 0:y.length)&&(I.startDateTimeAfter=new Date(T.startDateAfter[0]).toISOString())),(null===(b=T.endDateRange)||void 0===b?void 0:b.length)?(T.endDateRange[0].to&&(I.endDateTimeBefore=new Date(T.endDateRange[0].to).toISOString()),T.endDateRange[0].from&&(I.endDateTimeAfter=new Date(T.endDateRange[0].from).toISOString())):((null===(v=T.endDateBefore)||void 0===v?void 0:v.length)&&(I.endDateTimeBefore=new Date(T.endDateBefore[0]).toISOString()),(null===(w=T.endDateAfter)||void 0===w?void 0:w.length)&&(I.endDateTimeAfter=new Date(T.endDateAfter[0]).toISOString())),(null===(S=T.occurrence)||void 0===S?void 0:S.length)&&T.occurrence.forEach((e=>{switch(e){case"upcoming":I.startDateTimeAfter=(new Date).toISOString();break;case"past":I.endDateTimeBefore=(new Date).toISOString();break;case"inProgress":I.startDateTimeBefore=(new Date).toISOString(),I.endDateTimeAfter=(new Date).toISOString()}})),(null===(E=T.modified)||void 0===E?void 0:E.length)&&T.modified[0].to&&T.modified[0].from&&(I.updatedAtBefore=new Date(T.modified[0].to).toISOString(),I.updatedAtAfter=new Date(T.modified[0].from).toISOString()),I}(e.filters),n=function(e){const t={};return e.num>0&&(t.num=e.num),e.start>1&&(t.start=e.start),"modified"===e.sortField?t.sortBy=q.ji.updatedAt:"created"===e.sortField?t.sortBy=q.ji.createdAt:"title"===e.sortField?t.sortBy=q.ji.title:"startDate"===e.sortField&&(t.sortBy=q.ji.startDateTime),t.sortOrder="desc"===e.sortOrder?q.LM.desc:q.LM.asc,t}(t),i=Object.assign(Object.assign(Object.assign({},r),n),{include:[q.rf.creator,q.rf.location]}),{items:s,nextStart:a,total:u}=await(0,W.gT)(Object.assign(Object.assign({},t.requestOptions),{data:i})),l=await Promise.all(s.map((e=>async function(e,t){var r;let n;return(null===(r=t.include)||void 0===r?void 0:r.includes("ownerUser"))&&(n=await(0,c.PR)(Object.assign({username:e.creator.username},t.requestOptions))),{access:e.access.toLowerCase(),id:e.id,location:(0,K.c)(e),type:"Event",name:e.title,owner:e.creator.username,ownerUser:n,summary:e.summary||e.description,createdDate:new Date(e.createdAt),createdDateSource:"event.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"event.updatedAt",family:"event",links:(0,V.E)(e),tags:e.tags,categories:e.categories,rawResult:e}}
12(e,t)))),d=a>-1;return{total:u,results:l,hasNext:d,next:()=>{if(!d)throw new Error("No more hub events for the given query and options");return Y(e,Object.assign(Object.assign({},t),{start:a}))}}}var J=r(518680),Q=r(977680);const Z=(e,t)=>e.reduce(((e,r)=>r.predicates.reduce(((e,r)=>Object.entries(r).reduce(((e,[r,n])=>r===t?[...e,...Array.isArray(n)?n:[n]]:e),e)),e)),[]),X=(e,t)=>{const r=Z(e,t).filter(o.Tw).join(",");if(r)return r};async function ee(e,t){const r=function(e){const t={eventId:e.properties.eventId},r=(e,t)=>(null==e?void 0:e.length)?e:t.map((e=>e.toLowerCase())).join(","),n=X(e.filters,"userId");(null==n?void 0:n.length)&&(t.userId=n);const i=Z(e.filters,"term");i.length&&(t.name=i[0]),t.type=r(X(e.filters,"attendanceType"),[q.uA.VIRTUAL,q.uA.IN_PERSON]),t.role=r(X(e.filters,"role"),[q.sY.OWNER,q.sY.ORGANIZER,q.sY.ATTENDEE]),t.status=r(X(e.filters,"status"),[q.Vv.PENDING,q.Vv.ACCEPTED,q.Vv.DECLINED,q.Vv.BLOCKED]);const s=Z(e.filters,"updatedDateRange");return s.length&&(t.updatedAtBefore=new Date(s[0].to).toISOString(),t.updatedAtAfter=new Date(s[0].from).toISOString()),t}(e),n=function(e){const t={};return e.num>0&&(t.num=e.num.toString()),e.start>1&&(t.start=e.start.toString()),"modified"===e.sortField?t.sortBy=q.Sj.updatedAt:"created"===e.sortField?t.sortBy=q.Sj.createdAt:"username"===e.sortField?t.sortBy=q.Sj.username:"firstName"===e.sortField?t.sortBy=q.Sj.firstName:"lastName"===e.sortField&&(t.sortBy=q.Sj.lastName),t.sortOrder="desc"===e.sortOrder?q.LM.desc:q.LM.asc,t}(t),i=Object.assign(Object.assign({},r),n),{items:s,nextStart:o,total:a}=await(0,J.mv)(Object.assign(Object.assign({},t.requestOptions),{data:i})),u=await Promise.all(s.map((e=>async function(e,t){var r;const[n,i]=await Promise.all([(0,c.PR)(Object.assign({username:e.userId},t.requestOptions)),(0,c.PR)(Object.assign({username:e.createdById},t.requestOptions))]);return{id:e.id.toString(),access:n.access,name:n.fullName,createdDate:new Date(e.createdAt),createdDateSource:"attendee.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"attendee.updatedAt",type:"Event Attendee",family:"eventAttendee",owner:i.username,rawResult:e,links:{self:(0,Q.n)(n.username,t.requestOptions),siteRelative:`/people/${n.username}`,thumbnail:n.thumbnail?(0,v.Fz)(t.requestOptions.portal,n,null===(r=t.requestOptions.authentication)||void 0===r?void 0:r.token):null}}}(e,t)))),l=o>-1;return{total:a,results:u,hasNext:l,next:()=>{if(!l)throw new Error("No more hub events for the given query and options");return ee(e,Object.assign(Object.assign({},t),{start:o}))}}}var te=r(752440),re=r(687934),ne=r(654135);async function ie(e,t){const r=(0,ne.H)("id",e,["any"]);if(!r.length)throw new Error("Organization query must contain an id predicate.");const n=(0,p.D)(te.T,null),i=(await(0,L.d)(r,(async e=>n(e,t.requestOptions)),8)).filter((e=>null!==e));return{total:i.length,hasNext:!1,next:null,results:i.map((e=>(0,re.yT)(e)))}}async function se(e,t){if(!e)throw new i.Z("hubSearch","Query is required.");if(!Array.isArray(e.filters))throw new i.Z("hubSearch","Query must have a filters array.");if(!e.filters.length)throw new i.Z("hubSearch","Query must contain at least one Filter.");if(!t.requestOptions)throw new i.Z("hubSearch","requestOptions: IHubRequestOptions is required.");t.include||(t.include=[]);const r=e.targetEntity,{requestOptions:a}=t,c=(0,n._T)(t,["requestOptions"]),u=(0,o.kI)(c);u.requestOptions=a,u.api=function(e,t){let r="portal";return(function(e,t){const{requestOptions:{isPortal:r}}=t;return"channel"===e&&!r}(e,t)||function(e,t){const{requestOptions:{isPortal:r}}=t;return["event","eventAttendee"].includes(e)&&!r}(e,t)||function(e,t){const{api:r,requestOptions:{isPortal:n}}=t;return!n&&("discussionPost"===e||"item"===e&&"hub"===r)}(e,t))&&(r="hub"),r}(r,u);const l={portal:{item:y.XZ,group:w,user:T,portalUser:I,communityUser:C,groupMember:f,organization:ie},hub:{item:R,channel:B,discussionPost:R,event:Y,eventAttendee:ee}},d=(0,s.W)(l,`${u.api}.${r}`);if(!d)throw new i.Z("hubSearch",`Search via "${r}" filter against "${u.api}" api is not implemented. Please ensure "targetEntity" is defined on the query.`);return d((0,o.kI)(e),u)}},384460:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CATALOG_SCHEMA_VERSION:()=>u.V,Catalog:()=>n.g,Collection:()=>i.F,WELL_KNOWN_EVENT_CATALOGS:()=>d.IN,WELL_KNOWN_GROUP_CATALOGS:()=>d.en,WELL_KNOWN_ITEM_CATALOGS:()=>
12d.Zp,addDefaultItemSearchPredicates:()=>l.Fn,combineQueries:()=>h.W,dotifyString:()=>d.YM,expandPortalQuery:()=>l.Bq,getGroupPredicate:()=>l.l8,getGroupThumbnailUrl:()=>l.PP,getKilobyteSizeOfQuery:()=>l.tS,getResultSiteRelativeLink:()=>l.U9,getScopeGroupPredicate:()=>l.x9,getUserThumbnailUrl:()=>l.Fz,getWellKnownCatalog:()=>d.Sj,getWellKnownCatalogs:()=>d.ad,getWellknownCollection:()=>d.sd,getWellknownCollections:()=>d.AX,hubSearch:()=>s.B,migrateToCollectionKey:()=>l.FT,relativeDateToDateRange:()=>l.SN,searchAssociatedContent:()=>p.u,serializeCatalogScope:()=>m.K,serializeQueryForPortal:()=>o.O,upgradeCatalogSchema:()=>u.c,valueToMatchOptions:()=>l.N0});var n=r(617665),i=r(619943),s=r(185744),o=r(655790),a=r(887523),c={};for(const e in a)["default","Catalog","Collection","hubSearch","serializeQueryForPortal"].indexOf(e)<0&&(c[e]=()=>a[e]);r.d(t,c);var u=r(719271),l=r(589585),d=r(821413),p=r(479174),h=r(958157),m=r(903646)},853179:(e,t,r)=>{"use strict";r.d(t,{O:()=>i});var n=r(356013);function i(e){if(!e)return;const t=(0,n.X3)(e);return t.filters.forEach((e=>{e.predicates.forEach((e=>{e.group&&(e.group.not=[...e.group.any||[],...e.group.all||[]],e.group.any=[],e.group.all=[])}))})),t}},479174:(e,t,r)=>{"use strict";r.d(t,{u:()=>c});var n=r(841807),i=r(618462),s=r(841741),o=r(481900),a=r(884446);async function c(e){const{scope:t,requestOptions:r,num:c=4}=e,u={requestOptions:r,num:c},l=(0,n.Q)(e.entity);if(!i.T.includes(l))throw new s.Z("searchAssociatedContent",`associated content is not supported for entity type "${l}"`);if("item"!==t.targetEntity)throw new s.Z("searchAssociatedContent",`associated content scope does not support targetEntity "${t.targetEntity}"`);if(!e.layerId&&"connected"===e.association)throw new s.Z("searchAssociatedContent",'"layerId" is required for searching "connected" content');const{entity:d,layerId:p}=e,h=p?`${d.id}_${p}`:d.id,{association:m}=e,f=`${(0,o.e)(t,u)}/items/${h}/${m}`;return(0,a.S)(f,t,u)}},52223:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var n=r(617665),i=r(507707),s=r(40180);async function o(e,t,r,o){const a=e.map((e=>n.g.fromJson(e,o))).map((async e=>{const n=[e.searchCollections(t,r).then((t=>({catalogTitle:e.title,collectionResults:t})))],o=(0,s.e)("targetEntity",e.collections).filter(i.Tw),a=e.availableScopes.filter((e=>!o.includes(e)));if(a.length){const i=e.searchScopes(t,r,a).then((t=>({catalogTitle:`${e.title}`,scopeResults:t})));n.push(i)}return await Promise.all(n).then((e=>e.reduce(((e,t)=>({catalogTitle:t.catalogTitle,collectionResults:Object.assign(Object.assign({},e.collectionResults),t.collectionResults),scopeResults:Object.assign(Object.assign({},e.scopeResults),t.scopeResults)})),{})))}));return Promise.all(a)}},452900:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(518944),i=r(52223);async function s(e,t,r,s){const o=(0,n.t)(e,"catalogs",[]);return(0,i.L)(o,t,r,s)}},903646:(e,t,r)=>{"use strict";r.d(t,{K:()=>o});var n=r(719271),i=r(589585),s=r(655790);function o(e,t){const r=(0,n.c)(e).scopes[t];if(!r)throw new Error(`No query found for scope: ${t}`);const o=(0,i.Bq)(r);return(0,s.O)(o)}},655790:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(984370),i=r(832010);function s(e){const t=a(e.filters.map(c).filter(o),"AND"),r=(0,n.$)("bbox",e.filters);return r&&(t.params={bbox:r.bbox}),t}function o(e){return!(null==e||""===e)}function a(e,t){return e.reduce(((e,r)=>(Object.entries(r).forEach((([r,n])=>{e[r]&&""!==n?e[r]=`${e[r]} ${t} ${n}`:""!==n&&(e[r]=n)})),e)),{q:""})}function c(e){const t=e.operation||"AND",r=e.predicates.map(i.AI),n=a(r.map(u).filter((e=>null!=e)),t);return r.length>1&&(n.q=`(${n.q})`),n}function u(e){const t=["created","modified"],r=["isopendata","isviewonly"],n=["searchUserAccess","searchUserName","memberType","name","categoriesAsParam","categoryFilter","bbox","joined"],i=["filterType","term",...t,...r,...n],s=["access","capabilities","created","categories","categoriesAsParam","categoryFilter","description","disabled","email","emailstatus","firstname","fullname","group","id","isInvitationOnly","isopendata","joined","lastlogin","lastname","memberType","modified","name","orgid","orgIds","owner","provider","role","searchUserAccess","searchUserName","snippet","tags","term","title","type","typekeywords","userlicensetype","username","isviewonly"],c=Object.entries(e).map((([e,o])=>{if(s.includes(e)){const s={q:""};return i.includes(e)||"term"===e||(s.q=function(e,t){var r,n,i;let s="";return(null===(r=t.any)||void 0===r?void 0:r.length)&&(s=`${l("OR",e,t.any)}
12`),(null===(n=t.all)||void 0===n?void 0:n.length)&&(s=(s?s+" AND ":"")+`${l("AND",e,t.all)}`),(null===(i=t.not)||void 0===i?void 0:i.length)&&(s=(s?s+" AND ":"")+`${l("OR",`-${e}`,t.not)}`),s}(e,o)),(t.includes(e)||function(e){return"object"==typeof e&&null!==e&&["from","to"].every((t=>void 0!==e[t]))}(o))&&(s.q=function(e,t){return`${e}:[${t.from} TO ${t.to}]`}(e,o)),r.includes(e)&&(s.q=`${e}:${o}`),n.includes(e)&&(s[e]="joined"===e?`${o.from},${o.to}`:o),"term"===e&&(s.q=o),s}})).filter(o);if(c.length){const e=a(c,"AND");return e.q&&(e.q=`(${e.q})`),e}return null}function l(e,t,r){let n="";return Array.isArray(r)&&r.length?(n=`${t}:"${r.join(`" ${e} ${t}:"`)}"`,r.length>1&&(n=`(${n})`)):n=`${t}:"${r}"`,n}},176904:()=>{},340728:()=>{},615680:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});const n=["item","group","user","portalUser","communityUser","groupMember","event","channel","discussionPost","eventAttendee","organization"]},238907:()=>{},287850:()=>{},184482:()=>{},887523:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CATALOG_SETUP_TYPES:()=>c.N,targetEntities:()=>u.g});var n=r(340728),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(238907);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(184482);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(287850);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(98446),u=r(615680),l=r(176904);i={};for(const e in l)["default","CATALOG_SETUP_TYPES","targetEntities"].indexOf(e)<0&&(i[e]=()=>l[e]);r.d(t,i)},98446:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});const n=["blank","newGroup","existingGroup"]},719271:(e,t,r)=>{"use strict";r.d(t,{V:()=>s,c:()=>a});var n=r(264263),i=r(507707);const s=1,o={item:e=>[{orgid:[e]},{type:{not:["Code Attachment"]}}],event:e=>[{orgId:e}],group:e=>[{orgid:e}],user:e=>[{orgid:e}]};function a(e){if((0,n.W)(e,"schemaVersion")===s)return e;{let t=(0,i.kI)(e);return t=function(e){if((0,n.W)(e,"schemaVersion")>1)return e;{const t={schemaVersion:1,title:"Default Catalog",scopes:{item:{targetEntity:"item",filters:[]},event:{targetEntity:"event",filters:[]}},collections:[]},r=(0,n.W)(e,"groups")||[];let i=[];Array.isArray(r)&&r.length?i=r:"string"==typeof r&&(i=[r]),i.length&&(t.scopes=Object.entries(t.scopes).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t[0]]:Object.assign(Object.assign({},t[1]),{filters:[{predicates:[{group:i}]}]})})),{}));const s=(0,n.W)(e,"orgId");return s&&(t.scopes.item={targetEntity:"item",filters:[]},t.scopes.event={targetEntity:"event",filters:[]},t.scopes.group={targetEntity:"group",filters:[]},t.scopes.user={targetEntity:"user",filters:[]},t.scopes=Object.entries(t.scopes).reduce(((e,t)=>{const r=t[0],n=t[1];return Object.assign(Object.assign({},e),{[r]:Object.assign(Object.assign({},n),{filters:[{operation:"AND",predicates:o[r](s)}]})})}),{})),t}}(t),t}}},589585:(e,t,r)=>{"use strict";r.d(t,{Fn:()=>m,Bq:()=>g,l8:()=>p,PP:()=>c,tS:()=>f,U9:()=>h,x9:()=>d,Fz:()=>u,FT:()=>l,SN:()=>a,N0:()=>o});var n=r(371740),i=r(507707),s=r(356013);function o(e){let t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function a(e){const t={min:6e4,hours:36e5,days:864e5,weeks:6048e5},r=new Date,n={type:"date-range",from:r.getTime(),to:r.getTime()};switch(e.unit){case"hours":case"days":case"weeks":n.from=n.to-t[e.unit]*e.num;break;case"months":r.setMonth(r.getMonth()-e.num),n.from=r.getTime();break;case"years":r.setFullYear(r.getFullYear()-e.num),n.from=r.getTime()}return n}function c(e,t,r){let n=null;return t.thumbnail&&(n=`${e}/community/groups/${t.id}/info/${t.thumbnail}`,r&&"public"!==t.access&&(n=`${n}?token=${r}`)),n}function u(e,t,r){let n=null;return t.thumbnail&&(n=`${e}/community/users/${t.username}/info/${t.thumbnail}`,r&&"public"!==t.access&&(n=`${n}?token=${r}`)),n}function l(e){return function(e){return["Site","Event","Dataset","Document","App,Map"].includes(e)}(e)?"App,Map"===(t=e)?"appAndMap":t.toLowerCase():e;var t}function d(e){console.warn('"getScopeGroupPredicate(query)" is deprecated. Please use "getGroupPredicate(qyr)');const t=e=>!!e.group,r=e.filters.find((e=>e.predicates.find(t)));return r&&r.predicates.find(t)}function p(e){const t=g(e),r=e=>!!e.group,n=t.filters.find((e=>e.predicates.find(r)));return n&&n.predicates.find(r)}function h(e,t){var r;const{id:i,type:s,typeKeywords:o}=e;let a=null===(r=e.links)||void 0===r?void 0:r.siteRelative;if(a&&(0,n.r9)(s,o)){const e=((null==t?void 0:t.pages)||[]).find((e=>e.id===i)),r=null==e?void 0:e.slug;r&&(a=a.replace(i,r))}return a}function m(e){const t=(0,i.kI)(e);return t.filters.push({predicates:[{type:{not:["Code Attachment"]}}]}),t}function f(e){const t="string"==typeof e?e:e.toParam();return(new TextEncoder).encode(t).length/1024}function g(e){const t=(0,s.qI)(e);return(0,s.X3)(t)}},821413:(e,t,r)=>{"use strict";r.d(t,{AX:()=>g,IN:()=>u,Sj:()=>p,YM:()=>l,Zp:()=>a,ad:()=>d,en:()=>c,sd:()=>y});var n=r(704059),i=r(437450),s=r(264263),o=r(518944);const a=["myContent","favorites","organization","world","partners","community","livingAtlas"],c=["editGroups","viewGroups","allGroups","myGroups","orgGroups","communityGroups","publicGroups"],u=["myEvents","orgEvents","worldEvents"];function l(e){return e&&"."!==e.slice(-1)?`${e}.`:e}function d(e,t,r,n,i){const s={item:[...a],group:[...c],event:[...u]}[t];
12if(r.some((e=>!s.includes(e))))throw new Error(`Requested catalogs must be of the same targetEntity type: ${t}`);return r.map((r=>p(e,r,t,Object.assign(Object.assign({},i||{}),{user:n.currentUser,context:n}))))}function p(e,t,r,n){switch(r){case"item":return function(e,t,r){let n;e=l(e);const o=(0,s.W)(r,"filters")||[],a=(0,s.W)(r,"context"),c=g(e,"item",null==r?void 0:r.collectionNames);switch(t){case"myContent":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:r.user.username}]},...o],c,"item");break;case"favorites":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{group:r.user.favGroupId}]},...o],c,"item");break;case"organization":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:r.user.orgId}]},...o],c,"item");break;case"partners":const s=a.trustedOrgIds.filter((e=>e!==a.currentUser.orgId&&e!==m(a)));s.length&&(n=(0,i.Y)(e,t,[{predicates:[{orgid:s,searchUserAccess:"includeTrustedOrgs"}]},...o],c,"item"));break;case"community":const u=m(a);u&&(n=(0,i.Y)(e,t,[{predicates:[{orgid:u}]},...o],c,"item",a.isCommunityOrg?function(e,t){return t.trustedOrgs.find((t=>t.to.orgId===e)).to.name}(u,a):void 0));break;case"livingAtlas":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:"Esri_LivingAtlas"}]}],c,"item");break;case"world":n=(0,i.Y)(e,t,[{predicates:[{type:{not:["code attachment"]}}]},...o],c,"item")}return n}(e,t,n);case"group":return function(e,t,r){let n;const{context:a,filters:c=[]}=r||{};e=l(e);const u=[{targetEntity:"group",key:t,label:t,scope:{targetEntity:"group",filters:[{predicates:[{q:"*"}]}]}}],d=(0,o.t)(a,"currentUser.groups",[]).reduce(((e,t)=>("admin"===t.userMembership.memberType&&e.push(t.id),e)),[]);switch(t){case"editGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:["updateitemcontrol"]}]},...c],u,"group");break;case"viewGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:{not:["updateitemcontrol"]}}]},...c],u,"group");break;case"allGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:[""]}]},...c],u,"group");break;case"myGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:(0,s.W)(a,"currentUser.username")}]},...c],u,"group");break;case"orgGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(a,"currentUser.orgId"),searchUserAccess:"groupMember",searchUserName:(0,s.W)(a,"currentUser.username"),isviewonly:!1},{orgid:(0,s.W)(a,"currentUser.orgId"),id:d}]},...c],u,"group");break;case"communityGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(a,"communityOrgId"),searchUserAccess:"groupMember",searchUserName:(0,s.W)(a,"currentUser.username"),isviewonly:!1},{orgid:(0,s.W)(a,"communityOrgId"),id:d}]},...c],u,"group");break;case"publicGroups":n=(0,i.Y)(e,t,[{predicates:[{access:"public"}]},...c],u,"group")}return n}(e,t,n);case"event":return function(e,t,r){let n;const{context:o,filters:a=[]}=r||{};e=l(e);const c=[{key:t,label:t,targetEntity:"event",include:[],scope:{targetEntity:"event",filters:[{predicates:[]}]}}];switch(t){case"myEvents":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:(0,s.W)(o,"currentUser.id")}]},...a],c,"event");break;case"orgEvents":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(o,"currentUser.orgId")}]},...a],c,"event");break;case"worldEvents":n=(0,i.Y)(e,t,[{predicates:[{access:["public","private","org"]}]},...a],c,"event")}return n}(e,t,n);default:throw new Error(`Wellknown catalog not implemented for "${r}"`)}}function h(e,t){if(!t||!t.user)throw new Error(`User needed to get "${e}" catalog`)}function m(e){const t=e.trustedOrgs.find((t=>t.from.orgId===e.currentUser.orgId));return e.isCommunityOrg&&t?t.to.orgId:e.communityOrgId}function f(e,t){return{appAndMap:{key:"appAndMap",label:`{{${e}collection.appsAndMaps:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:[...(0,n.P)("app"),...(0,n.P)("map")]}]}]}},dataset:{key:"dataset",label:`{{${e}collection.dataset:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("dataset")}]}]}},document:{key:"document",label:`{{${e}collection.documents:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("document")}]}]}},feedback:{key:"feedback",label:`{{${e}collection.feedback:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("feedback")}]}]}},site:{key:"site",label:`{{${e}collection.sites:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("site")}]}]}},template:{key:"template",label:`{{${e}collection.templates:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("template")}]}]}},project:{key:"project",label:`{{${e}collection.projects:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("project")}]}]}},initiative:{key:"initiative",label:`{{${e}collection.initiatives:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("initiative"),typekeywords:["hubInitiativeV2"]}]}]}},projectAndInitiative:{key:"projectAndInitiative",label:`{{${e}collection.projectsAndInitiatives:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{operation:"OR",predicates:[{type:(0,n.P)("project")},{type:(0,n.P)("initiative"),typekeywords:["hubInitiativeV2"]}]}]}}}}function g(e,t,r){const n=f(e=l(e),t);return((null==r?void 0:r.length)?r:["appAndMap","dataset","document","feedback","site","project"]).reduce(((e,t)=>(n[t]&&e.push(n[t]),e)),[])}function y(e,t,r){return f(e=l(e),t)[r]}},213630:(e,t,r)=>{"use strict";r.d(t,{g:()=>T});var n=r(617665),i=r(110571),s=r(2166),o=r(358637);const a={name:"",tags:[],typeKeywords:["Hub Site","hubSite"],catalog:{schemaVersion:0},assistant:{schemaVersion:0,workflows:[{key:"search_workflow",label:"Data search",description:"This workflow is for questions about geographic data that can be answered from open data.",action:"search",response:"Query for the right dataset and filter.",sources:[]},{key:"crisis_workflow",label:"Personal crisis topics",description:"Relating to suicide, self harm, or other personal crisis.",action:"respond",response:"If you are in a crisis or feeling suicidal, please call 911 for emergency response or 988 for the Suicide and Crisis Lifeline.",sources:[]},{key:"disaster_workflow",label:"Disaster response",description:"Relating preparing for disaster, tornado, hurricanes.",action:"respond",response:"If this is an emergency, call 911.",sources:[]}]},permissions:[],schemaVersion:1,features:r(27879).oj};var c=r(29258),u=r(684290),l=r(810824),d=r(574410),p=r(992367),h=r(34918),m=r(653647),f=r(954128),g=r(507707),y=r(572269),b=r(923935),v=r(822409),w=r(370427),S=r(518944),E=r(94684);class T extends i.x{constructor(e,t){super(e,t),this._catalogCache={},this._catalog=n.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new T(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=T.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,c.IN)(e,t.hubRequestOptions);return T.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Site not found."):e}}static applyDefaults(e,t){e.orgUrlKey||(e.orgUrlKey=(0,S.t)(t,"portal.urlKey","")),e.orgUrlKey=e.orgUrlKey.toLowerCase();const r=Object.assign(Object.assign({},a),e);return r.type=t.isPortal?c.TX:c.qf,r}update(e){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=n.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,c.L3)(this.entity,this.context.hubRequestOptions):this.entity=await(0,c.UW)(this.entity,this.context.hubRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.isDestroyed=!0,await(0,c.xb)(this.entity.id,this.context.hubRequestOptions)}async contains(e,t=[]){t.forEach((e=>{this._catalogCache[e.id]&&(e.catalog=this._catalogCache[e.id])}));const r=[...t,{id:this.id,hubEntityType:"site",catalog:this._catalog.toJson()}],n=await(0,u.h)(e,"content",r,this.context);
12return Object.keys(n.catalogInfo).forEach((e=>{e!==this.id&&(this._catalogCache[e]=n.catalogInfo[e].catalog)})),n}async searchVersions(){return(0,l.A)(this.entity.id,this.context.userRequestOptions)}async getVersion(e){return(0,d.b)(this.entity.id,e,this.context.userRequestOptions)}async createVersion(e){const t=new y.c7((0,b.s)()).entityToStore(this.entity,{});return(0,p.h)(t,this.context.userRequestOptions,e)}async updateVersion(e){const t=new y.c7((0,b.s)()).entityToStore(this.entity,{});return(0,h.S)(t,e,this.context.userRequestOptions)}async updateVersionMetadata(e){return(0,m.V)(this.entity.id,e,this.entity.owner,this.context.userRequestOptions)}async deleteVersion(e){return(0,f.h)(this.entity.id,e,this.entity.owner,this.context.userRequestOptions)}async getEditorConfig(e,t){return(0,s.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,o.t)((0,g.kI)(this.entity),t,this.context.hubRequestOptions):(0,g.kI)(this.entity);(0,E.t)("_followers.showFollowAction",this.entity.features["hub:site:feature:follow"],r);const n=await this.getFollowersGroup();if((0,E.t)("_followers.isDiscussable",(0,v.BV)(n),r),r.isDiscussable=this.entity.features["hub:site:feature:discussions"],!r._urlInfo){const{url:e,subdomain:t,defaultHostname:n}=r;r._urlInfo={url:e,subdomain:t,defaultHostname:n}}return r}async fromEditor(e){var t,r,n,i;const s=await(0,w.E)(e,this.context),o=s.entity;Object.entries(s).forEach((([e,t])=>{(0,E.t)(e,t,this)})),(null===(t=e._followers)||void 0===t?void 0:t.isDiscussable)&&await this.setFollowersGroupIsDiscussable(e._followers.isDiscussable),(null===(r=e._followers)||void 0===r?void 0:r.groupAccess)&&await this.setFollowersGroupAccess(e._followers.groupAccess),o.features=Object.assign(Object.assign({},o.features),{"hub:site:feature:follow":null===(n=e._followers)||void 0===n?void 0:n.showFollowAction,"hub:site:feature:discussions":e.isDiscussable});const{url:a,subdomain:c,defaultHostname:u}=e._urlInfo;if(o.url=a,o.subdomain=c,o.defaultHostname=u,o.permissions=o.permissions.filter((e=>"hub:site:assistant:access"!==e.permission)),(null===(i=o.assistant.accessGroups)||void 0===i?void 0:i.length)>0){const e=o.assistant.accessGroups.map((e=>({permission:"hub:site:assistant:access",collaborationType:"group",collaborationId:e})));o.permissions=[...o.permissions,...e]}return this.entity=o,await this.save(),this.entity}}},29258:(e,t,r)=>{"use strict";r.d(t,{TX:()=>H,qf:()=>L,cC:()=>J,EP:()=>Y,UW:()=>q,xb:()=>K,nK:()=>Q,IN:()=>z,L3:()=>V});var n=r(170209),i=r(704059),s=r(929492),o=r(572269),a=r(264263),c=r(161012),u=r(388746),l=r(248849),d=r(348157),p=r(371740),h=r(507707),m=r(560133),f=r(719271),g=r(398195),y=r(27879),b=r(471934),v=r(853719);function w(e,t){const r=(0,v.g)(e,t);return Object.assign(Object.assign({},r),{self:e.url,layoutRelative:"/edit"})}var S=r(990066),E=r(923935),T=r(806322),I=r(657603),C=r(665688),A=r(641675),O=r(941645),_=r(719339),D=r(102095),P=r(737823),k=r(40180),x=r(94684),R=r(822409),U=r(362402),M=r(518944),N=r(589585);function j(e){var t;const r={groups:[]};if(null===(t=e.scopes)||void 0===t?void 0:t.item){const t=(0,N.l8)(e.scopes.item);t&&(r.groups=(0,M.t)(t,"group.any",[]))}return r}var $=r(685726);const F=(e,t)=>{let r={};((0,a.W)(t,"data.values.capabilities")||[]).forEach((e=>{r[e]=!0}));const n=(0,a.W)(e,"data.settings.features")||{};r=$.c.reduce(((e,t)=>{const r=t.negate?!n[t.feature]:n[t.feature];return Object.assign(Object.assign({},e),{[t.capability]:r})}),r);const i=Object.entries(r).reduce(((e,[t,r])=>(r&&e.push(t),e)),[]);return(0,x.t)("data.values.capabilities",i,e),e};var G=r(521650);const L="Hub Site Application",H="Site Application",B={name:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],legacyCapabilities:["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav","socialSharing"],catalog:{schemaVersion:1},subdomain:"",defaultHostname:"",customHostname:"",clientId:"",map:null,feeds:{},pages:[],theme:null,contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}},telemetry:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,title:"",headerType:"default",menuLinks:[],schemaVersion:3,showTitle:!0}}}}},W={item:{title:"",description:"",snippet:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],properties:{orgUrlKey:"",defaultHostname:"",customHostname:"",clientId:"",subdomain:"",schemaVersion:1.5},url:""},data:{catalog:{groups:[]},feeds:{},values:{title:"",defaultHostname:"",customHostname:"",subdomain:"",faviconUrl:"",uiVersion:"2.4",clientId:"",map:{basemaps:{}},defaultExtent:{},pages:[],theme:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,iframeHeight:"150px",iframeUrl:"",links:[],logoUrl:"",title:"default site",markdown:"",headerType:"default",schemaVersion:3,showLogo:!0,showTitle:!0,logo:{display:{},state:"valid"},shortTitle:"",menuLinks:[],socialLinks:{facebook:{},twitter:{},instagram:{},youtube:{}}}},showEditor:!1},footer:{component:{name:"site-footer",settings:{footerType:"none",markdown:"",schemaVersion:2.1}},showEditor:!1}},contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}}}};async function q(e,t){const r=t.portalSelf,n=(r.urlKey||"").toLowerCase();e.orgUrlKey=n;const i=Object.assign(Object.assign({},B),e);i.type=t.isPortal?H:L,i.subdomain||(i.subdomain=(0,T.l)(i.name)),i.subdomain=await(0,I.Z)(i.subdomain,t),t.isPortal?(0,G.op)(i,t):(i.defaultHostname=`${i.subdomain}-${n}.${(0,C.G)((0,A.g)(t))}`,i.url=`https://${i.customHostname?i.customHostname:i.defaultHostname}`),i.theme||(i.theme=(0,O.$)(r)),i.defaultExtent||(i.defaultExtent=r.defaultExtent),i.culture||(i.culture=r.culture),(0,a.W)(i,"map.basemaps.primary")||(0,x.t)("map.basemaps.primary",r.defaultBasemap,i),(0,a.W)(i,"layout.header.component.settings.title")||(0,x.t)("layout.header.component.settings.title",i.name,i),i.typeKeywords=(0,R.Wb)(i.typeKeywords,i.isDiscussable);const s=new o.c7((0,E.s)());let c=s.entityToStore(i,(0,h.kI)(W));(0,a.W)(c,"data.catalog.scopes")&&(c.data.catalog=j(c.data.catalog)),c=await(0,_.NY)(c,t);const u=await(0,D.j)(c,t);c.data.values.clientId=u[0].clientKey;const l=await(0,_.QB)(c,t);return s.storeToEntity(l,{})}async function V(e,t){var r,n,i,l,d,p;e.orgUrlKey=e.orgUrlKey.toLowerCase(),t.isPortal&&(0,G.op)(e,t),e.typeKeywords=(0,R.Wb)(e.typeKeywords,e.isDiscussable);const m=await(0,s.X)(e.id,t);let f=new o.c7((0,E.s)()).entityToStore(e,m);return null===(n=null===(r=f.data)||void 0===r?void 0:r.values)||void 0===n||delete n.telemetry,null===(l=null===(i=f.item)||void 0===i?void 0:i.properties)||void 0===l||delete l.telemetry,null===(p=null===(d=f.item)||void 0===d?void 0:d.properties)||void 0===p||delete p.slug,t.isPortal||await async function(e,t,r){const n={clientKey:e.data.values.clientId,orgId:r.portalSelf.id,orgTitle:r.portalSelf.name,orgKey:r.portalSelf.urlKey,siteId:e.item.id,siteTitle:e.item.title,sslOnly:!0},i={remove:[],add:[]};["customHostname","defaultHostname"].forEach((r=>{const n=(0,a.W)(t,`data.values.${r}`)||"",s=(0,a.W)(e,`data.values.${r}`)||"";s.toLowerCase()!==n.toLowerCase()&&(i.remove.push(n),i.add.push(s))}));const s=[];return i.add.map((e=>{const t=Object.assign({hostname:e},n);s.push((0,c.j)(t,r))})),i.remove.map((e=>{s.push((0,u.P)(e,r))})),Promise.all(s)}(f,m,t),f.data.catalogV2=e.catalog,f=function(e){const t=(0,h.kI)(e),r={dataset:U.z.DATA,site:U.z.SITES,appAndMap:U.z.APPS_AND_MAPS,document:U.z.DOCUMENTS},n={[U.z.DATA]:"Dataset",[U.z.SITES]:"Site",[U.z.APPS_AND_MAPS]:"App,Map",[U.z.DOCUMENTS]:"Document"},i=(0,S.h)(t).collections.filter((e=>!!r[e.key])).map((e=>{var t;const i=r[e.key],s={hidden:!!(null===(t=e.displayConfig)||void 0===t?void 0:t.hidden),key:i,queryParams:{collection:n[i]}};return e.label&&(s.overrideText=e.label),s}));return t.data.values.searchCategories=i,t}(f),f=function(e,t){const r=(0,h.kI)(e),n=j((0,S.h)(r));return Array.isArray(n.groups)?(r.data.catalog=n,r):(r.data.catalog=(0,h.kI)(t.data.catalog),r)}(f,m),f=F(f,m),Y(await(0,_.QB)(f,t),t)}async function K(e,t){t.isPortal||await(0,P.r)(e,t);const r=Object.assign(Object.assign({},t),{id:e});await(0,n.cl)(r)}async function z(e,t){return Y(await(0,s.X)(e,t),t)}function Y(e,t){const r=function(e){const t=(0,h.kI)(e);return t.data.permissions=t.data.permissions||[],[{prop:"item.properties.contentGroupId",type:"group",permissions:["hub:project:create"]},{prop:"item.owner",type:"user",permissions:["hub:site:delete"]}
12].forEach((e=>{const r=(0,a.W)(t,e.prop);r&&e.permissions.forEach((n=>{t.data.permissions.find((e=>e.permission===n&&e.collaborationId===r))||t.data.permissions.push({permission:n,collaborationType:e.type,collaborationId:r})}))})),t}(e);return function(e,t,r){var n;let i;r.authentication&&(i=r.authentication.token),t=(0,b.k)(e.item,t);const s=(0,m.S)(e.item,r,i);return t.thumbnailUrl=s,t.links=w(e.item,r),t.features=(0,g.U)((null===(n=e.data.settings)||void 0===n?void 0:n.features)||{},y.oj),t.catalog=(0,S.h)(e),t.catalog=(0,f.c)(t.catalog),t.isCatalogV1Enabled=!!e.data.catalog,t}(e,new o.c7((0,E.s)()).storeToEntity(r,{}),t)}async function J(e,t){return Y(await(0,_.UO)(e,t),t)}async function Q(e,t,r){e.type="Web Mapping Application"===e.type?"Hub Site Application":e.type;const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,p.jA)(e),rawResult:e},s=(t=[...t].filter(h.Tw)).map(d.u),o=(0,k.e)("enrichment",s).filter(h.Tw);let c={};
12return o.length&&(c=await(0,l.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,a.W)(c,e.path)})),n.links=w(e,r),n}},27879:(e,t,r)=>{"use strict";r.d(t,{Xm:()=>i,bx:()=>s,oj:()=>n});const n={"hub:site:events":!1,"hub:site:content":!0,"hub:site:discussions":!1,"hub:site:feature:follow":!0,"hub:site:feature:discussions":!0,"hub:feature:ai-assistant":!1},i=[{permission:"hub:site",services:["portal"],licenses:["hub-basic","hub-premium","enterprise-sites"]},{permission:"hub:site:create",dependencies:["hub:site"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:site:view",dependencies:["hub:site"],authenticated:!1},{permission:"hub:site:delete",dependencies:["hub:site"],authenticated:!0,entityDelete:!0},{permission:"hub:site:edit",entityEdit:!0,dependencies:["hub:site"],authenticated:!0},{permission:"hub:site:canChangeAccess",dependencies:["hub:site"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:site:events",dependencies:["hub:site:view"]},{permission:"hub:site:content",dependencies:["hub:site:edit"]},{permission:"hub:site:discussions",dependencies:["hub:site:view"]},{
13permission:"hub:site:feature:discussions",dependencies:["hub:site:view"],entityConfigurable:!0},{permission:"hub:site:feature:follow",dependencies:["hub:site:view"],entityConfigurable:!0},{permission:"hub:site:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:site:workspace:overview",availability:["alpha"],dependencies:["hub:site:workspace","hub:site:view"]},{permission:"hub:site:workspace:dashboard",dependencies:["hub:site:workspace","hub:site:view"]},{permission:"hub:site:workspace:details",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:settings",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:settings:discussions",dependencies:["hub:site:workspace","hub:site:edit"],licenses:["hub-basic","hub-premium"]},{permission:"hub:site:workspace:collaborators",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:catalog",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:catalog:content",dependencies:["hub:site:workspace:catalog"]},{permission:"hub:site:workspace:catalog:events",licenses:["hub-premium"],dependencies:["hub:site:workspace:catalog","hub:event"]},{permission:"hub:site:workspace:catalog:upgrade",dependencies:["hub:site:workspace:catalog"],availability:["flag"]},{permission:"hub:site:workspace:pages",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:events",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:metrics",dependencies:["hub:site:workspace","hub:site:edit"],environments:["devext","qaext"]},{permission:"hub:site:workspace:followers",licenses:["hub-premium"],dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:followers:member",dependencies:["hub:site:workspace:followers"],assertions:[{property:"context:currentUser",type:"is-group-member",value:"entity:followersGroupId"}]},{permission:"hub:site:workspace:followers:manager",dependencies:["hub:site:workspace:followers"],assertions:[{property:"context:currentUser",type:"is-group-admin",value:"entity:followersGroupId"}]},{permission:"hub:site:workspace:followers:create",dependencies:["hub:site:workspace:followers","hub:group:create"],privileges:["portal:user:addExternalMembersToGroup"]},{permission:"hub:site:workspace:projects",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:initiatives",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:manage",dependencies:["hub:site:edit"]},{permission:"hub:site:workspace:feeds",dependencies:["hub:site:workspace","hub:site:edit"],environments:["devext","qaext","production"]},{permission:"hub:site:workspace:assistant",availability:["alpha"],licenses:["hub-premium"],dependencies:["hub:site:workspace","hub:site:edit"],environments:["devext","qaext","production"]},{permission:"hub:site:assistant:access",licenses:["hub-premium"]}],s=["data.values.layout","data.values.theme","data.values.headContent"]},385991:(e,t,r)=>{"use strict";r.d(t,{getSiteSchema:()=>c,r:()=>a});var n=r(989593),i=r(167420),s=r(181794),o=r(496157);
13const a=["hub:site:edit","hub:site:create","hub:site:followers","hub:site:settings","hub:site:assistant","hub:site:settings:discussions"],c=(e,t)=>{const r=s.N.properties,{_slug:a}=r,c=(0,n._T)(r,["_slug"]),u=(0,o.P)("hub:environment:enterprise",t).access?i.nf:i.De;return Object.assign(Object.assign({$async:!0},s.N),{properties:Object.assign(Object.assign({},c),{name:u,_discussions:i.PH,telemetry:i.Vh,_urlInfo:{type:"object",isUniqueDomain:{siteId:e},required:["subdomain"],properties:{subdomain:{type:"string",format:"slug"}}}})})}},914863:(e,t,r)=>{"use strict";r.d(t,{B:()=>a});var n=r(590606),i=r(264263),s=r(94684),o=r(507707);function a(e){if((0,i.W)(e,"item.properties.schemaVersion")>=1.4)return e;const t=(0,o.kI)(e),r=(0,i.W)(t,"data.values.gacode");return t.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(r),id:r}}}},(0,n.f)(t,"data.values.gacode"),(0,s.t)("item.properties.schemaVersion",1.4,t),t}},883126:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(94684),i=r(507707);function s(e){var t;if((null===(t=e.item.properties)||void 0===t?void 0:t.schemaVersion)>=1.6)return e;const r=(0,i.kI)(e);return r.data.values.layout.sections.map((e=>Object.assign(Object.assign({},e),{rows:(e.rows||[]).map((e=>Object.assign(Object.assign({},e),{cards:(e.cards||[]).map((e=>("event-list-card"===e.component.name&&(e.component.settings.displayMode=e.component.settings.calendarEnabled?"calendar":"list",delete e.component.settings.calendarEnabled),e)))})))}))),(0,n.t)("item.properties.schemaVersion",1.6,r),r}},661666:(e,t,r)=>{"use strict";r.d(t,{j:()=>s});var n=r(264263),i=r(507707);function s(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.5)return e;const t=(0,i.kI)(e),r=t.data.values.dcatConfig;return t.data.feeds={},r&&(t.data.feeds.dcatUS11=function(e){let t=JSON.stringify(e);return Object.keys(o).forEach((e=>{const r=o[e];t=t.split(e).join(r)})),JSON.parse(t)}(r)),t.item.properties.schemaVersion=1.5,t}const o={"{{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:[email protected]}}":"{{orgContactEmail || mailto:[email protected]}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"}},649467:(e,t,r)=>{"use strict";r.d(t,{U:()=>s});var n=r(264263),i=r(507707);function s(e){const t=(0,i.kI)(e),r=(0,n.W)(e,"data.values.capabilities");return r&&(t.data.values.capabilities=r.filter((e=>"underlinedLinks"!==e))),t}},836990:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var n=r(264263),i=r(94684),s=r(507707);function o(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.8)return e;const t=(0,s.kI)(e);t.data.telemetry={};const r=((0,n.W)(e,"data.values.capabilities")||[]).includes("consentNotice");t.data.telemetry.consentNotice={allowPrivacyConfig:r,disclaimer:[{text:(0,n.W)(e,"data.values.telemetry.consentNotice.consentText")||"",default:!0}],policyURL:(0,n.W)(e,"data.values.telemetry.consentNotice.policyURL")||""};const o=(0,n.W)(e,"item.properties.telemetry.plugins");return o&&(t.data.telemetry.plugins=o),(0,i.t)("item.properties.schemaVersion",1.8,t),t}},110185:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(264263),i=r(94684),s=r(507707),o=r(990066);function a(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.9)return e;const t=(0,s.kI)(e),r=(0,o.h)(t);return t.data.catalogV2=r,(0,i.t)("item.properties.schemaVersion",1.9,t),t}},685726:(e,t,r)=>{"use strict";r.d(t,{c:()=>n});const n=[{capability:"hideFollow",feature:"hub:site:feature:follow",negate:!0},{capability:"disableDiscussions",feature:"hub:site:feature:discussions",negate:!0}]},923935:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)().filter((e=>"slug"!==e.entityKey));return e.push({entityKey:"feeds",storeKey:"data.feeds"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),["pages","theme","subdomain","defaultHostname","customHostname","clientId","defaultExtent","map","headerSass","headContent","layout","isUmbrella"].forEach((t=>{e.push({entityKey:t,storeKey:`data.values.${t}`})})),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"initiatives",storeKey:"data.initiatives"}),e.push({entityKey:"projects",storeKey:"data.projects"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"followersGroupId",storeKey:"item.properties.followersGroupId"}),e.push({entityKey:"legacyCapabilities",storeKey:"data.values.capabilities"}),e.push({entityKey:"orgUrlKey",storeKey:"item.properties.orgUrlKey"}),e.push({entityKey:"name",storeKey:"item.title"}),e.push({entityKey:"legacyTeams",storeKey:"item.properties.teams"}),e.push({entityKey:"isHubHome",storeKey:"item.properties.isHubHome"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"telemetry",storeKey:"data.telemetry"}),e}},656925:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(264263),i=r(507707);function s(e){if((0,n.W)(e,"data.values.map.basemaps"))return e;if((0,n.W)(e,"data.values.map.baseMapLayers")){const t=(0,i.kI)(e),r=(0,n.W)(e,"data.values.map.baseMapLayers"),s=(0,n.W)(e,"data.values.map.title");return delete t.data.values.map.baseMapLayers,delete t.data.values.map.title,t.data.values.map.basemaps={primary:{baseMapLayers:r,title:s}},t}return e}},166938:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var n=r(264263),i=r(518944);function s(e){const t="Web Mapping Application"===(0,n.W)(e,"item.type"),r=(0,i.t)(e,"item.typeKeywords",[]).includes("hubSite");return t&&r&&(e.item.type="Hub Site Application"),e}},521650:(e,t,r)=>{"use strict";r.d(t,{op:()=>o,wv:()=>s});var n=r(336253);const i="hubsubdomain";function s(e){return`${i}|${e.toLowerCase()}`}const o=(e,t)=>{e.typeKeywords=function(e,t){const r=e.filter((e=>!e.startsWith(`${i}|`)));return r.push([i,t.toLowerCase()].join("|")),r}(e.typeKeywords,e.subdomain),e.url=`${t.authentication.portal.replace("/sharing/rest",n.me)}/#/${e.subdomain}`}},362402:(e,t,r)=>{"use strict";var n;r.d(t,{z:()=>n}),function(e){e.DATA="components.search.category_tabs.data",e.SITES="components.search.category_tabs.sites",e.DOCUMENTS="components.search.category_tabs.documents",e.APPS_AND_MAPS="components.search.category_tabs.apps_and_maps",e.EVENTS="components.search.category_tabs.events",e.INITIATIVES="components.search.category_tabs.initiatives"}(n||(n={}))},769848:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});const n=["dataset","document","site","appAndMap"]},743852:(e,t,r)=>{"use strict";async function n(e){return e.status>
13=200&&e.status<300?e.json():e.json().then((t=>{if(t.error)throw new Error(`${t.error.title} :: ${t.error.detail} :: ${e.status}`);throw new Error(`Got ${e.status} ${e.statusText}`)}))}r.d(t,{a:()=>n})},978489:(e,t,r)=>{"use strict";r.d(t,{z:()=>s});var n=r(507707),i=r(806146);function s(e,t){let r=(0,n.kI)(e),s=63;return t&&(s-=t.length+1),r.length>s&&(r=`${r.slice(0,s-6)}-${(0,i.z)(5)}`),r}},410166:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(264263);function i(e){const t={},r=(0,n.W)(e,"authentication.token");return r&&(t.Authorization=r),t}},774771:(e,t,r)=>{"use strict";function n(e){return`${e||"https://hub.arcgis.com"}/api/v3/domains`}r.d(t,{l:()=>n})},179051:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var n=r(170209),i=r(72090),s=r(521650);function o(e,t){let r=e;e.indexOf("#/")>-1&&(r=e.split("#/")[1]);const o=(0,s.wv)(r),a=Object.assign({q:`typekeywords: ${o}`},t);return(0,n.KT)(a).then((e=>e.results.filter((e=>(0,i.q)(e.typeKeywords,o)))[0])).then((e=>{if(!e)throw new Error("site not found");return{hostname:e.url,siteId:e.id}}))}},161012:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(410166),i=r(774771),s=r(743852);function o(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}`,a=e.siteTitle;return"number"==typeof a&&(e.siteTitle=a.toString()),e.clientKey&&(e.clientKey=""),fetch(o,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(s.a)}},102095:(e,t,r)=>{"use strict";r.d(t,{j:()=>s});var n=r(264263),i=r(161012);function s(e,t){if(t.isPortal)return Promise.resolve([{clientKey:"arcgisonline"}]);{const r=["defaultHostname","customHostname"];return Promise.all(r.reduce(((r,s)=>{const o=(0,n.W)(e,`data.values.${s}`);if(o){const n={hostname:o,clientKey:e.data.values.clientId,orgId:t.portalSelf.id,orgTitle:t.portalSelf.name,orgKey:t.portalSelf.urlKey,siteId:e.item.id,siteTitle:e.item.title,sslOnly:!0};r.push((0,i.j)(n,t))}return r}),[]))}}},635169:(e,t,r)=>{"use strict";r.d(t,{j:()=>i});var n=r(179051);function i(e,t){return(0,n.f)(e,t).then((e=>!0)).catch((e=>!1))}},246107:(e,t,r)=>{"use strict";r.d(t,{B:()=>o});var n=r(774771),i=r(410166),s=r(665688);function o(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=(0,s.G)(e);const r=`${(0,n.l)(t.hubApiUrl)}/${e}`,o=(0,i.i)(t);return fetch(r,{method:"GET",headers:o,mode:"cors"}).then((e=>404!==e.status))}},657603:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(488623),i=r(702700),s=r(978489),o=r(665688),a=r(641675);function c(e,t){let r;if(t.isPortal)r=(0,n.g)(e,t);else{const n=`${t.portalSelf.urlKey}.${(0,o.G)((0,a.g)(t))}`;r=(0,i.Q)(e,n,t)}return r.then((e=>(0,s.z)(e,t.portalSelf.urlKey)))}},488623:(e,t,r)=>{"use strict";r.d(t,{g:()=>i});var n=r(635169);function i(e,t,r=0){let s=e;return r&&(s=e+"-"+r),(0,n.j)(s,t).then((n=>n?i(e,t,r+1):s))}},702700:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});var n=r(246107);function i(e,t,r,s=0){let o=e;s&&(o=e+"-"+s);const a=`${o}-${t}`;return(0,n.B)(a,r).then((n=>n?i(e,t,r,s+1):o))}},788210:(e,t,r)=>{"use strict";r.d(t,{ah:()=>n.a,zY:()=>S.z,i7:()=>i.i,lf:()=>s.l,fU:()=>o.f,jc:()=>a.j,jS:()=>T.j,B$:()=>c.B,jZ:()=>u.j,Zo:()=>E.Z,Y0:()=>l,Ql:()=>d.Q,g9:()=>p.g,d$:()=>m,q$:()=>g,hS:()=>y,FC:()=>f.F,$Z:()=>b.$,Pi:()=>I.P,r1:()=>v.r,gK:()=>w});var n=r(743852),i=r(410166),s=r(774771),o=r(179051),a=r(161012),c=r(246107),u=r(635169);function l(e,t){if(t.isPortal)return Promise.resolve([]);const r=`${(0,s.l)(t.hubApiUrl)}?siteId=${e}`,o=(0,i.i)(t);return fetch(r,{method:"GET",headers:o,mode:"cors"}).then(n.a).catch((e=>{throw Error(`Error in getDomainsForSite ${e}`)}))}var d=r(702700),p=r(488623),h=r(526462);function m(e){return!(0,h.k)(e.siteId)}var f=r(3861);function g(e,t,r){return(0,f.F)(e,r).then((e=>e.siteId!==t)).catch((()=>!1))}function y(e,t){if(t.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");const r=`${(0,s.l)(t.hubApiUrl)}/validate?hostname=${e}`,n=(0,i.i)(t);return fetch(r,{method:"GET",headers:n,mode:"cors"}).then((e=>e.json())).catch((t=>({success:!1,input:e,error:{code:400,detail:t,message:"lookupFailed"}})))}var b=r(930041),v=r(737823);function w(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,i.i)(t);r["Content-Type"]="application/json";const o=`${(0,s.l)(t.hubApiUrl)}/${e.id}`,a=e.siteTitle;return"number"==typeof a&&(e.siteTitle=a.toString()),e.clientKey&&(e.clientKey=""),fetch(o,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(n.a)}
13var S=r(978489),E=r(657603),T=r(102095),I=r(388746)},3861:(e,t,r)=>{"use strict";r.d(t,{F:()=>a});var n=r(179051),i=r(774771),s=r(410166),o=r(743852);function a(e,t){if(t.isPortal)return(0,n.f)(e,t);{const r=`${(0,i.l)(t.hubApiUrl)}/${e}`,n=(0,s.i)(t);return fetch(r,{method:"GET",headers:n,mode:"cors"}).then(o.a)}}},930041:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(410166),i=r(774771),s=r(743852);function o(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}/${e}`;return fetch(o,{method:"DELETE",headers:r,mode:"cors"}).then(s.a)}},737823:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(410166),i=r(774771),s=r(743852);function o(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}/?siteId=${e}`;return fetch(o,{method:"DELETE",headers:r,mode:"cors"}).then(s.a)}},388746:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(3861),i=r(930041),s=r(264263);async function o(e,t){if(t.isPortal)throw new Error("removeDomainByHostname is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");try{const r=await(0,n.F)(e,t),o=(0,s.W)(r,"id");o&&await(0,i.$)(o,t)}catch(t){throw new Error(`Error removing domain entry for ${e}: ${t}`)}}},381445:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(183530);function i(e,t){return(0,n.P)(e,{},t)}},202784:(e,t,r)=>{"use strict";r.d(t,{E:()=>s,_:()=>i});var n=r(615338);function i(e,t,r){if("dcat-us"===t)return function(e,t){if("1"===(0,n.X)(t))return e.data.feeds.dcatUS1X||e.data.feeds.dcatUS11;throw new Error("Unsupported DCAT US version")}(e,r);if("dcat-ap"===t)return function(e,t){if("2"===(0,n.X)(t))return e.data.feeds.dcatAP2XX||e.data.feeds.dcatAP201;throw new Error("Unsupported DCAT AP version")}(e,r);if("rss"===t)return function(e,t){if("2"===(0,n.X)(t))return e.data.feeds.rss2;throw new Error("Unsupported RSS version")}(e,r);throw new Error("Unsupported feed format")}function s(e,t,r,i){if("dcat-us"!==t)if("dcat-ap"!==t){if("rss"!==t)throw new Error("Unsupported feed format");!function(e,t,r){if("2"!==(0,n.X)(t))throw new Error("Unsupported RSS Version");e.data.feeds.rss2=r}(e,r,i)}else!function(e,t,r){if("2"!==(0,n.X)(t))throw new Error("Unsupported DCAT AP Version");e.data.feeds.dcatAP2XX=r}(e,r,i);else!function(e,t,r){if("1"!==(0,n.X)(t))throw new Error("Unsupported DCAT US Version");e.data.feeds.dcatUS1X=r}(e,r,i)}},615338:(e,t,r)=>{"use strict";function n(e){return e.split(".")[0]}r.d(t,{X:()=>n})},245591:(e,t,r)=>{"use strict";r.d(t,{d:()=>u});var n=r(507707),i=r(615338);const s={title:"{{name}}",description:"{{description}}",keyword:"{{tags}}",issued:"{{created:toISO}}",modified:"{{modified:toISO}}",publisher:{name:"{{source}}"},contactPoint:{fn:"{{owner}}",hasEmail:"{{orgContactEmail}}"},spatial:"{{extent:computeSpatialProperty}}"},o={"dct:title":"{{ name}}","dct:description":"{{ description}}","dct:issued":{"@value":"{{ metadata.metadata.dataIdInfo.idCitation.date.pubDate:toISO || metadata.metadata.dataIdInfo.idCitation.date.createDate:toISO || created:toISO }}","@type":"xsd:dateTime"}},a={"dct:title":"{{name}}","dct:description":"{{description}}","dcat:contactPoint":{"vcard:fn":"{{owner}}","vcard:hasEmail":"{{orgContactEmail}}"}},c={channel:{title:"{{name}}",description:"{{searchDescription}}",link:"{{siteUrl}}",language:"{{culture}}",category:"{{categories}}",item:{title:"{{name}}",description:"{{searchDescription}}",author:"{{orgContactEmail}}",category:"{{categories}}",pubDate:"{{created:toUTC}}"}}};function u(e){const{feedsConfig:t,format:r,version:u}=e;let l;if("dcat-us"===r)l=function(e,t){if("1"===(0,i.X)(t)){const t=e.dcatUS1X||e.dcatUS11;return t&&"string"==typeof t.spatial&&"{{extent}}"===t.spatial.replace(/\s/g,"")&&(t.spatial="{{extent:computeSpatialProperty}}"),t}if("3"===(0,i.X)(t))return e.dcatUS3X;throw new Error("Unsupported DCAT US version")}(t,u);else if("dcat-ap"===r)l=function(e,t){if("2"===(0,i.X)(t))return e.dcatAP2XX||e.dcatAP201;throw new Error("Unsupported DCAT AP version")}(t,u);else{if("rss"!==r)throw new Error("Unsupported feed format");l=function(e,t){if("2"===(0,i.X)(t))return e.rss2;throw new Error("Unsupported RSS version")}(t,u)}return l||function(e,t){const r=(0,i.X)(t),u={"dcat-us":{1:s,3:o},"dcat-ap":{2:a},rss:{2:c}};return(0,n.kI)(u[e][r])}(r,u)}},826487:(e,t,r)=>{"use strict";async function n(e){const{format:t,version:r,previewHubId:n,context:i}=e,s=JSON.stringify(e.previewTemplate),o=`${i.hubUrl}/api/feed/${t}/${r}`,a=new URLSearchParams;a.set("id",n);const c="rss"===t;
13a.set(c?"rssConfig":"dcatConfig",s);const u=await fetch(`${o}?${a.toString()}`);if(!u.ok)throw new Error(`Failed to preview feed: ${u.statusText}`);let l;if(c){const e=await u.text();l=decodeURIComponent(e)}else{const e=await u.json();l=JSON.stringify(e,null,2)}return l}r.d(t,{x:()=>n})},847944:(e,t,r)=>{"use strict";r.d(t,{K:()=>s});var n=r(507707),i=r(615338);function s(e){const{feedsConfig:t,format:r,version:s,updatedTemplate:o}=e,a=(0,n.kI)(t);if("dcat-us"===r)!function(e,t,r){if("1"!==(0,i.X)(t)){if("3"!==(0,i.X)(t))throw new Error("Unsupported DCAT US Version");e.dcatUS3X=r}else e.dcatUS1X=r}(a,s,o);else if("dcat-ap"===r)!function(e,t,r){if("2"!==(0,i.X)(t))throw new Error("Unsupported DCAT AP Version");e.dcatAP2XX=r}(a,s,o);else{if("rss"!==r)throw new Error("Unsupported feed format");!function(e,t,r){if("2"!==(0,i.X)(t))throw new Error("Unsupported RSS Version");e.rss2=r}(a,s,o)}return a}},32269:()=>{},929492:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(665688),i=r(526462),s=r(3861),o=r(674188);function a(e,t){let r;if((0,i.k)(e))r=(0,o.D)(e,t);else{let i=e;i=(0,n.G)(i),i=i.split("/")[0],r=(0,s.F)(i,t).then((({siteId:e})=>(0,o.D)(e,t)))}return r}},990066:(e,t,r)=>{"use strict";r.d(t,{h:()=>u});var n=r(507707),i=r(518944),s=r(719271),o=r(264263),a=r(94684),c=r(307515);function u(e){if(e.data.catalogV2)return e.data.catalogV2;let t=(0,n.kI)(e);return t=function(e){const t=(0,i.t)(e,"data.catalog",{});if(!t.schemaVersion){const r=(0,n.kI)(e);r.data.catalog=(0,s.c)(t);const i=r.data.catalog;return(0,o.W)(r,"data.values.isUmbrella")&&(i.scopes.item.filters=[{predicates:[{openData:!0}]}],i.scopes={item:i.scopes.item}),i.title="Default Site Catalog",r}return e}(t),t=function(e){const t=(0,i.t)(e.data,"values.searchCategories",void 0),r=(0,c.n)(t);return(0,o.W)(e,"data.values.isUmbrella")&&r.forEach((e=>{e.displayConfig.hidden=!1})),(0,a.t)("data.catalog.collections",r,e),e}(t),t.data.catalog}},674188:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(719339),i=r(405066);function s(e,t){return(0,n.PD)(e,t).then(i.d)}},327968:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DEFAULT_THEME:()=>b.t,ENTERPRISE_SITE_ITEM_TYPE:()=>g.TX,HUB_SITE_ITEM_TYPE:()=>g.qf,HubSite:()=>f.g,SITE_SCHEMA_VERSION:()=>y.w,_checkStatusAndParseJson:()=>d.ah,_ensureSafeDomainLength:()=>d.zY,_ensureTelemetry:()=>n.B,_getAuthHeader:()=>d.i7,_getDomainServiceUrl:()=>d.lf,_lookupPortal:()=>d.fU,_migrateEventListCardConfigs:()=>s.D,_migrateFeedConfig:()=>i.j,_migrateLinkUnderlinesCapability:()=>c.U,_migrateTelemetryConfig:()=>o.h,_migrateToV2Catalog:()=>l.k,addDomain:()=>d.jc,addSiteDomains:()=>d.jS,buildDraft:()=>p.n,convertItemToSite:()=>g.cC,convertModelToSite:()=>g.EP,createSite:()=>g.UW,defaultSiteCollectionKeys:()=>_.b,deleteSite:()=>g.xb,domainExists:()=>d.B$,domainExistsPortal:()=>d.jZ,enrichSiteSearchResult:()=>g.nK,ensureUniqueDomainName:()=>d.Zo,fetchSite:()=>g.IN,fetchSiteModel:()=>h.X,getCatalogFromSiteModel:()=>O.h,getDomainsForSite:()=>d.Y0,getFeedConfiguration:()=>w._,getFeedTemplate:()=>E.d,getOrgDefaultTheme:()=>b.$,getSiteById:()=>m.D,getUniqueDomainName:()=>d.Ql,getUniqueDomainNamePortal:()=>d.g9,isDomainForLegacySite:()=>d.d$,isDomainUsedElsewhere:()=>d.q$,isValidDomain:()=>d.hS,lookupDomain:()=>d.FC,migrateBadBasemap:()=>a.G,migrateWebMappingApplicationSites:()=>u.N,previewFeed:()=>I.x,reharvestSiteCatalog:()=>S.m,removeDomain:()=>d.$Z,removeDomainByHostname:()=>d.Pi,removeDomainsBySiteId:()=>d.r1,searchCategoriesToCollections:()=>D.n,setFeedConfiguration:()=>w.E,setFeedTemplate:()=>T.K,updateDomain:()=>d.gK,updateSite:()=>g.L3,upgradeSiteSchema:()=>v.d});var n=r(914863),i=r(661666),s=r(883126),o=r(836990),a=r(656925),c=r(649467),u=r(166938),l=r(110185),d=r(788210),p=r(381445),h=r(929492),m=r(674188),f=r(213630),g=r(29258),y=r(597793),b=r(941645),v=r(405066),w=r(202784),S=r(761836),E=r(245591),T=r(847944),I=r(826487),C=r(32269),A={};for(const e in C)["default","defaultSiteCollectionKeys","_ensureTelemetry","_migrateFeedConfig","_migrateEventListCardConfigs","_migrateTelemetryConfig","migrateBadBasemap","_migrateLinkUnderlinesCapability","migrateWebMappingApplicationSites","_migrateToV2Catalog","_checkStatusAndParseJson","_ensureSafeDomainLength","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","addDomain","addSiteDomains","domainExists","domainExistsPortal","ensureUniqueDomainName","getDomainsForSite","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
13isValidDomain","lookupDomain","removeDomain","removeDomainByHostname","removeDomainsBySiteId","updateDomain","buildDraft","fetchSiteModel","getSiteById","HubSite","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","convertItemToSite","convertModelToSite","createSite","deleteSite","enrichSiteSearchResult","fetchSite","updateSite","SITE_SCHEMA_VERSION","DEFAULT_THEME","getOrgDefaultTheme","upgradeSiteSchema","getFeedConfiguration","setFeedConfiguration","reharvestSiteCatalog","getFeedTemplate","setFeedTemplate","previewFeed"].indexOf(e)<0&&(A[e]=()=>C[e]);r.d(t,A);var O=r(990066),_=r(769848),D=r(307515)},761836:(e,t,r)=>{"use strict";async function n(e,t){const r=`${t.hubUrl}/api/v3/jobs/site/${e}/harvest`,n={method:"POST",headers:{"content-type":"application/json",authorization:t.hubRequestOptions.authentication.token}};return fetch(r,n).then((e=>e.json())).then((e=>{const t={};return e.groups&&(t.groups=e.groups),e.message&&(t.error=e),t}))}r.d(t,{m:()=>n})},307515:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var n=r(362402),i=r(769848);function s(e){const t=i.b.reduce(((e,t)=>{const r="appAndMap"===t?[{type:{any:["$app","$map"]}}]:[{type:{any:[`$${t}`]}}];return e[t]={label:null,key:t,include:[],targetEntity:"item",scope:{targetEntity:"item",filters:[{predicates:r}]},displayConfig:{hidden:!1}},e}),{}),r={[n.z.DATA]:"dataset",[n.z.INITIATIVES]:"site",[n.z.SITES]:"site",[n.z.DOCUMENTS]:"document",[n.z.APPS_AND_MAPS]:"appAndMap"},s=[{key:n.z.SITES,hidden:!0},{key:n.z.DATA},{key:n.z.DOCUMENTS},{key:n.z.APPS_AND_MAPS}];return(e||s).filter((e=>e.key!==n.z.EVENTS)).filter((e=>!!r[e.key])).map((e=>{const n=r[e.key],i=t[n];return i.label=e.overrideText||null,i.displayConfig.hidden=!!e.hidden,i}))}},597793:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});const n=1.9},941645:(e,t,r)=>{"use strict";r.d(t,{$:()=>a,t:()=>o});var n=r(264263),i=r(157093),s=r(507707);const o={header:{background:"#fff",text:"#4c4c4c"},body:{background:"#fff",text:"#4c4c4c",link:"#0079c1"},button:{background:"#0079c1",text:"#fff"},logo:{small:""},fonts:{base:{url:"",family:"Avenir Next"},heading:{url:"",family:"Avenir Next"}}};function a(e){let t=(0,s.kI)(o),r=(0,n.W)(e,"portalProperties.sharedTheme");return r&&(r=(0,i.t)(r),t=(0,s.l7)(t,r)),t}},405066:(e,t,r)=>{"use strict";r.d(t,{d:()=>v});var n=r(264263),i=r(597793),s=r(507707),o=r(526462),a=r(914863),c=r(661666),u=r(883126),l=r(94684),d=r(685726);const p=e=>{const t={};let r={};((0,n.W)(e,"data.values.capabilities")||[]).forEach((e=>{t[e]=!0}));const i=(0,n.W)(e,"data.settings.features")||{};return r=d.c.reduce(((e,r)=>{const n=r.negate?!t[r.capability]:t[r.capability];return Object.assign(Object.assign({},e),{[r.feature]:n})}),i),(0,l.t)("data.settings.features",r,e),e};var h=r(836990),m=r(656925),f=r(166938),g=r(649467),y=r(110185),b=r(972551);function v(e){return(0,n.W)(e,"item.properties.schemaVersion")!==i.w&&(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.3)return e;const t=(0,s.kI)(e),r=(0,n.W)(t,"data.catalog.groups")||[];return t.data.catalog.groups=r.filter(o.k),t.item.properties.schemaVersion=1.3,t}(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.2)return e;const t=(0,s.kI)(e),r=(0,n.W)(t,"data.catalog")||{};return(0,n.W)(t,"data.values.groups")&&(r.groups=(0,s.kI)(t.data.values.groups),delete t.data.values.groups),t.data.catalog=r,t.item.properties.schemaVersion=1.2,t}(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.1)return e;const t=(0,s.kI)(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach((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((0,n.W)(e,"item.properties.schemaVersion")>=1)return e;const t=(0,s.kI)(e);if(["groupId","title"].forEach((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)){const e=t.data.values.groups.map((e=>"object"==typeof e?e.id:e)).filter((e=>!!e));t.data.values.groups=e}return t}(e)))),e=(0,a.B)(e),e=(0,c.j)(e),e=(0,u.D)(e),e=p(e),e=(0,h.h)(e),e=(0,y.k)(e)),e=function(e){if((0,n.W)(e,"data.telemetry"))return e;const t=(0,s.kI)(e);return t.data.telemetry={},t}(e=(0,m.G)(e)),e=(0,f.N)(e),function(e){const t=(0,s.kI)(e),r=t.item.properties.slug||"",n=t.item.properties.orgUrlKey||"",i=(0,b.P)(r,n,t.item.typeKeywords);return i.slug&&(t.item.properties.slug=i.slug),i.orgUrlKey&&(t.item.properties.orgUrlKey=i.orgUrlKey),t.item.typeKeywords=i.typeKeywords,t}(e=(0,g.U)(e))}},863887:(e,t,r)=>{"use strict";r.d(t,{Pc:()=>n.P,Zj:()=>i,NL:()=>s,MH:()=>o.M,Rz:()=>a.R,mJ:()=>c.m,mv:()=>u.m,nd:()=>l.n});var n=r(279433);function i(e,t){return`${t.survey123Url}/surveys/${e}?portalUrl=${encodeURIComponent(t.portalUrl)}`}function s(e,t){return`${t.survey123Url}/share/${e}?portalUrl=${encodeURIComponent(t.portalUrl)}`}var o=r(13095),a=r(911378),c=r(163698),u=r(73414),l=r(255616)},279433:(e,t,r)=>{"use strict";r.d(t,{P:()=>i});var n=r(170209);const i=(e,t)=>(0,n.oO)(Object.assign({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t}))},13095:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(170209);const i=(e,t)=>(0,n.oO)(Object.assign({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t}))},911378:(e,t,r)=>{"use strict";r.d(t,{R:()=>i});var n=r(170209);const i=(e,t)=>(0,n.oO)(Object.assign({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t}))},163698:(e,t,r)=>{"use strict";r.d(t,{m:()=>c});var n=r(170209),i=r(279433),s=r(13095),o=r(911378),a=r(255616);const c=(e,t)=>{let r,c;return("string"==typeof e?(0,n.rV)(e,t):Promise.resolve(e)).then((e=>{const n=[(0,i.P)(e.id,t),(0,o.R)(e.id,t)];return Promise.all(n).then((([e,n])=>(c=n,e&&(0,a.n)(e.item)?(r=e,(0,s.M)(r.item.id,t)):e))).then((t=>({form:{item:e},featureService:t,fieldworker:r,stakeholder:c})))}
13))}},73414:(e,t,r)=>{"use strict";function n(e){return e.typeKeywords.indexOf("Draft")>-1}r.d(t,{m:()=>n})},255616:(e,t,r)=>{"use strict";function n(e){const t=t=>e.typeKeywords.indexOf(t)>-1;let r=t("FieldworkerView");return r||(r=["Survey123","Feature Service","View Service"].every(t)&&!t("StakeholderView")),r}r.d(t,{n:()=>n})},202773:(e,t,r)=>{"use strict";r.d(t,{P:()=>p});var n=r(2166),i=r(110571);const s={schemaVersion:1,catalog:{schemaVersion:0},name:"",tags:[],typeKeywords:["Solution"],view:{},permissions:[],features:r(447465).E};var o=r(201091),a=r(874761),c=r(358637),u=r(507707),l=r(94684),d=r(370427);class p extends i.x{constructor(e,t){super(e,t)}static fromJson(e,t){const r=this.applyDefaults(e,t);return new p(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=p.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.Dv)(e,t.requestOptions);return p.fromJson(r,t)}catch(t){throw"CONT_0001: Item does not exist or is inaccessible."===t.message?new Error(`Template ${e} not found.`):t}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),e.orgUrlKey=e.orgUrlKey.toLowerCase(),Object.assign(Object.assign({},s),e)}async getEditorConfig(e,t){return(0,n.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,c.t)((0,u.kI)(this.entity),t,this.context.hubRequestOptions):(0,u.kI)(this.entity)}async fromEditor(e){const t=await(0,d.E)(e,this.context);return Object.entries(t).forEach((([e,t])=>{(0,l.t)(e,t,this)})),await this.save(),this.entity}update(e){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.entity=this.entity.id?await(0,o.QB)(this.entity,this.context.userRequestOptions):await(0,o.Mn)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.isDestroyed=!0,await(0,o.Xc)(this.entity.id,this.context.userRequestOptions)}}},447465:(e,t,r)=>{"use strict";r.d(t,{E:()=>n,i:()=>i});const n={},i=[{permission:"hub:template",services:["portal"]},{permission:"hub:template:create",dependencies:["hub:template"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:template:delete",dependencies:["hub:template"],authenticated:!0,entityDelete:!0},{permission:"hub:template:view",dependencies:["hub:template"]},{permission:"hub:template:view:related",dependencies:["hub:template:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:template:edit",dependencies:["hub:template"],authenticated:!0,entityEdit:!0},{permission:"hub:template:manage",dependencies:["hub:template:edit"]},{permission:"hub:template:canChangeAccess",dependencies:["hub:template"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:template:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:template:workspace:details",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:dashboard",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:collaborators",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:settings",dependencies:["hub:template:workspace","hub:template:manage"]}]},119425:(e,t,r)=>{"use strict";r.d(t,{I:()=>i,TemplateSchema:()=>s});var n=r(181794);const i=["hub:template:edit"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{previewUrl:{type:"string",if:{minLength:1},then:{format:"url"}}})})},295562:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(853719);function i(e,t){var r;const i=(0,n.g)(e,t),s=null===(r=e.typeKeywords)||void 0===r?void 0:r.includes("Deployed"),{self:o,siteRelative:a,workspaceRelative:c}=i,u=`${a.split("/").slice(0,-1).join("/")}/edit/advanced`;return Object.assign(Object.assign({},i),{workspaceRelative:s?o:c,advancedEditRelative:u})}},969835:(e,t,r)=>{"use strict";r.d(t,{F:()=>u});
13var n=r(398195),i=r(447465),s=r(295562),o=r(264263),a=r(221821),c=r(471934);function u(e,t,r){return(t=(0,c.k)(e.item,t)).links=(0,s.E)(e.item,r),t.thumbnailUrl=t.links.thumbnail,t.features=(0,n.U)((0,o.W)(e,"data.settings.features")||{},i.E),t.isDeployed=((0,o.W)(e,"item.typeKeywords")||[]).includes("Deployed"),t.deployedType=(0,a.Z)(e.item),t}},730927:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(752438);function i(){const e=(0,n.f)();return e.push({entityKey:"previewUrl",storeKey:"item.properties.previewUrl"}),e}},201091:(e,t,r)=>{"use strict";r.d(t,{Mn:()=>d,OH:()=>h,QB:()=>p,Xc:()=>m});var n=r(822409),i=r(572269),s=r(507707),o=r(719339),a=r(730927),c=r(969835),u=r(170209),l=r(393960);function d(e,t){throw new Error("Template creation is not currently supported from the context of Hub")}async function p(e,t){await(0,l.E)(e,t),e.typeKeywords=(0,n.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,o.PD)(e.id,t),s=new i.c7((0,a.s)()),u=s.entityToStore(e,r),d=await(0,o.QB)(u,t),p=s.storeToEntity(d,e);return e=(0,c.F)(r,p,t),p}function h(e,t){const r=(0,s.kI)(e);return r.orgUrlKey=e.orgUrlKey?e.orgUrlKey:t.urlKey,r.orgUrlKey=r.orgUrlKey.toLowerCase(),r}async function m(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,u.cl)(r)}},874761:(e,t,r)=>{"use strict";r.d(t,{Dv:()=>v,Gb:()=>S,xe:()=>w});var n=r(526462),i=r(40180),s=r(170209),o=r(427033),a=r(719339),c=r(572269),u=r(730927),l=r(969835),d=r(704059),p=r(507707),h=r(348157),m=r(248849),f=r(264263),g=r(295562),y=r(221821),b=r(371740);async function v(e,t){let r;return r=(0,n.k)(e)?(0,s.rV)(e,t):(0,o.QR)(e,t),r.then((e=>e?w(e,t):null))}async function w(e,t){const r=await(0,a.UO)(e,t),n=new c.c7((0,u.s)()).storeToEntity(r,{});return(0,l.F)(r,n,t)}async function S(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,d._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,b.jA)(e),rawResult:e},s=(t=[...t].filter(p.Tw)).map(h.u),o=(0,i.e)("enrichment",s).filter(p.Tw);let a={};
13return o.length&&(a=await(0,m.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,f.W)(a,e.path)})),n.links=(0,g.E)(e,r),n.deployedType=(0,y.Z)(e),n}},193479:(e,t,r)=>{"use strict";r.d(t,{Pp:()=>n.P,xe:()=>l.xe,Mn:()=>d.Mn,Xc:()=>d.Xc,OH:()=>d.OH,Gb:()=>l.Gb,Dv:()=>l.Dv,ZU:()=>c,ek:()=>a,QB:()=>d.QB});var n=r(202773),i=r(704059),s=r(371740),o=r(878187);const a=(e,t,r)=>{const{actionLinks:n=[],baseUrl:i="",locale:s="en-US",target:a="self"}=r||{},c=(0,o.m)(e,t,a,i);return Object.assign(Object.assign(Object.assign({},u(e,s)),{actionLinks:n,titleUrl:c}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},c=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:i="en-US",target:s="self"}=t||{},a=(0,o.D)(e,s,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u(e,i)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},u=(e,t)=>{var r,n;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(n=e.categories)||void 0===n?void 0:n.length)?[{i18nKey:"categories",value:(0,s.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,i._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}};var l=r(874761),d=r(201091)},221821:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(432645),i=r(507707);const s=e=>{let t="Solution";const r=e.typeKeywords.find((e=>e.startsWith("hubSolutionType|")));if(r){const e=r.split("|")[1];t=(0,n.H)(e).split("-").map((e=>(0,i.kC)(e))).join(" ");const s={storyMap:"StoryMap"};s[e]&&(t=s[e])}return t}},72418:()=>{},831600:()=>{},561322:()=>{},771829:()=>{},893273:()=>{},557877:()=>{},668115:(e,t,r)=>{"use strict";r.r(t);var n=r(72418),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(831600);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(561322);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(771829);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(893273);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(557877);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i)},670452:(e,t,r)=>{"use strict";function n(e){let t;return/(qaext|\.mapsqa)\.arcgis.com/.exec(e)?t="https://hubqa.arcgis.com":/(devext|\.mapsdevext)\.arcgis.com/.exec(e)?t="https://hubdev.arcgis.com":/(www|\.maps)\.arcgis.com/.exec(e)&&(t="https://hub.arcgis.com"),t}r.d(t,{k:()=>n})},5828:(e,t,r)=>{"use strict";function n(e){const{host:t,path:r,query:n}=e,i=t.endsWith("/")?t:`${t}/`,s=new URL(r,i);return s.search=function(e={}){const t=Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,r)=>(t[r]=e[r],t)),{});return new URLSearchParams(t).toString()}(n),s.toString()}r.d(t,{Q:()=>n})},309833:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(e,t="v")=>{if(!e)return e;const r=e.indexOf("?")>-1?"&":"?";return e+`${r}${t}=${(new Date).getTime()}`}},658202:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var n=r(153105),i=r(336253);function s(e,t){const r=(0,n.a)(t);let s;s=/(devext|mapsdevext)\.arcgis\.com/.test(r)?"https://hubdevcdn.arcgis.com/opendata-ui/assets":/(qaext|mapsqa)\.arcgis\.com/.test(r)?"https://hubqacdn.arcgis.com/opendata-ui/assets":/(www|maps)\.arcgis\.com/.test(r)?"https://hubcdn.arcgis.com/opendata-ui/assets":`${r}${i.me}`;const o=e.startsWith("/")?"":"/";return[s,e].join(o)}},675404:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(153105),i=r(163086),s=r(336253);function o(e){if(e.isPortal)return`${(0,n.a)(e)}${s.me}`;{const t=e.portalHostname.split(".")[0];return`${i.P[t]||i.P.www}/opendata-ui/assets`}}},6194:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(737720);const i=(e,t,r)=>{const{id:i,access:s}=e,o=`${(0,n.i)(t)}/content/items/${i}`,a=new URLSearchParams({f:"json"});return"public"!==s&&r&&a.append("token",r),`${o}?${a.toString()}`}},354695:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(6194);const i=(e,t,r)=>{const i=(0,n.p)(e,t,r),s=`\\/${e.id}\\?f=json`,o=new RegExp(s);return i&&i.replace(o,`/${e.id}/data`).replace(/&token/,"?token")}},403555:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(153105);function i(e,t){return`${(0,n.a)(t)}/home/item.html?id=${e}`}},737720:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(153105);function i(e){return`${(0,n.a)(e)}/sharing/rest`}},153105:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(170209);function i(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){const t=e.portalSelf||e,{portalHostname:r,urlKey:n,customBaseUrl:i}=t;if(r||n&&i)return t.isPortal?`https://${t.portalHostname}`:`https://${t.urlKey}.${t.customBaseUrl}`}return i((0,n.al)(e))}},878187:(e,t,r)=>{"use strict";function n(e,t,r){var n,i,s,o,a,c;let u;return u="event"===t?"#":"none"===t?void 0:"Hub Site Application"===e.type?null===(c=e.links)||void 0===c?void 0:c.self:{self:null===(n=e.links)||void 0===n?void 0:n.self,siteRelative:r?`${r}${(null===(i=e.links)||void 0===i?void 0:i.siteRelative)||""}`:null===(s=e.links)||void 0===s?void 0:s.siteRelative,workspaceRelative:r?`${r}${(null===(o=e.links)||void 0===o?void 0:o.workspaceRelative)||""}`:null===(a=e.links)||void 0===a?void 0:a.workspaceRelative}[t],u}function i(e,t,r,n){var i,s,o,a,c,u;let l;return l="event"===r?"#":"none"===r?void 0:"Hub Site Application"===e.type?null===(u=e.links)||void 0===u?void 0:u.self:{self:null===(i=e.links)||void 0===i?void 0:i.self,siteRelative:n?`${n}${(null===(s=e.links)||void 0===s?void 0:s.siteRelative)||""}`:null===(o=e.links)||void 0===o?void 0:o.siteRelative,workspaceRelative:n?`${n}${(null===(a=e.links)||void 0===a?void 0:a.workspaceRelative)||""}`:null===(c=e.links)||void 0===c?void 0:c.workspaceRelative}[r],l}r.d(t,{D:()=>n,m:()=>i})},268304:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(153105);function i(e,t){return`${(0,n.a)(t)}/home/group.html?id=${e}`}},20837:(e,t,r)=>{"use strict";function n(e){let t;return/(qaext|\.mapsqa)\.arcgis.com/.exec(e)?t="https://hubqa.arcgis.com":/(devext|\.mapsdevext)\.arcgis.com/.exec(e)?t="https://hubdev.arcgis.com":/(www|\.maps)\.arcgis.com/.exec(e)&&(t="https://hub.arcgis.com"),t}r.d(t,{G:()=>n})},974195:(e,t,r)=>{"use strict";function n(e){let t=e.split("/sharing/rest")[0];return/(qaext|\.mapsqa)\.arcgis.com/.exec(e)?t="https://qaext.arcgis.com":/(devext|\.mapsdevext)\.arcgis.com/.exec(e)?t="https://devext.arcgis.com":/(www|\.maps)\.arcgis.com/.exec(e)&&(t="https://www.arcgis.com"),t}r.d(t,{D:()=>n})},977680:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(153105);function i(e,t){return`${(0,n.a)(t)}/home/user.html?user=${e}`}},163086:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n={devext:"https://hubdevcdn.arcgis.com",qaext:"https://hubqacdn.arcgis.com",www:"https://hubcdn.arcgis.com"}},713417:(e,t,r)=>{"use strict";r.d(t,{PF:()=>c.P,mT:()=>d,G:()=>p,Q2:()=>i.Q,ZP:()=>x.Z,wV:()=>v,CX:()=>O,dW:()=>R.d,gp:()=>E,tV:()=>T.t,GG:()=>w.G,dD:()=>f,ls:()=>s.l,Vb:()=>m,pK:()=>y.p,mP:()=>b.m,$:()=>g.$,ik:()=>o.i,Dw:()=>S.D,al:()=>a.a,Gb:()=>j,n5:()=>I.n,eH:()=>U.e,TD:()=>N,v8:()=>k,G1:()=>l.G,Ue:()=>u});
13var n=r(507707),i=r(5828),s=r(675404),o=r(737720),a=r(153105),c=r(163086);function u(e){return-1===e.indexOf("http")?`https://${e}`:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e}var l=r(665688);function d(e){if(!e)return[];const t=e.replace(/^http(s?):\/\//,"");return[`http://${t}`,`https://${t}`]}function p(){if(window)return window.location}var h=r(670452);function m(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return(0,h.k)(e.portalHostname)}function f(e){return`${m(e)}/api/v3`}var g=r(403555),y=r(6194),b=r(354695);function v(e){const t=e.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return t&&t.forEach((function(t){e=e.replace(t,'<a target="_blank" href="'+t+'">'+t+"</a>")})),e.replace("(","<br/>(")}var w=r(20837),S=r(974195);function E(e){return`${(0,a.a)(e)}/home/content.html`}var T=r(268304),I=r(977680),C=r(989593),A=r(899415);function O(e){const{portal:t}=e,r=(0,C._T)(e,["portal"]),n=(0,a.a)(t),i=(0,h.k)(n),s=new URL(`${i}/c`),o=(0,A.btoa)(JSON.stringify(r));return s.searchParams.set("d",o),s.toString()}var _=r(246107);const D=new RegExp("^https?:\\/\\/([a-z0-9-]+\\.)*(arcgis|esri)\\.com"),P=new RegExp("^https?:$");async function k(e){const{url:t}=e,r=(0,C._T)(e,["url"]);let n;try{if(n=D.test(t),!n){const{protocol:e,hostname:i}=new URL(t);if(!P.test(e))throw new Error("invalid protocol");n=await(0,_.B)(i,r)}}catch(e){n=!1}return n}var x=r(309833),R=r(658202),U=r(48714);const M=/\/(map|feature)server/i,N=e=>M.test(e),j=e=>{const t=M.exec(e),r=t&&t[1];return r&&`${(0,n.kC)(r)} Service`}},48714:(e,t,r)=>{"use strict";function n(e){return!(!e||"string"!=typeof e||!e.startsWith("https://")||/^https?:\/\/([^.]+\.)*arcgis\.com(\/|$)/i.test(e))}r.d(t,{e:()=>n})},665688:(e,t,r)=>{"use strict";function n(e){return(e=e.toLowerCase()).includes("//")&&(e=e.split("//")[1]),e}r.d(t,{G:()=>n})},292796:(e,t,r)=>{"use strict";r.d(t,{gU:()=>v,RG:()=>w,W6:()=>S});var n=r(170209),i=r(752440),s=r(248849),o=r(615503),a=r(974195),c=r(787662);const u={org:e=>{const{data:t,stack:r,requestOptions:n}=e,o=r.start("enrichUserOrg");if(t.user.orgId){const c=Object.assign(Object.assign({},n),{portal:`${(0,a.D)(n.portal)}/sharing/rest`});return(0,i.T)(t.user.orgId,c).then((e=>(r.finish(o),{data:Object.assign(Object.assign({},t),{org:e}),stack:r,requestOptions:n}))).catch((t=>((e,t,r)=>{const{data:n,stack:i,requestOptions:o}=t;return i.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:(0,s.g)(e,n.errors)}),stack:i,requestOptions:o}})(t,e,o)))}return r.finish(o),Promise.resolve({data:Object.assign(Object.assign({},t),{org:null}),stack:r,requestOptions:n})}};var l=r(264263),d=r(589585),p=r(348157),h=r(977680),m=r(507707),f=r(40180),g=r(348753),y=r(285581);function b(e){const t=`${(0,n.al)(e.requestOptions)}/portals/self/signinSettings`,r=Object.assign(Object.assign({},e.requestOptions),{httpMethod:"GET"});return(0,g.WY)(t,r)}const v=e=>{const t=e.hasOwnProperty("description")?e.description:void 0;return{access:e.access,id:e.username,name:e.fullName,description:t,summary:t,createdDate:new Date(e.created),createdDateSource:"user.created",orgId:e.orgId,owner:e.username,updatedDate:new Date(e.modified),updatedDateSource:"user.modified",tags:e.tags,thumbnail:e.thumbnail,type:"User",typeKeywords:[],links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:null}}};async function w(e,t,r){var n;const i=v(e),s=Object.assign(Object.assign({},i),{family:"people",rawResult:e});e.memberType&&(s.memberType=e.memberType,s.isGroupOwner=e.isGroupOwner);const a=t.filter(m.Tw).map(p.u),g=(0,f.e)("enrichment",a).filter(m.Tw);let y={};g.length&&(y=await function(e,t,r){const n=t.reduce(((e,t)=>{const r=u[t];return r&&e.push(r),e}),[]);return(0,c.G)(n)({data:{user:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}(e,g,r)),a.forEach((e=>{s[e.prop]=(0,l.W)(y,e.path)}));const b=null===(n=r.authentication)||void 0===n?void 0:n.token;return e.thumbnail&&(s.links.thumbnail=(0,d.Fz)(r.portal,e,b)),s.links.self=(0,h.n)(s.id,r),s.links.siteRelative=r.isPortal?(0,h.n)(s.id,r):`/people/${s.id}`,s}const S=async(e,t)=>{const r="self"===e?t.currentUser:await(0,n.PR)(Object.assign(Object.assign({},t.hubRequestOptions),{username:e}));let i=v(r);return i=await async function(e,t,r){var i,s,o;t.settings=r.userHubSettings;const a=(0,y.D)(b,{}),c=await a(r),u=(0,y.D)(n.AW,{}),l=await u(r.requestOptions);return t.hubOrgSettings={showInformationalBanner:!!(null===(o=null===(s=null===(i=l.portalProperties)||void 0===i?void 0:i.hub)||void 0===s?void 0:s.settings)||void 0===o?void 0:o.informationalBanner),enableTermsAndConditions:!!c.termsAndConditions,termsAndConditions:c.termsAndConditions,enableSignupText:!!c.signupText,signupText:c.signupText},t}(0,i,t),i}},287534:(e,t,r)=>{"use strict";r.d(t,{UserSchema:()=>i,q:()=>n});
13const n=["hub:user:settings"],i={type:"object",properties:{settings:{type:"object",properties:{features:{type:"object",properties:{workspace:{type:"boolean",default:!0}}}}},hubOrgSettings:{type:"object",properties:{showInformationalBanner:{type:"boolean",default:!1},enableTermsAndConditions:{type:"boolean",default:!1},termsAndConditions:{type:"string",default:""},enableSignupText:{type:"boolean",default:!1},signupText:{type:"string",default:""}}}}}},171178:(e,t,r)=>{"use strict";r.d(t,{gU:()=>n.gU,RG:()=>n.RG,W6:()=>n.W6,HL:()=>s});var n=r(292796),i=r(878187);const s=(e,t)=>{
14const{actionLinks:r=[],baseUrl:n="",target:s="self"}=t||{},a=(0,i.D)(e,s,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o(e)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},o=e=>{const t=[],r=e.memberType;return r&&(e.isGroupOwner?t.push({icon:"user-key",color:"gray",i18nKey:"badges.members.owner",hideLabel:!0,tooltip:{i18nKey:"badges.members.owner"}}):"admin"===r?t.push({icon:"user-up",color:"gray",i18nKey:"badges.members.admin",hideLabel:!0,tooltip:{i18nKey:"badges.members.admin"}}):t.push({icon:"user",color:"gray",i18nKey:"badges.members.member",hideLabel:!0,tooltip:{i18nKey:"badges.members.member"}})),{access:e.access,badges:t,family:e.family,id:e.id,source:e.name?`@${e.id}`:void 0,summary:e.summary,title:e.name||`@${e.id}`,type:e.type}}},507707:(e,t,r)=>{"use strict";r.d(t,{E4:()=>v,F3:()=>w,FB:()=>s,JJ:()=>o,Mc:()=>l,Tw:()=>m,VF:()=>T,Yp:()=>p,Z$:()=>g,_A:()=>h,fE:()=>d,j:()=>y,kC:()=>E,kI:()=>i,kK:()=>S,l7:()=>b,qC:()=>u,uw:()=>f,zP:()=>a,zu:()=>c});var n=r(264263);function i(e){let t={};if(Array.isArray(e))t=e.map(i);else if("object"==typeof e){if(null===e)return e;for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];null!=n&&"object"==typeof n?n instanceof Date?t[r]=new Date(n.getTime()):"undefined"!=typeof Blob&&n instanceof Blob?t[r]=new Blob([n],{type:n.type}):t[r]=i(n):t[r]=n}}else t=e;return t}function s(e,t){return e.reduce(((e,r)=>(e[(0,n.W)(r,t)]=r,e)),{})}function o(e,t="id"){return Object.keys(e).reduce(((r,n)=>(e[n][t]=n,r.push(i(e[n])),r)),[])}function a(e,t,r){return e?e.reduce(((e,i)=>((0,n.W)(i,t)===r&&(e=i),e)),null):null}function c(e,t){return e.filter((e=>e!==t))}function u(...e){return e.reduce(((e,t)=>(...r)=>e(t(...r))))}function l(e="i"){return`${e}${Math.random().toString(36).substr(2,8)}`}function d(e,t,r){return null!=t&&((r=i(r))[e]=t),r}function p(e,t){return null!=e&&(t=i(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 f(e,t){return e.reduce(((e,r)=>p(e.find((e=>(0,n.W)(e,t)===(0,n.W)(r,t)))?null:r,e)),[])}function g(e){return e[e.length-1]}function y(e,t,r){return e.filter((e=>(0,n.W)(e,t)===r))}function b(e,t,r=!0){const n=i(e);return Object.keys(t).reduce(((e,n)=>{if(null!==t[n]&&void 0!==t[n]){const s=i(t[n]);Array.isArray(s)?e[n]=s:e[n]=r&&"object"==typeof s?b(e[n]||{},s,r):s}return e}),n)}function v(e,t){try{const r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}}function w(e,t){const r=[];let n=0;for(;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}const S=e=>null==e,E=e=>{const t=Array.from(e);return t.length&&(t[0]=t[0].toUpperCase()),t.join("")};function T(e){return e.reduce(((e,t)=>e.concat(t)),[])}},296578:()=>{},455590:()=>{},919404:()=>{},325833:(e,t,r)=>{"use strict";r.d(t,{D:()=>i,q:()=>n});const n=e=>{const t=[].concat.apply([],e.filter(Array.isArray));return t.length?t:void 0};function i(e,t){return e.reduce(((e,r)=>{let n=e[e.length-1];return n&&n.length!==t||(n=[],e.push(n)),n.push(r),e}),[])}},449058:(e,t,r)=>{"use strict";function n(e,t){return e===t||!(!Array.isArray(e)||!Array.isArray(t))&&e.length===t.length&&e.every(((r,n)=>e[n]===t[n]))}r.d(t,{q:()=>n})},186652:(e,t,r)=>{"use strict";async function n(e,t){for(let r=0;r<e.length;r++)await t(e[r],r,e)}r.d(t,{M:()=>n})},636980:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(325833);function i(e,t,r=5){return(0,n.D)(e,r).reduce(((e,r)=>e.then((e=>{const n=r.map((e=>t(e)));return Promise.all(n).then((t=>e.concat(t)))}))),Promise.resolve([]))}},787662:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(66647);const i=e=>t=>e.reduce(((e,r)=>e.then(r).catch((e=>{if("OperationError"===e.name)return Promise.reject(e);{const e=`IPipeableFn did not reject with an OperationError \n Operation Stack: \n ${t.stack.toString()}`,r=new n.Z("pipeline execution error",e);return r.operationStack=t.stack.serialize(),Promise.reject(r)}}))),Promise.resolve(t))},432645:(e,t,r)=>{"use strict";function n(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")}r.d(t,{H:()=>n})},851742:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(731555);function i(e,t){const r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:null!=t?t:(0,n.W)()}).formatToParts(new Date(e));return[r[4].value,r[0].value,r[2].value].join("-")}},965210:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(731555);function i(e,t){const r=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:null!=t?t:(0,n.W)(),hourCycle:"h23"}).formatToParts(new Date(e));return[r[0].value,r[2].value,r[4].value].join(":")}},731555:(e,t,r)=>{"use strict";function n(){return Intl.DateTimeFormat().resolvedOptions().timeZone}r.d(t,{W:()=>n})},547859:(e,t,r)=>{"use strict";r.d(t,{W9:()=>s.W,XP:()=>n.X,zi:()=>i.z});var n=r(851742),i=r(965210),s=r(731555)},275261:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,z:()=>s});var n=r(899415);function i(e){return function(e){const t=Array.from(e,(e=>String.fromCodePoint(e))).join("");return(0,n.btoa)(t)}((new TextEncoder).encode(e))}function s(e){return(new TextDecoder).decode(function(e){const t=(0,n.atob)(e);return Uint8Array.from(t,(e=>e.codePointAt(0)))}(e))}},677954:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(72090);function i(e,t){let r=!1,i=0,s=t;for(;!r;)(0,n.q)(e,s)?(i++,s=`${t}-${i}`):r=!0;return s}},285581:(e,t,r)=>{"use strict";function n(e,t={}){return(...r)=>e(...r).catch((e=>t))}r.d(t,{D:()=>n})},806146:(e,t,r)=>{"use strict";function n(e){let t=(new Date).getTime();return Array(e).fill(0).reduce((function(e){const r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),`${e}${r.toString(16)}`}),"")}r.d(t,{z:()=>n})},74362:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(264263);function i(e){let t=(0,n.W)(e,"portalProperties.hub.enabled")?"premium":"basic";return e.isPortal&&"singletenant"===e.portalMode&&(t="portal"),t}},865151:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(518944);const i=e=>(0,n.t)(e,"subscriptionInfo.type","Enterprise")},665975:(e,t,r)=>{"use strict";function n(e){let t="enterprise";return e.includes("arcgis.com")&&(t="production"),(e.includes("qaext.arcgis.com")||e.includes("mapsqa.arcgis.com"))&&(t="qaext"),(e.includes("devext.arcgis.com")||e.includes("mapsdev.arcgis.com"))&&(t="devext"),t}r.d(t,{G:()=>n})},574335:(e,t,r)=>{"use strict";function n(){return"https://hubcdn.arcgis.com/opendata-ui/assets/ember-arcgis-opendata-components/
14assets/images/placeholders/event.png"}r.d(t,{P:()=>n})},297216:(e,t,r)=>{"use strict";function n(e){const t=2*JSON.stringify(e).length,r=t/1024;return{bytes:t,kilobytes:r,megabytes:r/1024}}r.d(t,{U:()=>n})},788052:(e,t,r)=>{"use strict";r.d(t,{Xb:()=>p,qB:()=>l,zL:()=>d,p7:()=>u});const n="self",i="hub-site-settings.json";var s=r(865618),o=r(227031),a=r(359033),c=r(323379);async function u(e,t,r=!1){const s=t.tokenFor(n);if(s){e.updated=(new Date).getTime(),e.username=t.currentUser.username;const n={key:i,data:e,access:"userappprivate"};return(0,a.iV)(n,t.currentUser.username,t.portalUrl,s,r)}throw new Error("No user-app-resource token available to store Site Settings")}async function l(e){const t=e.tokenFor(n);if(t){const r=await(0,a.JP)(e.currentUser.username,i,e.portalUrl,t);return(0,o.F)(r)}return Promise.resolve(null)}async function d(e,t,r=!1){const n=t.tokenFor(s.bR);if(n){e.updated=(new Date).getTime(),e.username=t.currentUser.username;const i={key:s.$k,data:e,access:"userappprivate"};return(0,a.iV)(i,t.currentUser.username,t.portalUrl,n,r)}throw new Error("No user-app-resource token available to store Site Settings")}async function p(e){const t=e.tokenFor(s.bR);return t?await(0,c.Z)(e.currentUser.username,e.portalUrl,t):Promise.resolve(null)}},72090:(e,t,r)=>{"use strict";function n(e,t){return-1!==e.indexOf(t)}r.d(t,{q:()=>n})},428918:(e,t,r)=>{"use strict";function n(e){const t=/-\s(\d+$)/.exec(e);if(t){const r=parseInt(t[1],10),n=r+1;e=e.replace(`- ${r}`,`- ${n}`)}else e+=" - 1";return e}r.d(t,{X:()=>n})},362734:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Logger:()=>E.Y,asyncForEach:()=>s.M,base64ToUnicode:()=>a.z,batch:()=>o.d,clearMemoizedCache:()=>O.M,createOperationPipeline:()=>u.G,dasherize:()=>C.H,ensureUniqueString:()=>c.c,failSafe:()=>l.D,fetchUserHubSettings:()=>k.Xb,fetchUserSiteSettings:()=>k.qB,generateRandomString:()=>d.z,getDatePickerDate:()=>R.XP,getEnvironmentFromPortalUrl:()=>_.G,getEventThumbnail:()=>D.P,getHubProduct:()=>p.q,getObjectSize:()=>x.U,getSubscriptionType:()=>h.f,getTimePickerTime:()=>R.zi,guessTimeZone:()=>R.W9,includes:()=>m.q,incrementString:()=>S.X,isArrayEqual:()=>$.q,isComboboxItemSelected:()=>U.V,isCuid:()=>g.l,isGuid:()=>f.k,isUpdateGroup:()=>T.A,mapBy:()=>y.e,memoize:()=>O.H,poll:()=>P.$,processRevertableTasks:()=>I.U,propifyString:()=>w.w,runRevertableTask:()=>I.O,slugify:()=>b.l,titleize:()=>A.M,unicodeToBase64:()=>a.J,updateUserHubSettings:()=>k.zL,updateUserSiteSettings:()=>k.p7,wait:()=>M.D,withoutByProp:()=>v.r});var n=r(919404),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(186652),o=r(636980),a=r(275261),c=r(677954),u=r(787662),l=r(285581),d=r(806146),p=r(74362),h=r(865151),m=r(72090),f=r(526462),g=r(480367),y=r(40180),b=r(806322),v=r(915055),w=r(146628),S=r(428918),E=r(554799),T=r(709638),I=r(773049),C=r(432645),A=r(207998),O=r(521814),_=r(665975),D=r(574335),P=r(737745),k=r(788052),x=r(297216),R=r(547859),U=r(712801),M=r(539608),N=r(296578);i={};for(const e in N)["default","asyncForEach","batch","base64ToUnicode","unicodeToBase64","ensureUniqueString","createOperationPipeline","failSafe","generateRandomString","getHubProduct","getSubscriptionType","includes","isGuid","isCuid","mapBy","slugify","withoutByProp","propifyString","incrementString","Logger","isUpdateGroup","processRevertableTasks","runRevertableTask","dasherize","titleize","clearMemoizedCache","memoize","getEnvironmentFromPortalUrl","getEventThumbnail","poll","fetchUserHubSettings","fetchUserSiteSettings","updateUserHubSettings","updateUserSiteSettings","getObjectSize","getDatePickerDate","getTimePickerTime","guessTimeZone","isComboboxItemSelected","wait"].indexOf(e)<0&&(i[e]=()=>N[e]);r.d(t,i);var j=r(455590);i={};for(const e in j)["default","asyncForEach","batch","base64ToUnicode","unicodeToBase64","ensureUniqueString","createOperationPipeline","failSafe","generateRandomString","getHubProduct","getSubscriptionType","includes","isGuid","isCuid","mapBy","slugify","withoutByProp","propifyString","incrementString","Logger","isUpdateGroup","processRevertableTasks","runRevertableTask","dasherize","titleize","clearMemoizedCache","memoize","getEnvironmentFromPortalUrl","getEventThumbn
14ail","poll","fetchUserHubSettings","fetchUserSiteSettings","updateUserHubSettings","updateUserSiteSettings","getObjectSize","getDatePickerDate","getTimePickerTime","guessTimeZone","isComboboxItemSelected","wait"].indexOf(e)<0&&(i[e]=()=>j[e]);r.d(t,i);var $=r(449058)},865618:(e,t,r)=>{"use strict";r.d(t,{$k:()=>i,bR:()=>n});const n="hubforarcgis",i="hub-settings.json"},323379:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(285581),i=r(865618),s=r(227031),o=r(359033);async function a(e,t,r){const a=(0,n.D)(o.JP,function(e){return{schemaVersion:1.1,username:e,updated:(new Date).getTime(),features:{workspace:!0}}}(e)),c=await a(e,i.$k,t,r);return(0,s.c)(c)}},964858:(e,t,r)=>{"use strict";function n(e,t){const r=e.filter((e=>!e.startsWith("status|")));return r.push(`status|${t}`),r}r.d(t,{o:()=>n})},227031:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,F:()=>i});var n=r(507707);function i(e){return(0,n.kI)(e)}function s(e){let t=(0,n.kI)(e);return t=function(e){var t;return e.schemaVersion<1.1&&(e.schemaVersion=1.1,t=e,Object.prototype.hasOwnProperty.call(t,"preview")&&(e.features=(0,n.kI)(e.preview),delete e.preview,delete e.features.workspace),e.features||(e.features={})),e}(t),t}},359033:(e,t,r)=>{"use strict";r.d(t,{JP:()=>a,iV:()=>o});var n=r(348753),i=r(285581),s=r(297216);async function o(e,t,r,o,c=!1){if((0,s.U)(e.data).megabytes>4.95)throw new Error("User Resource is too large to store. Please ensure it is less than 5MB in size");let u=e.data;if(!c){const n=(0,i.D)(a,{}),s=await n(t,e.key,r,o);u=Object.assign(Object.assign({},s),e.data)}const l={portal:r,httpMethod:"POST",params:{text:JSON.stringify(u),access:e.access,key:e.key,token:o}};return(0,n.WY)(`${r}/sharing/rest/community/users/${t}/addResource`,l)}function a(e,t,r,i){const s={portal:r};return(0,n.WY)(`${r}/sharing/rest/community/users/${e}/resources/${t}?token=${i}`,s)}},480367:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e&&/^c[a-z0-9]{24}$/.test(e)}r.d(t,{l:()=>n})},526462:(e,t,r)=>{"use strict";function n(e){return"{"===e[0]&&(e=e.substring(1,e.length-1)),/^(\{){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)}r.d(t,{k:()=>n})},709638:(e,t,r)=>{"use strict";function n(e){return e.capabilities.includes("updateitemcontrol")}r.d(t,{A:()=>n})},712801:(e,t,r)=>{"use strict";function n(e,t,r){var i;let s=t.includes(e.value);return"ancestors"===r&&(s=s||!!(null===(i=e.children)||void 0===i?void 0:i.length)&&e.children.some((e=>n(e,t,r)))),s}r.d(t,{V:()=>n})},554799:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=Object.assign(Object.assign({},{logLevel:"error"}),globalThis.arcgisHubConfig).logLevel;var i;!function(e){e[e.all=0]="all",e[e.debug=1]="debug",e[e.info=2]="info",e[e.warn=3]="warn",e[e.error=4]="error",e[e.off=5]="off"}(i||(i={}));class s{static log(e,...t){this.isLevelPermitted(i.debug)&&console.log(e,...t)}static debug(e,...t){this.isLevelPermitted(i.debug)&&console.debug(e,...t)}static info(e,...t){this.isLevelPermitted(i.info)&&console.info(e,...t)}static warn(e,...t){this.isLevelPermitted(i.warn)&&console.warn(e,...t)}static error(e,...t){this.isLevelPermitted(i.error)&&console.error(e,...t)}static isLevelPermitted(e){return i[n]<=e}}},40180:(e,t,r)=>{"use strict";function n(e,t=[]){return t.map((t=>t[e]))}r.d(t,{e:()=>n})},521814:(e,t,r)=>{"use strict";r.d(t,{H:()=>i,M:()=>s});let n={};const i=e=>{if(!n[`_${e.name}`]){const t={},r=(...r)=>{const n=(e=>e.reduce(((t,r)=>t+`_${"object"==typeof r?JSON.stringify(e):String(r)}_`),""))(r);if(t[n])return t[n];const i=e.call(void 0,...r);return t[n]=i,i};n[`_${e.name}`]=r}return n[`_${e.name}`]},s=e=>{e?delete n[`_${e}`]:n={}}},737745:(e,t,r)=>{"use strict";async function n(e,t,r){const n=e=>!isNaN(e)&&e>0,i=n(null==r?void 0:r.maxAttempts)?r.maxAttempts:7,s=n(null==r?void 0:r.initialRetryDelay)?r.initialRetryDelay:500;return async function r(n,o){if(n>i)throw new Error(`Polling failed after ${i} attempts`);const a=await new Promise((t=>{setTimeout((async()=>{const r=await e();t(r)}),o)}));return t(a)?a:await r(n+1,1===n?s:2*o)}(1,0)}r.d(t,{$:()=>n})},146628:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(507707);function i(e){let t=e;return t=t.replace(/^[0-9]*/g,""),t=t.replace(/[^\w\s]/g,""),t=(0,n._A)(t),t}},773049:(e,t,r)=>{"use strict";r.d(t,{O:()=>n,U:()=>i});const n=(e,t)=>e().then((e=>({status:"fullfilled",results:e,revert:t}))).catch((e=>({status:"rejected",error:e}))),i=e=>Promise.all(e).then((e=>{const t=e=>"fullfilled"===e.status,r=e.filter(t),n=e.filter((e=>!t(e)));if(n.length){const e=r.map((e=>e.revert()));throw Promise.all(e).catch((()=>{})),n[0].error}return r.map((e=>e.results))}))},806322:(e,t,r)=>{"use strict";function n(e){if("string"==typeof e){const t=e.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"");return""===t||"-"===t?"":t}return e}r.d(t,{l:()=>n})},207998:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(507707);function i(e){return e.split(" ").map((e=>(0,n.kC)(e))).join(" ")}},539608:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});const n=e=>new Promise((t=>setTimeout(t,e)))},915055:(e,t,r)=>{"use strict";function n(e,t,r){return r.filter((r=>r[e]!==t))}r.d(t,{r:()=>n})},736930:(e,t,r)=>{"use strict";r.d(t,{M:()=>n,V:()=>i});const n="version.json",i=["created","creator","description","id","name","parent","updated"]},914637:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var n=r(559573),i=r(371740),s=r(27879),o=r(821623);function a(e){let t;if((0,n.Z6)(e.item.type,e.item.typeKeywords))t=s.bx;else{if(!(0,i.r9)(e.item.type,e.item.typeKeywords))throw TypeError("Entity type does not support versioning");t=o.bS}return t}},413637:(e,t,r)=>{"use strict";function n(e){return`hubVersion_${e}`}r.d(t,{G:()=>n})},626720:(e,t,r)=>{"use strict";r.d(t,{s:()=>s});var n=r(413637),i=r(736930);function s(e){return(0,n.G)(`${e}/${i.M}`)}},557170:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(183530);function i(e,t){return(0,n.P)(e,{},t)}},992367:(e,t,r)=>{"use strict";r.d(t,{h:()=>p});var n=r(914637),i=r(557170),s=r(413637),o=r(264263),a=r(183530),c=r(560486),u=r(507707),l=r(736930),d=r(170209);async function p(e,t,r){const p=(0,n.n)(e),h=(0,i.h)(e,p),m=null==r?void 0:r.name,f=null==r?void 0:r.description,g=null==r?void 0:r.parentId,y=(0,u.Mc)(),b=(0,s.G)(y),v=Date.now(),w={created:v,creator:(0,o.W)(t,"authentication.username"),data:h,description:f,id:y,name:m,parent:g,path:`${b}/${l.M}`,updated:v},S=(0,c.O)(w),E=(0,a.P)(w,{},l.V);return await(0,d.zJ)(Object.assign(Object.assign({},t),{id:(0,o.W)(e,"item.id"),name:l.M,owner:(0,o.W)(e,"item.owner"),params:{properties:E},prefix:b,resource:S})),w.size=S.size,w}},954128:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(626720),i=r(170209);async function s(e,t,r,s){return(0,i.ug)(Object.assign(Object.assign({},s),{id:e,owner:r,resource:(0,n.s)(t)}))}},574410:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(170209),i=r(626720);async function s(e,t,r){return(0,n.AA)(e,Object.assign(Object.assign({},r),{fileName:(0,i.s)(t),readAs:"json"}))}},589646:(e,t,r)=>{"use strict";r.r(t),r.d(t,{applyVersion:()=>d.M,checkForStaleVersion:()=>d.P,createVersion:()=>n.h,deleteVersion:()=>i.h,getVersion:()=>s.b,searchVersions:()=>c.A,updateVersion:()=>u.S,updateVersionMetadata:()=>l.V});var n=r(992367),i=r(954128),s=r(574410),o=r(904787),a={};for(const e in o)["default","createVersion","deleteVersion","getVersion"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a);var c=r(810824),u=r(34918),l=r(653647),d=r(689615)},810824:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(170209);function i(e){const{access:t,resource:r,size:n}=e;let i;const s=e.properties||"{}";try{i=JSON.parse(s)}catch(e){i={}}return Object.assign(Object.assign({},i),{access:t,path:r,size:n})}async function s(e,t){return(await(0,n.C)(e,Object.assign(Object.assign({},t),{params:{sortField:"created",sortOrder:"desc"}}))).resources.filter((e=>e.resource.match(/^hubVersion_[a-zA-Z0-9_\s]*\/version.json/))).map(i)}},600204:()=>{},805191:()=>{},166582:()=>{},904787:(e,t,r)=>{"use strict";r.r(t);var n=r(600204),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(805191);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(166582);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i)},34918:(e,t,r)=>{"use strict";r.d(t,{S:()=>h});var n=r(264263),i=r(183530),s=r(560486),o=r(413637),a=r(557170),c=r(736930),u=r(914637),l=r(170209),d=r(689615);
14class p extends Error{constructor(e,t){super(`Version ${e} is stale. Use force to overwrite.`),this.updated=t,this.name="StaleVersionError"}}async function h(e,t,r,h){if(!h){const n=await(0,d.P)(e.item.id,t,r);if(n.isStale)throw new p(t.id,n.updated)}const m=(0,u.n)(e);t.data=(0,a.h)(e,m);const f=(0,o.G)(t.id);t.updated=Date.now();const g=(0,s.O)(t),y=(0,i.P)(t,{},c.V);return await(0,l.zy)(Object.assign(Object.assign({},r),{id:(0,n.W)(e,"item.id"),name:c.M,owner:(0,n.W)(e,"item.owner"),params:{properties:y},prefix:f,resource:g})),t}},653647:(e,t,r)=>{"use strict";r.d(t,{V:()=>u});var n=r(183530),i=r(560486),s=r(413637),o=r(736930),a=r(574410),c=r(170209);async function u(e,t,r,u){const l=(0,s.G)(t.id),d=(0,n.P)(t,{},o.V),p=await(0,a.b)(e,t.id,u);(0,n.P)(t,p,o.V);const h=(0,i.O)(p);return await(0,c.zy)(Object.assign(Object.assign({},u),{id:e,name:o.M,owner:r,params:{properties:d},prefix:l,resource:h})),t}},689615:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,P:()=>c});var n=r(507707),i=r(183530),s=r(574410),o=r(914637);function a(e,t,r){return r||(r=(0,o.n)(e)),(0,i.P)(t.data,(0,n.kI)(e),r)}async function c(e,t,r){const n=await(0,s.b)(e,t.id,r);return{isStale:n.updated>t.updated,updated:n.updated}}},989593:(e,t,r)=>{"use strict";function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}r.d(t,{_T:()=>n})},583193:(e,t,r)=>{"use strict";r.r(t),r.d(t,{addUsersToEvent:()=>f,getEventFeatureServiceUrl:()=>o,getEventQueryFromType:()=>a,getEventServiceItem:()=>c,getEventServiceUrl:()=>s,registerForEvent:()=>p,searchEvents:()=>l,unregisterForEvent:()=>h});var n=r(170209),i=r(641675);function s(e,t){return c(e,t).then((r=>{const n=(0,i.g)(t),s=r.url.match(/services\/(.*?)\/FeatureServer/);if(s[1])return`${n}/api/v3/events/${e}/${s[1]}/FeatureServer/0`}))}function o(e,t){return c(e,t).then((e=>{let t=`${e.url}/0`;return t=t.replace(/^http:/gi,"https:"),t}))}function a(e,t){let r;const n=Object.assign({},t);if("cancelled"===e)t.orderByFields||(n.orderByFields="EditDate DESC"),r="isCancelled=1 AND status<>'draft'";else if("draft"===e){t.orderByFields||(n.orderByFields="EditDate DESC");const e=t.authentication;r=`Creator = '${e?e.username:null}' AND status = 'draft'`}else t.orderByFields||(n.orderByFields="upcoming"===e?"startDate ASC":"startDate DESC"),r=`endDate${"upcoming"===e?">":"<="}CURRENT_TIMESTAMP AND (isCancelled<>1 OR isCancelled IS NULL) AND status<>'draft'`;return t.where?n.where=`${t.where} AND ${r}`:n.where=r,n}function c(e,t){return(0,n.KT)(Object.assign({q:`typekeywords:hubEventsLayer AND orgid:${e}`},t)).then((e=>{const t=e;if(t.results&&t.results.length>0){let e;if(1===t.results.length)e=t.results[0];else if(t.results.length>1){const r=t.results.reduce(((e,t)=>(t.typeKeywords.includes("View Service")?"public"===t.access?e.public=t:e.org=t:e.admin=t,e)),{});e=r.admin||r.org||r.public}return e}throw Error("No events service found. Events are likely not enabled.")}))}var u=r(958328);function l(e){const t=Object.assign({returnGeometry:!0},e);return(0,u.QH)(t).then((r=>{if(r.features.length<=0)return{data:[],included:[]};const n=t.authentication;return n?n.getToken(t.url).then((n=>d(r.features,t.url,e,n))):d(r.features,t.url,e)}))}function d(e,t,r,i){const s=[],o=[],a=[],c=(new Date).getTime();let u="";if(e.forEach((function(e){const r=e.attributes,n=e.geometry;let a=null;if(r.imageAttributes){const e=JSON.parse(r.imageAttributes);e.crop&&(a=`${t}/${r.OBJECTID}/attachments/${e.crop}?v=${c}`,i&&(a+=`&token=${i}`))}o.push({id:r.OBJECTID,type:"events",imageUrl:a,attributes:r,geometry:n});const l=r.siteId;null!=l&&-1===s.indexOf(l)&&(s.push(l),u+=u.length>0?" OR id:":"id:",u+=l)})),0===s.length)return{included:a,data:o};const l=r;return l.q=u,(0,n.KT)(l).then((function(e){return e.results.forEach((e=>{a.push({id:e.id,type:"sites",attributes:{id:e.id,url:e.url}})})),{included:a,data:o}}))}function p(e){return(0,n.be)({id:e.groupId,authentication:e.authentication})}function h(e){return(0,n.Ln)({id:e.groupId,authentication:e.authentication})}var m=r(690259);function f(e,t,r,n,i){return(0,m.addUsersToGroup)(e,t,r,n,i)}},832842:(e,t,r)=>{"use strict";r.d(t,{Kw:()=>o,Sh:()=>s,rD:()=>a});var n=r(436),i=r(641675);const s="Hub Initiative";function o(e,t){return(0,n.nI)(e,t)}function a(e,t){return`${(0,i.g)(t)}/admin/initiatives/${e}`}},283266:(e,t,r)=>{"use strict";r.d(t,{D:()=>u});var n=r(552318),i=r(800538),s=r(246007),o=r(507707),a=r(264263);const c={item:{title:"{{solution.title}}",snippet:"{{solution.snippet}}",description:"{{solution.snippet}}",type:"Hub Initiative",typeKeywords:["Hub","hubInitiative"],tags:[],extent:"{{organization.defaultExtentBBox}}",culture:"{{user.culture}}",properties:{},url:""},data:{assets:[],indicators:[],recommendedTemplates:[]}};function u(e){const t=(0,n.D)(e),r=(0,i.a)(t);return(0,s.Z)(r,e.portalSelf).then((e=>{const t=(0,o.kI)(c);return t.item.description=(0,a.W)(e,"addons.services.templates.customInitiative.item.description"),t.item.snippet=(0,a.W)(e,"addons.services.templates.customInitiative.item.snippet"),t.item.culture=r,t}))}},668805:(e,t,r)=>{"use strict";r.d(t,{s:()=>s});var n=r(264263),i=r(283266);function s(e,t){let r;const s=(0,n.W)(e,"properties.initiativeTemplate");return r=s?Promise.resolve(s):(0,i.D)(t),r}},861874:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CURRENT_SCHEMA_VERSION:()=>b,INITIATIVE_TYPE_NAME:()=>n.Sh,_fetchAndConvertInitiativeToTemplate:()=>X,activateInitiative:()=>x,addImageAsResource:()=>k,addInitiative:()=>n.Kw,checkGroupExists:()=>T,convertIndicatorsToDefinitions:()=>d,convertInitiativeToTemplate:()=>$,copyEmbeddedImageResources:()=>P,copyImageResources:()=>D,createInitiativeGroup:()=>S,createInitiativeModelFromTemplate:()=>A,currentlyFollowedInitiatives:()=>K,detachSiteFromInitiative:()=>U,followInitiative:()=>Y,geometryService:()=>Q,getDefaultInitiativeTemplate:()=>Z.D,getInitiative:()=>w,getInitiativeTemplate:()=>ee.s,getInitiativeUrl:()=>n.rD,getUniqueGroupName:()=>I,isSharedEditingGroup:()=>C,isUserFollowing:()=>z,migrateSchema:()=>v,removeInitiative:()=>M,removeInitiativeGroup:()=>E,searchInitiativeTemplates:()=>G,searchInitiatives:()=>F,unfollowInitiative:()=>J,updateInitiative:()=>_,updateInitiativeSiteId:()=>te.v});var n=r(832842),i=r(170209),s=r(737720),o=r(264263),a=r(507707);function c(e,t,r,n){let i=`${r||"https://www.arcgis.com/sharing/rest"}/content/items/${e}/resources`;return i=n?`${i}/${n}/${t}`:`${i}/${t}`,i}const u=function(e){return{id:e.fieldName,name:e.label,optional:e.optional||!1,description:e.tooltip,supportedTypes:[...e.supp
14ortedTypes]}},l=function(e){return{id:e.fieldName,type:"Data",name:e.label||e.fieldName,optional:e.optional||!1,definition:{description:e.label||e.fieldName,supportedTypes:[...e.layerOptions.supportedTypes],geometryTypes:[...e.layerOptions.geometryTypes],fields:e.fields.map(u)}}};function d(e){return e.fields&&Array.isArray(e.fields)||(e.fields=[]),e.fields.map(l)}const p=function(e){return{id:e.id,name:e.field.name,alias:e.field.alias,type:e.field.type}},h=function(e){return{type:"Feature Layer",url:e.url,itemId:e.itemId,layerId:e.layerId,name:e.name||e.id,mappings:e.fields.map(p)}},m=function(e){return{id:e.id,type:"Data",name:e.name||e.id,definition:{description:e.name||e.id},source:h(e)}},f=function(e){return function(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];if(function(e){let t=!1;return Array.isArray(e.fields)&&e.fields.length>0&&(t=!0),t}(n)){const e=(0,a.kI)(n);e.id=r,t.push(e)}return t}),[])}(e).map(m)},g=function(e,t){return e&&Array.isArray(e)?e.map((e=>function(e){const t=e.templates||[],r=e.items||[];return{title:e.title,description:e.description,id:e.id,templateIds:t.map(y),itemIds:r.map(y)}}(t[e]))):[]};function y(e){return e.id}const b=2.2;function v(e,t){return(0,o.W)(e,"item.properties.schemaVersion")===b?e:e=function(e){const t=(0,a.kI)(e),r=function(e){let t=[];return Array.isArray(e)&&(t=e.reduce(((e,t)=>(0,o.W)(t,"templateIds.length")?e.concat(t.templateIds):e),[])),t}((0,o.W)(t,"data.steps")),n=(0,o.W)(t,"data.recommendedTemplates")||[],i=r.concat(n);return t.data.recommendedTemplates=i.reduce(((e,t)=>(e.indexOf(t)<0&&e.push(t),e)),[]),t}(e=function(e){if((0,o.W)(e,"item.properties.schemaVersion")<2.1){const t=(0,a.kI)(e);t.item.properties.schemaVersion=2.1;const r=(0,o.W)(e,"item.properties.groupId");return r&&(t.item.properties.collaborationGroupId=r,delete t.item.properties.groupId),t}return e}(e=function(e,t){if((0,o.W)(e,"item.properties.schemaVersion")<2){const t=(0,a.kI)(e);return t.item.properties.schemaVersion=2,t.data.steps=g(t.data.values.steps,t.data.values),t.data.values.steps&&(t.data.values.steps.forEach((e=>{delete t.data.values[e]})),delete t.data.values.steps),t.data.indicators=f(t.data.values),t}return e}(e=function(e,t){if((0,o.W)(e,"item.properties.schemaVersion")<1.1){const r=(0,a.kI)(e);return r.item.properties.schemaVersion=1.1,function(e,t){e.data.assets||(e.data.assets=[{id:"bannerImage",url:c(e.item.id,"detail-image.jpg",t),properties:{type:"resource",fileName:"detail-image.jpg",mimeType:"image/jepg"},license:{type:"none"}},{id:"iconDark",url:c(e.item.id,"icon-dark.png",t),properties:{type:"resource",fileName:"icon-dark.png",mimeType:"image/png"},license:{type:"none"}},{id:"iconLight",url:c(e.item.id,"icon-light.png",t),properties:{type:"resource",fileName:"icon-light.png",mimeType:"image/png"},license:{type:"none"}}])}(r,t),r.data.values=r.data.values||{},r.data.values.bannerImage||(r.data.values.bannerImage={source:"bannerImage",display:{position:{x:"50%",y:"10%"}}}),r}return e}(e=function(e,t){const r=(0,o.W)(e,"item.properties.schemaVersion");if(!r||r<1){const t=(0,a.kI)(e);t.data.values||(t.data.values={}),t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1;let r=!1;if(t.item.typeKeywords&&(r=t.item.typeKeywords.indexOf("hubInitiativeTemplate")>=0),!!t.data.source&&t.item.properties.source!==t.data.source&&(t.item.properties.source=t.data.source),t.data.configurationSettings){const e=(0,a.kI)(t.data.configurationSettings);delete t.data.configurationSettings;const n=e.find((e=>"Steps"===e.category));t.data.values.steps=n.fields.map((e=>e.fieldName)),n.fields.forEach((e=>{t.data.values[e.fieldName]||(t.data.values[e.fieldName]={}),t.data.values[e.fieldName].title=e.label,t.data.values[e.fieldName].description=e.tooltip,t.data.values[e.fieldName].id=e.fieldName,t.data.values[e.fieldName].items?r&&(t.data.values[e.fieldName].templates=t.data.values[e.fieldName].items,delete t.data.values[e.fieldName].items):(t.data.values[e.fieldName].items=[],t.data.values[e.fieldName].templates=[])}))}return t}return e}(e),t))))}function w(e,t){return Promise.all([(0,i.rV)(e,t),(0,i.m_)(e,t)]).then((e=>({item:e[0],data:e[1]}))).then((e=>v(e,(0,s.i)(t))))}function S(e,t,r,n){const s={title:e,description:t,access:"org",sortField:"title",sortOrder:"asc"};r.isOpenData&&(s.isOpenData=!0,s.tags=["Hub Initiative Group","Open Data"],s.access="public"),r.isSharedEditing&&(s.capabilities="updateitemcontrol",s._edit_privacy="on",s._edit_contributors="on",s.tags=["Hub Initiative Group","initiativeCollaborationGroup"]);const o=Object.assign({group:s},n);let a;return(0,i.sS)(o).then((e=>{a=e.group.id;const t=Object.assign({id:a},n);return(0,i.Et)(t)})).then((()=>a))}function E(e,t){const r=Object.assign({id:e},t);return(0,i.R9)(r).then((()=>(0,i.BN)(r)),(e=>{if("COM_0003"===e.messageCode&&400===e.code)return Promise.resolve({success:!0});throw e}))}function T(e,t,r){const n=Object.assign({q:`(orgid: ${t})`,filter:`title:"${e}"`},r);return(0,i.td)(n).then((e=>{const t={exists:!1};return e.total>0&&(t.exists=!0,t.group=e.results[0]),t}))}function I(e,t,r,n){let i=e;return r&&(i=`${e} - ${r}`),T(i,t,n).then((s=>s.exists?I(e,t,r+=1,n):i))}function C(e){return!!(e.capabilities.indexOf("updateitemcontrol")>-1)}function A(e,t){const r={item:(0,a.kI)(e.item),data:{}};return r.item.title=t.title,r.item.tags=["Hub Initiative"],r.item.type=n.Sh,r.item.typeKeywords=(0,a.zu)(r.item.typeKeywords,"hubInitiativeTemplate"),r.item.typeKeywords.push("hubInitiative"),["id","owner","created_at","modified_at"].forEach((e=>delete r.item[e])),r.item.properties={source:e.item.id,schemaVersion:b,initialParent:e.item.id},Object.assign(r.item.properties,t.groupIds),r.data={assets:(0,a.kI)(e.data.assets),steps:(0,a.kI)(e.data.steps),indicators:[],source:e.item.id,values:{initiativeKey:t.initiativeKey,bannerImage:(0,a.kI)(e.data.values.bannerImage)}},(0,o.W)(e,"data.recommendedTemplates")&&(r.data.recommendedTemplates=e.data.recommendedTemplates),Object.assign(r.data.values,t.groupIds),r.data.values.bannerImage||(r.data.values.bannerImage={source:"bannerImage",display:{position:{x:"50%",y:"10%"}}}),r}var O=r(436);function _(e,t){return(0,O.QB)(e,t)}function D(e,t,r,n,i){const o=`${(0,s.i)(i)}/content/items/${e}/resources`;return i.authentication.getToken(o).then((e=>{const s=n.map((n=>k(t,r,n,`${o}/${n}?token=${e}`,i)));return Promise.all(s)})).then((()=>!0))}function P(e,t,r,n){const i=r.map((r=>k(e,t,r.name,r.url,n).then((()=>!0)).catch((()=>!0))));return Promise.all(i).then((()=>!0))}function k(e,t,r,n,s){return fetch(n,{method:"GET",credentials:"same-origin"}).then((e=>e.blob())).then((n=>(0,i.zJ)({id:e,owner:t,name:r,resource:n,authentication:s.authentication}).then((e=>e.success))))}function x(e,t,r,s){const c=Object.assign({},s),u={initiativeKey:(0,a._A)(t)};let l;return l="string"==typeof e?w(e,c):Promise.resolve(e),l.then((async e=>{u.template=e;const i={title:t,description:t,initiativeKey:u.initiativeKey,groupIds:r};return u.initiativeModel=A(u.template,i),(0,n.Kw)(u.initiativeModel,c)})).then((e=>{u.initiativeModel=e;const t=(0,o.W)(u,"template.assets");if(t)return P(e.item.id,e.item.owner,t,c);{const{id:t,owner:r}=e.item,n=["detail-image.jpg","icon-dark.png","icon-light.png"];return D(u.template.item.id,t,r,n,c)}})).then((()=>{const e=(0,o.W)(u,"initiativeModel.item.properties.collaborationGroupId");if(e){const t=Object.assign({id:u.initiativeModel.item.id,groupId:e,confirmItemControl:!0},s);return(0,i.Ju)(t)}return Promise.resolve({success:!0})})).then((()=>u.initiativeModel))}var R=r(954108);function U(e,t,r){return(0,i.rV)(e,r).then((e=>{delete e.properties.parentInitiativeId,t&&(e.properties.collaborationGroupId=t);const n=Object.assign({item:e},r);return(0,R.$G)(n)})).then((()=>
14{if(t){const n=Object.assign({id:e,groupId:t},r);return(0,i.Ju)(n)}return Promise.resolve({success:!0})}))}function M(e,t){const r={id:e};return Promise.all([w(e,t),(0,i.AW)(t)]).then((async n=>{const s=n[0],a=n[1],c=s.item.properties.siteId;if(c)try{await(0,i.rV)(c,t),r.hasSite=!0,r.siteId=c}catch(e){r.hasSite=!1}else r.hasSite=!1;r.initiativeOwner=s.item.owner,r.collaborationGroupId=(0,o.W)(a,"properties.openData.settings.groupId");const u=[];if(["collaborationGroupId","contentGroupId","followersGroupId"].forEach((e=>{s.item.properties[e]&&u.push(E(s.item.properties[e],t).catch((()=>Promise.resolve(!0))))})),s.item.protected){const r=Object.assign({id:e},t);u.push((0,i.ll)(r))}return Promise.all(u)})).then((()=>{const n=[],s=Object.assign({id:e,owner:r.initiativeOwner},t);return n.push((0,i.cl)(s)),r.hasSite&&n.push(U(r.siteId,r.collaborationGroupId,t)),Promise.all(n)})).then((()=>({success:!0})))}var N=r(144989),j=r(690259);function $(e,t){const r=e.item,n=(0,a.kI)(e);return n.item=(0,N.y)(r),delete n.item.url,delete n.item.extent,delete n.item.properties.source,delete n.item.properties.collaborationGroupId,delete n.item.properties.contentGroupId,delete n.item.properties.followersGroupId,delete n.item.properties.groupId,delete n.data.values.collaborationGroupId,delete n.data.values.contentGroupId,delete n.data.values.followersGroupId,delete n.data.values.followerGroups,delete n.data.values.openDataGroupId,n.type="Hub Initiative Template",n.key=`${(0,j.propifyString)(e.item.title)}_${(0,a.Mc)("i")}`,n.itemId=e.item.id,n.item.typeKeywords=(0,a.zu)(n.item.typeKeywords,"hubInitiative"),n.item.typeKeywords.push("hubInitiativeTemplate"),(0,o.W)(n,"data.steps")&&!(0,o.W)(n,"data.recommendedTemplates")&&(n.data.recommendedTemplates=n.data.steps.reduce(((e,t)=>{const r=t.templateIds||[];return e.concat(r)}),[])),(0,i.C)(n.itemId,t).then((e=>(n.resources=e.resources.map((e=>e.resource)),n)))}function F(e){const t=Object.assign({},e);return t.q?t.q=`${t.q} AND type: Hub Initiative`:t.q="type: Hub Initiative",(0,i.KT)(t)}function G(e){const t=Object.assign({},e);return t.q?t.q=`${t.q} AND type: Hub Initiative AND typekeywords:hubInitiativeTemplate`:t.q="type: Hub Initiative AND typekeywords:hubInitiativeTemplate",(0,i.KT)(t)}var L=r(348753);const H=e=>`hubInitiativeId|${e}`,B=e=>e.replace(/^hubInitiativeId\|/,""),W=e=>e.replace(/^hubInitiativeFollowers\|/,""),q=e=>`${(0,i.Xg)(e)}/update`,V=e=>e.groups.map((e=>e.tags)).reduce(((e,t)=>e.concat(t)),[]).filter((e=>0===e.indexOf("hubInitiativeFollowers|"))).map(W),K=e=>{const t=(e=>e.tags.map(B))(e);return[...t,...V(e)].filter(a.Tw)},z=(e,t)=>K(e).indexOf(t)>-1;function Y(e){return(0,L.WY)((0,i.Xg)(e.authentication),{authentication:e.authentication}).then((t=>z(t,e.initiativeId)?Promise.reject("user is already following this initiative."):t)).then((t=>w(e.initiativeId,e).then((e=>({user:t,initiative:e,hasFollowersGroup:!1}))))).then((t=>{const r=(0,o.W)(t,"initiative.item.properties.followersGroupId");return r?(0,i.be)({id:r,authentication:e.authentication}).then((e=>(t.hasFollowersGroup=e.success,t))):t})).then((t=>{if(!t.hasFollowersGroup){const r=H(e.initiativeId),n=JSON.parse(JSON.stringify(t.user.tags));return n.push(r),(0,L.WY)(q(e.authentication),{params:{tags:n},authentication:e.authentication})}return{success:!0,username:t.user.username}}))}function J(e){return(0,L.WY)((0,i.Xg)(e.authentication),{authentication:e.authentication}).then((t=>z(t,e.initiativeId)?t:Promise.reject("user is not following this initiative."))).then((t=>{const r=H(e.initiativeId),n=JSON.parse(JSON.stringify(t.tags));if(n.indexOf(r)>-1){const i=n.indexOf(r);return n.splice(i,1),0===n.length&&n.push(","),(0,L.WY)(q(e.authentication),{params:{tags:n},authentication:e.authentication}).then((e=>t))}return t})).then((t=>w(e.initiativeId,e).then((e=>({user:t,initiative:e}))))).then((t=>{const r=(0,o.W)(t,"initiative.item.properties.followersGroupId");return r&&V(t.user).indexOf(e.initiativeId)>-1?(0,i.Ln)({id:r,authentication:e.authentication}).then((e=>({success:!0,username:t.user.username}))):{success:!0,username:t.user.username}}))}const Q={AGO_GEOMETRY_SERVICE:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",getUrl(e){let t=this.AGO_GEOMETRY_SERVICE;if(e){const r=(0,o.W)(e,"helperServices.geometry.url");r&&(t=r)}return t},shouldAddTokenToCall(e){let t=!0;return e.indexOf("arcgisonline")>-1&&(t=!1),t},project(e,t,r,n,i,s){const o=`${e}/project`,a=Object.assign({},s);return a.params={geometries:{geometryType:n,geometries:i},transformForward:!1,transformation:"",inSR:t,outSR:r,f:"json"},!this.shouldAddTokenToCall(o)&&a.authentication&&delete a.authentication,(0,L.WY)(o,a)}};var Z=r(283266);function X(e,t){return w(e,t).then((e=>$(e,t))).catch((e=>(0,Z.D)(t)))}
14var ee=r(668805),te=r(411767)},436:(e,t,r)=>{"use strict";r.d(t,{QB:()=>o,nI:()=>s});var n=r(507707),i=r(954108);function s(e,t){const r=(0,n.kI)(e),s=a(r,t);return(0,i.fC)(s).then((e=>(r.item.id=e.id,r)))}function o(e,t){const r=(0,n.kI)(e),s=a(r,t);return(0,i.$G)(s).then((()=>r))}function a(e,t){const r=(0,n.kI)(e.item);return r.data=(0,n.kI)(e.data),Object.assign({item:r},t)}},411767:(e,t,r)=>{"use strict";r.d(t,{v:()=>a});var n=r(690259),i=r(264263),s=r(954108),o=r(170209);function a(e,t,r){let a=Promise.resolve(e);if("string"==typeof e){if(!(0,n.isGuid)(e))return Promise.reject(new Error("updateInitiativeSiteId was passed a string that is not a GUID."));a=(0,o.rV)(e,{authentication:r.authentication})}else if((0,i.W)(e,"item.id")){const t=e;a=Promise.resolve(t.item)}return a.then((e=>(e.properties||(e.properties={}),e.properties.siteId=t,(0,s.$G)({item:e,authentication:r.authentication}))))}},521091:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SortDirection:()=>P,agoSearch:()=>_,kMerge:()=>k,mergeAggregations:()=>j,mergePages:()=>G,serialize:()=>D});var n=r(264263),i=r(773807);const s=i.b.apiTypes.map((e=>e.toLowerCase()));var o=r(80498);function a(e){return Object.keys(e).reduce(((t,r)=>(t[r]=Object.keys(e[r]).reduce(((t,n)=>(t.push({key:n,docCount:e[r][n]}),t)),[]).sort(c),t)),{})}function c(e,t){return t.docCount>e.docCount?1:-1}var u=r(170209);const l=["title","created","type","owner","modified","avgrating","numratings","numcomments","numviews"],d={name:"title"},p={orgId:{type:"filter",dataType:"string",defaultOp:"any",catalogDefinition:!0},q:{type:"simple"},page:{type:"simple"},tags:{type:"filter",dataType:"string",defaultOp:"any"},source:{type:"filter",dataType:"string",defaultOp:"any"},bbox:{type:"simple"},location_name:{type:"simple"},sort:{type:"simple"},groupIds:{type:"filter",dataType:"string",defaultOp:"any",catalogDefinition:!0},catalog:{type:"simple"},owner:{type:"filter",dataType:"string",defaultOp:"any"},access:{type:"filter",dataType:"string",defaultOp:"any"},type:{type:"filter",dataType:"string",defaultOp:"any"},hubType:{type:"filter",dataType:"string",defaultOp:"any"},downloadable:{type:"filter",dataType:"boolean"},hasApi:{type:"filter",dataType:"boolean"},openData:{type:"filter",dataType:"boolean"},id:{type:"filter",dataType:"string",defaultOp:"any",catalogDefinition:!0},collection:{type:"filter",dataType:"string",defaultOp:"any"},sector:{type:"filter",dataType:"string",defaultOp:"any"},region:{type:"filter",dataType:"string",defaultOp:"any"},initiativeId:{type:"filter",dataType:"string",defaultOp:"any",catalogDefinition:!0},categories:{type:"filter",dataType:"string",defaultOp:"any"},license:{type:"filter",dataType:"string",defaultOp:"any"},modified:{type:"filter",dataType:"string",defaultOp:"between"}};function h(e){return e?Object.keys(e).reduce(((t,r)=>{const n=p[r]||{};if(e[r]&&"filter"===n.type&&n.dataType){const i=e[r];t[r]=function(e,t){const r=e.match(/(any|all|between)\((.+)\)/);return r?{fn:r[1],terms:r[2].split(","),catalogDefinition:t.catalogDefinition}:{fn:t.defaultOp||null,terms:e.split(","),catalogDefinition:t.catalogDefinition}}(i,n)}return t}),{}):{}}var m=r(507707);function f(e){return{any:" OR ",all:" AND ",not:" NOT ",between:" TO "}[e||"any"]}const g={downloadable:function(e){let t,r;return"true"===((0,n.W)(e,"downloadable.terms")||[])[0]?(t=i.b.downloadableTypes.map((e=>`type:"${e}"`)),r=i.b.downloadableTypeKeywords.map((e=>`typekeywords:"${e}"`))):(t=i.b.downloadableTypes.map((e=>`-type:"${e}"`)),r=i.b.downloadableTypeKeywords.map((e=>`-typekeywords:"${e}"`))),`(${t.concat(r).join(" OR ")})`},hasApi:function(e){let t;return t=((0,n.W)(e,"hasApi.terms")||[])[0]?i.b.apiTypes.map((e=>`type:"${e}"`)).join(" OR "):i.b.apiTypes.map((e=>`-type:"${e}"`)).join(" OR "),`(${t})`},groupIds:function(e){return`(${((0,n.W)(e,"groupIds.terms")||[]).map((e=>`group:"${e}"`)).join(" OR ")})`},collection:function(e){return`(${((0,n.W)(e,"collection.terms")||[]).map((e=>(0,o.yu)(e))).filter((e=>!!e)).reduce(((e,t)=>(t.forEach((t=>{e.push(`type:"${t}"`)})),e)),[]).join(" OR ")})`}};function y(e){const t=[],r=[];if(Object.keys(e).forEach((i=>{let s;s=g[i]?g[i](e,i):function(e,t){const r=(0,n.W)(e,`${t}.terms`)||[],i=(0,n.W)(e,`${t}.fn`);let s;if("between"===i){const e=r[0];let n=r[1];e===n&&(n=(0,m.E4)(e,1));const o=[e,n].map((e=>new Date(e).getTime()));s=`${t.toLowerCase()}: [${o.join(f(i))}]`}else s=r.map((e=>`${t.toLowerCase()}:"${e}"`)).join(f(i));return"not"===i&&(s=`NOT ${s}`),`(${s})`}(e,i),e[i].catalogDefinition?t.push(s):r.push(s)})),t.length){const e=`(${t.join(" OR ")})`;return r.length?`${e} AND (${r.join(" AND ")})`:e}return r.length?r.join(" AND "):""}const b=["tags","type","access","categories"],v={collection:"type"},w=3;async function S(e,t,r,i){const s=function(e={}){const t={q:null,start:(0,n.W)(e,"page.start")||1,num:(0,n.W)(e,"page.size")||10};let r=['-type:"code attachment"'];if(e.restricted&&r.push("-access:public"),e.q&&r.push(e.q),e.catalog){const t=h(e.catalog);r.push(y(t))}const i=h(e),s=h(e.filter),o=Object.assign(Object.assign({},i),s);if(Object.keys(o).length&&r.push(y(o)),r=r.filter((e=>!!e)),t.q=r.join(" AND "),e.bbox&&(t.bbox=e.bbox),e.sort){const r="-"===e.sort[0]?"desc":"asc";let n="desc"===r?e.sort.substring(1).split(",")[0]:e.sort.split(",")[0];a=n,n=l.indexOf(a)>=0?a:a in d?d[a]:void 0,n&&(t.sortField=n,t.sortOrder=r)}var a;if(e.agg&&e.agg.fields){let r;r=Array.isArray(e.agg.fields)?e.agg.fields.join(","):e.agg.fields;const{countFields:n,countSize:i}=function(e){const t=e.split(",").filter((e=>b.indexOf(e)>-1)),r=e.split(",").filter((e=>Object.keys(v).indexOf(e)>-1));return Object.keys(v).forEach((e=>{r.indexOf(e)>-1&&!(v[e]in t)&&t.push(v[e])})),{countFields:t.join(","),countSize:200}}(r);t.countFields=n,t.countSize=i}return t}(e);if(s.countFields){const e=(0,m.F3)(s.countFields.split(","),w).map((e=>e.join(","))).map((e=>{const n=e;return(0,u.KT)(Object.assign(Object.assign({},s),{params:{token:t,countFields:n,countSize:s.countSize},countFields:n,portal:r,authentication:i,httpMethod:"POST"}))})),o=await Promise.all(e);let a=[];for(const e of o){const t=(0,n.W)(e,"aggregations.counts")||[];a=a.concat(t)}return o[0].aggregations={counts:a},o[0]}return(0,u.KT)(Object.assign(Object.assign({},s),{params:{token:t},portal:r,httpMethod:"POST",authentication:i}))}const E=["downloadable"],T=["hasApi","collection"],I={downloadable:function(e){return e.results.reduce(((e,t)=>((t.typeKeywords||[]).indexOf("Data")>-1||i.b.downloadableTypes.indexOf(t.type)>-1?e.downloadable.true++:e.downloadable.false++,e)),{downloadable:{true:0,false:0}})},hasApi:function(e={}){const t=((0,n.W)(e,"counts")||[]).filter((e=>"type"===e.fieldName))[0];return t?t.fieldValues.reduce(((e,t)=>(s.indexOf(t.value)>-1?e.hasApi.true+=t.count:e.hasApi.false+=t.count,e)),{hasApi:{true:0,false:0}}):{hasApi:{}}},collection:function(e={}){const t=((0,n.W)(e,"counts")||[]).filter((e=>"type"===e.fieldName))[0];return t?t.fieldValues.reduce(((e,t)=>{const r=(0,o.n3)(t.value);let n;return n=r?r.toLowerCase().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "):"Other",e.collection[n]=t.count,e}),{collection:{}}):{collection:{}}}};function C(e,t){return e.filter((e=>-1!==t.indexOf(e)))}function A(e,t,r){if(e)try{const n=e.match(new RegExp(t,"ig"));if(!n)return;return n.reduce(function(e){return(t,r)=>{const n=`<mark class="hub-search-highlight ${e}-highlight">${r}</mark>`;return t.replace(new RegExp(r,"g"),n)}}(r),e)}catch(e){return}}function O(e){const t=(0,o.n3)(e.type),r={name:e.title,searchDescription:e.description,hubType:t||"Other",collection:(0,o.r$)(e),extent:(n=e.extent,{coordinates:n,type:"envelope"})};var n;return Object.assign(Object.assign({},e),r)}
14async function _(e,t,r,i){const s=await S(e,t,r,i),o=function(e,t={},r){const n=Object.assign({},r);return{data:e.results.map((e=>function(e,t){const r={id:e.id,type:"item",attributes:O(e)};return t&&(r.meta={},r.meta.highlights=function(e,t){return{name:A(e.title,t,"name"),searchDescription:A(e.description,t,"description")}}(e,t)),r}(e,n.q))),meta:{query:e.query,queryParameters:n,stats:{aggs:t,count:e.results.length,totalCount:e.total},page:{start:e.start,size:e.num,nextStart:e.nextStart}}}}(s,await async function(e={counts:Array()},t,r,i,s){const o=(0,n.W)(t,"agg.fields"),c=o?o.split(","):[];let u=C(c,E),l={};if(u.length>0){const e=Object.assign(Object.assign({},t),{start:1,num:100});e.agg={};const n=await S(e,r,i,s);u.forEach((e=>{const t=I[e](n);l=Object.assign(Object.assign({},l),a(t))}))}const d=e.counts.reduce(((e,t)=>(e[t.fieldName]=t.fieldValues.map((e=>({key:e.value,docCount:e.count}))),e)),{});u=C(c,T);let p={};u.length>0&&u.forEach((t=>{const r=Object.assign({},I[t](e));p=Object.assign(Object.assign({},p),a(r))}));const h=Object.assign(Object.assign(Object.assign({},l),d),p);return h.categories&&(h.categories=function(e=[]){const t=new Set,r=["","categories"];return e.forEach((e=>{e.key.split("/").filter((e=>-1===r.indexOf(e))).forEach((e=>{t.add(e)}))})),Array.from(t).reduce(((t,r)=>{const n=e.filter((e=>e.key.includes(r))).map((e=>e.docCount)).reduce(((e,t)=>e+t));return t.push({key:r,docCount:n}),t}),[])}(h.categories)),h}(s.aggregations,e,t,r),e);return o}function D(e){const t=function(e={}){return Object.keys(e).map((t=>{const r=e[t],{fn:n,terms:i}=r,s=r.catalogDefinition?"catalog":"filter",o=encodeURIComponent(`${s}[${t}]`),a=i.map(encodeURIComponent).join(",");return n?`${o}=${n}(${a})`:`${o}=${a}`})).join("&")}(h(e)),r=Object.keys(e).filter((e=>{return!(p[t=e]&&"filter"===p[t].type);var t})),i={};r.forEach((t=>{i[t]=e[t]}));const s=function(e={}){const t=function(e={}){const t=[],r=[{obj:e,path:[]}];for(;r.length>0;){const e=r.pop();Object.keys(e.obj).forEach((n=>{if("object"==typeof e.obj[n]){const i=e.path.concat(n);t.push(i),r.unshift({obj:e.obj[n],path:i})}else t.push(e.path.concat(n))}))}return t}(e).filter((t=>"object"!=typeof(0,n.W)(e,t.join(".")))),r=[];return t.forEach((t=>{let i="";for(let e=0;e<t.length;e++)i+=0===e?t[e]:`[${t[e]}]`;const s=encodeURIComponent((0,n.W)(e,t.join("."))||""),o=encodeURIComponent(i);return s&&r.push(`${o}=${s}`),i})),r.join("&")}(i),o=[];return s&&o.push(s),t&&o.push(t),o.join("&")}var P;function k(e,t=10,r,n){const i=r?function(e,t,r,n){const i=e.map(((e,t)=>({data:e,label:t.toString()}))),s=new M(i,t,r),o={data:[]};for(;o.data.length<n&&s.length()>0;){const e=s.remove();e.data.length>0&&(o[e.label]=o[e.label]?o[e.label]+1:1,o.data.push(e.data.splice(0,1)[0]),s.insert(e))}return o}(e,r,n,t):function(e,t){const r={data:[]};let n=x(e);for(;!R(r.data.length,t)&&n>0;){const i=[];e.forEach(((e,n)=>{e.length>0&&U(i,r.data,t)&&(r[n.toString()]=r[n.toString()]?r[n.toString()]+1:1,i.push(e.splice(0,1)[0]))})),r.data.push(...i),n=x(e)}return r}(e,t);for(let t=0;t<e.length;t++)i[t.toString()]||(i[t.toString()]=0);return i}function x(e){return e.reduce(((e,t)=>e+t.length),0)}function R(e,t){return e-t>=0}function U(e,t,r){return t.length+e.length<r}!function(e){e.asc="asc",e.desc="desc"}(P||(P={}));class M{constructor(e,t,r="ASC"){this._validate({cmptr:t,direction:r}),this._comparator=t,this._direction=r,this._initialize(e)}insert(e){if(!this._hasData(e))return
15;this._nodes.push(e);let t=this.length()-1,r=this._getParentIndex(t);for(;this._shouldSwap(r,t);)this._swap(r,t),t=r,r=this._getParentIndex(t)}remove(){if(0===this.length())return null;this._swap(0,this.length()-1);const e=this._nodes.pop();return this._siftDown(0),e}length(){return this._nodes.length}heap(){return this._nodes}_initialize(e){if(this._nodes=[],e&&0!==e.length)for(const t of e)this.insert(t)}_siftDown(e){let[t,r]=this._getChildIndices(e),n=this._shouldSwap(t,r)?r:t;for(;!this._isInvalidIndex(n)&&this._shouldSwap(e,n);)this._swap(e,n),e=n,[t,r]=this._getChildIndices(e),n=this._shouldSwap(t,r)?r:t}_getParentIndex(e){return Math.trunc((e-1)/2)}_getChildIndices(e){return[2*e+1,2*e+2]}_shouldSwap(e,t){return!this._isInvalidIndex(e)&&!this._isInvalidIndex(t)&&(this._greaterThan(e,t)&&"ASC"===this._direction||this._lessThan(e,t)&&"DESC"===this._direction)}_isInvalidIndex(e){return e<0||e>=this.length()}_lessThan(e,t){return this._comparator(this._nodes[e].data,this._nodes[t].data)<0}_greaterThan(e,t){return this._comparator(this._nodes[e].data,this._nodes[t].data)>0}_hasData(e){return e&&void 0!==e.data&&null!==e.data}_swap(e,t){if(e===t)return;const r=this._nodes[e];this._nodes[e]=this._nodes[t],this._nodes[t]=r}_validate(e){if(!e.cmptr)throw new Error("Comparator function must be defined");if(!e.direction)throw new Error("Provided heap direction is invali
15d")}}const N=(e,t)=>e+t;function j(e=[],t=N){if(!Array.isArray(e)||0===e.length)return[];const r=function(e,t){return e.reduce(((e,r)=>(Object.keys(r).forEach((n=>{e[n]?e[n]=function(e,t,r){const n=Object.assign(e);return Object.keys(t).forEach((i=>{n[i]?n[i]=r(e[i],t[i]):n[i]=t[i]})),n}(e[n],r[n],t):e[n]=r[n]})),e)),{})}(e.map((e=>function(e){return e.reduce(((e,t)=>{const r=function(e){return(e.aggregations||[]).reduce(((e,t)=>(void 0!==t.value&&null!==t.value&&(e[t.label.toLowerCase()]=t.value),e)),{})}(t);return Object.keys(r).length>0&&(e[t.fieldName.toLowerCase()]=r),e}),{})}(e))),t);return function(e){return Object.keys(e).map((t=>{const r=Object.keys(e[t]).map((r=>({label:r,value:e[t][r]})));return{fieldName:t,aggregations:r}}))}(r)}var $=r(899415);class F extends Error{constructor(e,t){super(e),this.input=t}}function G(e){if(!e||!Array.isArray(e))throw new F("Invalid Input Error. Must be array of IDataPageNextStart, received: "+typeof e,e);const t=e.reduce(((e,t)=>(e[t.label]=t.nextPageStart||1,e)),{});return(0,$.btoa)(JSON.stringify(t))}},702954:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DEFAULT_THEME:()=>n.DEFAULT_THEME,PAGE_DRAFT_INCLUDE_LIST:()=>i,PAGE_TEMPLATE_KEYWORD:()=>Te,PAGE_TYPE_KEYWORD:()=>Se,SITE_DRAFT_INCLUDE_LIST:()=>s,UNPUBLISHED_CHANGES_KW:()=>o,_createSiteInitiative:()=>dt,_ensureOptionalGroupsTemplating:()=>Ve,_ensurePortalDomainKeyword:()=>E,_ensureTypeAndTags:()=>ze,_getDraftResourceNames:()=>P,_getImageCropIdsFromLayout:()=>L,_getMostRecentDraftName:()=>U,_getPortalDomainTypeKeyword:()=>S,_getSecondPassSharingOptions:()=>wt,_getSharingEligibleModels:()=>Et,_getSiteDataById:()=>vt,_includeListFromItemType:()=>l,_removeParentInitiative:()=>Be,_removeSiteDomains:()=>qe,_removeSiteFromIndex:()=>We,_removeSiteGroups:()=>Le,_secondPassAdlibPages:()=>It,_updatePages:()=>Ct,_updateTeamTags:()=>pt,addDomain:()=>n.addDomain,applyDraft:()=>F,buildDraft:()=>n.buildDraft,convertCard:()=>Y,convertLayoutToTemplate:()=>re,convertPageToTemplate:()=>xe,convertRow:()=>Q,convertSection:()=>ee,convertSiteToTemplate:()=>bt,createPage:()=>Oe,createPageModelFromTemplate:()=>Me,createSite:()=>ot,createSiteModelFromTemplate:()=>gt,deleteDraft:()=>k,domainExists:()=>n.domainExists,domainExistsPortal:()=>n.domainExistsPortal,ensureOptionalGroupsTemplating:()=>et,ensurePageHasSiteEntry:()=>Ne,ensureRequiredPageProperties:()=>Ee,ensureRequiredSiteProperties:()=>rt,ensureUniqueDomainName:()=>n.ensureUniqueDomainName,extractAssets:()=>X,fetchAndApplyDraft:()=>G,fetchDraft:()=>$,getCardDependencies:()=>ne,getDataForSiteItem:()=>Ot,getDomain:()=>Ge,getDomains:()=>Fe,getDomainsForSite:()=>n.getDomainsForSite,getDraftDate:()=>R,getLayoutDependencies:()=>oe,getMembers:()=>Dt,getPageDependencies:()=>ve,getPageEditUrl:()=>be,getPageItemType:()=>we,getPortalSiteHostname:()=>at,getPortalSiteUrl:()=>ct,getRowDependencies:()=>ie,getSectionDependencies:()=>se,getSiteById:()=>n.getSiteById,getSiteDependencies:()=>ke,getSiteEditUrl:()=>Ye,getSiteItemType:()=>Ke,getUniqueDomainName:()=>n.getUniqueDomainName,getUniqueDomainNamePortal:()=>n.getUniqueDomainNamePortal,hasUnpublishedChanges:()=>d,interpolateSite:()=>ft,isDomainForLegacySite:()=>n.isDomainForLegacySite,isDomainUsedElsewhere:()=>n.isDomainUsedElsewhere,isPage:()=>u,isSite:()=>c,isValidDomain:()=>n.isValidDomain,linkSiteAndPage:()=>Ae,lookupDomain:()=>n.lookupDomain,markPublished:()=>h,markUnpublished:()=>m,removeDomain:()=>n.removeDomain,removePage:()=>ye,removeSite:()=>tt,removeSiteFromPage:()=>de,removeUnusedResources:()=>ae,saveDraft:()=>x,savePublishedStatus:()=>A,shareItemsToSiteGroups:()=>Tt,siteSecondPass:()=>At,unlinkPagesFromSite:()=>Xe,unlinkSiteAndPage:()=>ge,updateAppRedirectUris:()=>Ze,updateDomain:()=>n.updateDomain,updatePage:()=>C,updateSite:()=>T,updateSiteApplicationUris:()=>Je,upgradeDraftSchema:()=>j,upgradeSiteSchema:()=>n.upgradeSiteSchema});var n=r(690259);const i=["data.values.layout"],s=["item.properties.schemaVersion","data.values.layout","data.values.theme","data.values.headerCss","data.values.headerSass","data.values.footerSass","data.values.footerCss"],o="state:hasUnpublishedChanges";var a=r(559573);function c(e){return"Hub Site Application"===(0,a.KF)(e)}function u(e){return"Hub Page"===(0,a.KF)(e)}function l(e){let t;if(c(e))t=s;else{if(!u(e))throw TypeError("@esri/hub-sites: drafts only belong to a site or a page item model");t=i}return t}function d(e){return(0,n.includes)(e.item.typeKeywords,o)}var p=r(507707);function h(e){const t=(0,p.kI)(e);return t.item.typeKeywords=t.item.typeKeywords.filter((e=>e!==o)),t}function m(e){const t=(0,p.kI)(e);return(0,n.includes)(t.item.typeKeywords,o)||t.item.typeKeywords.push(o),t}var f=r(212347),g=r(264263),y=r(183530),b=r(954108),v=r(540923);const w="2.4";function S(e){return`hubsubdomain|${e}`.toLowerCase()}function E(e,t=[]){const r=S(e);return(0,n.includes)(t,r)?t:t.reduce(((e,t)=>(/^hubsubdomain/.test(t)||e.push(t),e)),[r])}function T(e,t){const r=t.allowList||[],{updateVersions:i=!0}=t;let s;return(0,f.q)(e,"data.values.uiVersion",w),(0,f.q)(e,"data.values.updatedAt",(new Date).toISOString()),(0,f.q)(e,"data.values.updatedBy",t.authentication.username),r.length&&(r.push("data.values.updatedAt"),r.push("data.values.updatedBy"),i&&(r.push("data.values.uiVersion"),r.push("item.properties.schemaVersion"))),t.isPortal&&(e.item.typeKeywords=E((0,g.W)(e,"data.values.subdomain"),e.item.typeKeywords),r.length&&r.push("item.typeKeywords")),s=r.length?(0,n.getSiteById
15)(e.item.id,t):Promise.resolve(e),s.then((n=>(r.length&&(e=(0,y.P)(e,n,r)),(0,b.$G)({item:(0,v.S)(e),authentication:t.authentication,params:{clearEmptyFields:!0}})))).catch((e=>{throw Error(`updateSite: Error updating site: ${e}`)}))}var I=r(719339);function C(e,t){const r=Array.isArray(t.allowList)?t.allowList:[];e.data.values.updatedAt=(new Date).toISOString(),e.data.values.updatedBy=t.authentication.username,e.item.url="";let n=Promise.resolve(e);return r.length&&(n=(0,I.PD)((0,g.W)(e,"item.id"),t)),n.then((n=>{r.length&&(e=(0,y.P)(e,n,r));const i=Object.assign({item:(0,v.S)(e)},t);return i.params={clearEmptyFields:!0},(0,b.$G)(i)}))}function A(e,t){const r=["item.typeKeywords"],{item:n}=e;let i;if(c(n)){const n=d(e);i=T(e,Object.assign(Object.assign({},t),{allowList:r,updateVersions:!n}))}else{if(!u(n))throw TypeError("@esri/hub-sites: only page or site models have a published state");i=C(e,Object.assign(Object.assign({},t),{allowList:r}))}return i}var O=r(560486),_=r(170209);const D=/^draft-(\d+).json$/;function P(e,t){return(0,_.C)(e,{portal:t.portal,authentication:t.authentication}).then((e=>e.resources.map((({resource:e})=>e)).filter((e=>-1!==e.search(D)))))}function k(e,t){const{item:{id:r,owner:n}}=e;return P(r,t).then((e=>Promise.all(e.map((e=>(0,_.ug)({id:r,owner:n,resource:e,portal:t.portal,authentication:t.authentication}))))))}function x(e,t){const r=l(e.item),i=(0,n.buildDraft)(e,r),s=(0,O.O)(i),o=`draft-${Date.now()}.json`,a=(0,g.W)(e,"item.id");return k(e,t).then((r=>(0,_.zJ)({id:a,owner:(0,g.W)(e,"item.owner"),resource:s,name:o,private:!1,portal:t.portal,authentication:t.authentication}))).then((e=>i))}function R(e){const t=D.exec(e);let r;try{r=new Date(parseInt(t[1],10))}catch(e){r=null}return r}function U(e,t){return P(e,t).then((e=>{if(!e.length)return null;const t=e.map((e=>[e,R(e)]));return t.sort((([e,t],[r,n])=>n>t?1:t>n?-1:0)),t[0][0]}))}const M="item.properties.schemaVersion",N=1.3;function j(e){if(void 0===(0,g.W)(e,"item.properties.schemaVersion")&&(0,f.q)(e,M,N),e=(0,n.migrateBadBasemap)(e),e=(0,n.migrateWebMappingApplicationSites)(e),(0,g.W)(e,"item.properties.schemaVersion")===n.SITE_SCHEMA_VERSION)return e;{let t=e;return t=(0,n._ensureTelemetry)(e),t=(0,n._migrateFeedConfig)(e),t=(0,n._migrateEventListCardConfigs)(e),t=(0,n._migrateTelemetryConfig)(e),t=(0,n._migrateToV2Catalog)(e),t}}function $(e,t){return U(e,t).then((r=>{let n=null;return r&&(n=(0,_.AA)(e,{fileName:r,readAs:"json",authentication:t.authentication,portal:t.portal})),n})).then((e=>(e&&function(e){return void 0!==(0,g.W)(e,"data.values.capabilities")&&void 0!==(0,g.W)(e,"data.values.theme")}(e)&&(e=j(e)),e)))}function F(e,t){if(!t)return e;const r=l(e.item);return(0,y.P)(t,(0,p.kI)(e),r)}function G(e,t){return $((0,g.W)(e,"item.id"),t).then((t=>F(e,t)))}function L(e){const t=[],r=(0,g.W)(e,"header.component.settings.logo");return r&&r.cropId&&t.push(r),((0,g.W)(e,"sections")||[]).reduce(H,t).filter(V).map(K)}function H(e,t){const r=t.rows.reduce(B,[]).filter(W).map(q);return(0,g.W)(t,"style.background.cropSrc")&&r.unshift(t.style.background),e.concat(r)}function B(e,t){return e.concat(t.cards)}function W(e){return["image-card","jumbotron-card"].indexOf(e.component.name)>-1}function q(e){return e.component.settings}function V(e){return!!e.cropId}function K(e){return e.cropId}const z={"event-list-card":function(e){return e.component.settings.initiativeIds=["{{initiative.item.id}}"],{card:e,assets:[]}},"follow-initiative-card":function(e){return e.component.settings.initiativeId="{{initiative.item.id}}",{card:e,assets:[]}},"items/gallery-card":function(e){const t=e.component.settings,r=(0,g.W)(t,"version");return(0,g.W)(t,"groups")&&r<4&&(t.groups=[{title:"{{solution.title}}",id:"{{teams.contentGroupId}}"}]),(0,g.W)(t,"query.groups")&&(t.query.groups=r>=4?["{{teams.contentGroupId}}"]:[{title:"{{solution.title}}",id:"{{teams.contentGroupId}}"}]),(0,g.W)(t,"query.orgId")&&(t.query.orgId="{{organization.id}}"),(0,g.W)(t,"orgId")&&(t.orgId="{{organization.id}}"),t.siteId&&(t.siteId="{{appid}}"),{card:e,assets:[]}},"image-card":J,"jumbotron-card":J};function Y(e){const t=(0,p.kI)(e),r=z[t.component.name];return r?r(t):{card:t,assets:[]}}function J(e){const t={card:e,assets:[]};return(0,g.W)(e,"component.settings.fileSrc")&&t.assets.push(e.component.settings.fileSrc),(0,g.W)(e,"component.settings.cropSrc")&&t.assets.push(e.component.settings.cropSrc),t}function Q(e){return e.cards.reduce(Z,{assets:[],cards:[]})}function Z(e,t){const r=Y(t);return e.assets=e.assets.concat(r.assets),e.cards.push(r.card),e}function X(e){const t=[];
15return e.fileSrc&&t.push(e.fileSrc),e.cropSrc&&t.push(e.cropSrc),t}function ee(e){const{rows:t,assets:r}=e.rows.reduce(te,{assets:[],rows:[]}),n={section:(0,p.kI)(e),assets:r};var i;return n.section.rows=t,i=e,(0,g.W)(i,"style.background.fileSrc")&&n.assets.push(...X(e.style.background)),n}function te(e,t){const{assets:r,cards:n}=Q(t);return e.assets.push(...r),e.rows.push({cards:n}),e}function re(e){if(!e)return null;const t=e.sections.reduce(((e,t)=>{const r=ee(t);return e.assets=e.assets.concat(r.assets),e.sections.push(r.section),e}),{assets:[],sections:[]}),r={assets:t.assets,layout:{sections:t.sections}};return e.header&&(r.layout.header=(0,p.kI)(e.header)),e.footer&&(r.layout.footer=(0,p.kI)(e.footer)),r}function ne(e){return function(e){switch(e){case"webmap-card":return["component.settings.webmap"];case"survey-card":return["component.settings.surveyId"];case"app-card":case"summary-statistic-card":return["component.settings.itemId"];case"items/gallery-card":return["component.settings.ids"];default:return[]}}((0,g.W)(e,"component.name")).reduce(function(e){return(t,r)=>{const n=(0,g.W)(e,r);return n?Array.isArray(n)?t.concat(n):t.concat([n]):t}}(e),[])}function ie(e){return e.cards.reduce(((e,t)=>{const r=ne(t);return r.length&&(e=e.concat(r)),e}),[])}function se(e){return e.rows.reduce(((e,t)=>e.concat(ie(t))),[])}function oe(e){return e.sections.reduce(((e,t)=>e.concat(se(t))),[])}function ae(e,t,r){const i=L(t);return(0,_.C)(e,r).then((t=>{const s=(t.resources||[]).map(ce).filter(ue);delete r.params;const o=function(e,t){return function(e){return e.length>0}(e)?t.filter(function(e){const t=new RegExp(`-crop-(${e.join("|")}).png$`);return e=>!e.match(t)}(e)):t}(i,s);return function(e,t,r){const i=(0,n.failSafe)(_.ug,{success:!0});return Promise.all(t.map((t=>i({id:e,resource:t,authentication:r}))))}(e,o,r.authentication)}))}function ce(e){return e.resource}function ue(e){return 0===e.indexOf("hub-image-card-crop-")}var le=r(518944);function de(e,t){return(0,le.t)(t,"data.values.sites",[]).filter((t=>t.id!==e))}var pe=r(549213),he=r(85067),me=r(172044),fe=r(232982);function ge(e){let t=[];const r=[];let i,s;const o={authentication:e.authentication};return Promise.all([(0,he.G)("page",e),(0,he.G)("site",e)]).then((e=>{if([i,s]=e,!s.isMissing){const e=(0,le.t)(s,"data.values.pages",[]);s.data.values.pages=(0,n.withoutByProp)("id",i.item.id,e),t=(0,p.Yp)((0,g.W)(s,"item.properties.collaborationGroupId"),t),t=(0,p.Yp)((0,g.W)(s,"item.properties.contentGroupId"),t),r.push((0,me.A)(s,o))}if(!i.isMissing){const e=(0,le.t)(i,"data.values.sites",[]);i.data.values.sites=(0,n.withoutByProp)("id",s.item.id,e),r.push((0,me.A)(i,o));const a=(0,n.failSafe)(fe.z);r.push(a(i.item.id,t,o))}return Promise.all(r)})).then((()=>({pageModel:i,siteModel:s})))}function ye(e,t){let r,i=Promise.resolve(e);return"string"==typeof e&&(i=(0,I.PD)(e,t)),i.then((e=>{r=e;const i=(0,n.mapBy)("id",(0,le.t)(r,"data.values.sites",[])),s=(0,n.failSafe)(ge);return Promise.all(i.map((e=>{const n=Object.assign({pageModel:r,siteId:e},t);return s(n)})))})).then((()=>(0,pe.v)(r,t))).then((()=>{const e=Object.assign({id:r.item.id},t);return(0,_.cl)(e)}))}function be(e,t,r){let n="";return t&&(n=r),`${n}/edit?pageId=${e.id}`}function ve(e){return oe((0,le.t)(e,"data.values.layout",{}))}function we(e){let t="Hub Page";return e&&(t="Site Page"),t}const Se="hubPage";function Ee(e,t){const r=(0,p.kI)(e);return r.item.owner=t.username,r.item.access="private",r.data.values||(r.data.values={}),r.data.values.updatedAt=(new Date).toISOString(),r.data.values.updatedBy=t.username,r.data.values.sites||(r.data.values.sites=[]),r.item.url&&(r.item.url=""),r.item.type=we(t.isPortal),-1===r.item.typeKeywords.indexOf(Se)&&r.item.typeKeywords.push(Se),r}const Te="hubPageTemplate";var Ie=r(843350),Ce=r(558871);function Ae(e){let t=[];const r=[];let i,s;const o={authentication:e.authentication};return Promise.all([(0,he.G)("page",e),(0,he.G)("site",e)]).then((a=>{if([i,s]=a,s.isMissing||i.isMissing){let e=`The Page item (${i.item.id}) is inaccessible.`;throw s.isMissing&&(e=i.isMissing?`Both the Page item (${i.item.id}) and the Site item (${s.item.id}) are inaccssible`:`The Site item (${s.item.id}) is inaccessible.`),new Error(`Linking Failed: ${e}`)}
15{if(!c(s.item)||!(0,n.includes)(["Hub Page","Site Page"],i.item.type))return Promise.resolve([]);const a={id:s.item.id,title:s.item.title};(0,g.W)(i,"data.values.sites")||(0,f.q)(i,"data.values.sites",[]);const u=(0,g.W)(i,"data.values.sites");if(!(0,n.includes)(u.map((e=>e.id)),a.id)){i.data.values.sites.push(a);const e=Object.assign({item:(0,v.S)(i)},o);r.push((0,b.$G)(e))}const l={id:i.item.id,title:i.item.title};(0,g.W)(s,"data.values.pages")||(0,f.q)(s,"data.values.pages",[]);const d=(0,g.W)(s,"data.values.pages");if(!(0,n.includes)(d.map((e=>e.id)),l.id)){const t=(0,n.mapBy)("slug",d);l.slug=e.pageSlug||(0,n.ensureUniqueString)(t,(0,n.slugify)(l.title)),s.data.values.pages.push(l);const i=Object.assign({item:(0,v.S)(s)},o);r.push((0,b.$G)(i))}t=(0,p.Yp)((0,g.W)(s,"item.properties.collaborationGroupId"),t),t=(0,p.Yp)((0,g.W)(s,"item.properties.contentGroupId"),t);const h=(0,n.failSafe)(Ce.L);return r.push(h(l.id,t,o)),Promise.all(r)}})).then((()=>({pageModel:i,siteModel:s}))).catch((e=>{throw Error(`Error occured linking site ${s.item.id} with ${i.item.id}: ${e}`)}))}function Oe(e,t,r){if(!r.authentication)throw new Error("createPage must be passed hubRequestOptions.authentication");const n=Ee(e,{username:r.authentication.username,isPortal:r.isPortal}),i=(0,v.S)(n);return(0,b.fC)({item:i,owner:n.item.owner,authentication:r.authentication}).then((e=>(n.item.id=e.id,(0,_.Q4)({id:n.item.id,owner:n.item.owner,authentication:r.authentication})))).then((e=>{let i=[];return Array.isArray(t.shareTo)&&t.shareTo.length&&(i=t.shareTo.map((e=>{const t=e.confirmItemControl||!1;return(0,_.Ju)({id:n.item.id,groupId:e.id,authentication:r.authentication,confirmItemControl:t})})),n.item.access="shared"),Promise.all(i)})).then((e=>{const t=(0,le.t)(n,"data.values.sites",[]),i={authentication:r.authentication};return Promise.all(t.map((e=>Ae(Object.assign({siteId:e.id,pageModel:n},i)))))})).then((e=>{const i=(0,le.t)(t,"assets",[]);return(0,Ie.x)(n,i,r)})).then((()=>n)).catch((e=>{throw Error(`createPage: Error creating page: ${e}`)}))}var _e=r(144989),De=r(407515),Pe=r(858252);function ke(e){const t=((0,g.W)(e,"data.values.pages")||[]).map((e=>e.id));return oe((0,g.W)(e,"data.values.layout")||{}).concat(t)}function xe(e,t){const r=(0,p.kI)(e);r.type=we(t.isPortal),r.key=`${(0,n.propifyString)(e.item.title)}_${(0,p.Mc)("i")}`,r.itemId=e.item.id,r.item=(0,_e.y)(r.item),r.data.values.sites=[],["source","updatedAt","updatedBy","folderId","slug"].forEach((e=>{delete r.data.values[e]}));const i=re(r.data.values.layout);return r.data.values.layout=i.layout,r.dependencies=ke(e),r.data=(0,De.P)(r.data,r.itemId),r.item.properties||(r.item.properties={}),(0,Pe.t)(e.item,t).then((e=>(r.assets=e.filter((e=>-1===e.name.search(D))),r)))}var Re=r(178240),Ue=r(732289);function Me(e,t,r,i){e.assets=(0,Re.l)(e,i);const s=(0,Ue.s)(e,t,r);s.item.properties||(s.item.properties={});const o=(0,g.W)(t,"initiative.id");return o&&(0,f.q)(s,"item.properties.parentInitiativeId",o),(0,f.q)(s,"data.values.slug",(0,n.slugify)(s.item.title)),Promise.resolve(s)}function Ne(e,t){const r=e.item.id,n=(0,g.W)(e,"item.properties.parentInitiativeId");if(n){const e=(0,g.W)(t,"data.values.sites").find((e=>e.id===n));e&&(e.id=r)}return(0,g.W)(t,"data.values.sites").find((e=>e.id===r))||t.data.values.sites.push({id:r,title:"Current Site to ensure clean removal"}),t}var je=r(348753),$e=r(641675);function Fe(e,t){const r=(0,n._getDomainServiceUrl)((0,$e.g)(t)),i=Object.assign({params:{siteId:e},httpMethod:"GET"},t);return(0,je.WY)(r,i)}function Ge(e,t){return Fe(e,t).then((e=>{if(e.length>1){const t=e.reduce(((e,t)=>(t.hostname.includes("arcgis.com")||(e=t),e)),null);return t?t.hostname:e[0].hostname}return e[0].hostname}))}function Le(e,t){const r=["collaborationGroupId","contentGroupId","followersGroupId"].reduce(((t,r)=>(0,p.Yp)((0,g.W)(e,`item.properties.${r}`),t)),[]).map((e=>{const r=Object.assign({id:e},t);return(0,n._unprotectAndRemoveGroup)(r)}));return Promise.all(r)}var He=r(60386);function Be(e,t){const r=(0,g.W)(e,"item.properties.parentInitiativeId");if(r){const n=Object.assign({id:r,owner:e.item.owner},t);return(0,He.$)(n)}return Promise.resolve()}function We(e,t){if(t.isPortal)return Promise.resolve();{const r=`${(0,$e.g)(t)}/api/v3/${e.item.id}`,n={method:"DELETE",mode:"cors",headers:{Authorization:t.authentication.token}};return fetch(r,n).then((e=>e.json())).then((e=>({success:!0}))).catch((e=>{throw Error(`_removeSiteFromIndex: Error removing site from index: ${e}`)}))}}function qe(e,t){return t.isPortal?Promise.resolve([]):(0,n.removeDomainsBySiteId)(e,t).then((e=>e))}function Ve(e){const t=(0,p.kI)(e);return["collaborationGroupId","contentGroupId","followersGroupId"].forEach((e=>{const r=(0,g.W)(t,`properties.${e}`);r&&(r.match(/^\{\{.*\}\}$/)?r.match(/:optional\}\}$/g)||(t.properties[e]=r.replace("}}",":optional}}")):delete t.properties[e])})),t}function Ke(e){let t="Hub Site Application";return e&&(t="Site Application"),t}function ze(e,t){return(e=(0,p.kI)(e)).item.type=Ke(t),Array.isArray(e.item.typeKeywords)||(e.item.typeKeywords=[]),(0,n.includes)(e.item.typeKeywords,"hubSite")||e.item.typeKeywords.push("hubSite"),e}function Ye(e){return`${e.url}/edit`}function Je(e,t,r){return r.isPortal?Promise.resolve({}):(0,n.getDomainsForSite)(e.item.id,r).then((i=>{const s=i.filter((e=>!(0,n.includes)(t,e.hostname))),o=i.map((e=>e.hostname)),a=t.filter((e=>!(0,n.includes)(o,e))),c=[];
15return s.forEach((e=>c.push((0,n.removeDomain)(e.id,r)))),a.forEach((t=>c.push((0,n.addDomain)({orgKey:r.portalSelf.urlKey,orgId:r.portalSelf.id,orgTitle:r.portalSelf.name,hostname:t,siteId:e.item.id,siteTitle:e.item.title,clientKey:e.data.values.clientId,sslOnly:!i[0]||!!i[0].sslOnly},r)))),Promise.all(c)}))}var Qe=r(737720);function Ze(e,t,r){const n=`${(0,Qe.i)(r)}/oauth2/apps/${e}/update`,i={method:"POST",authentication:r.authentication,params:{client_id:e,redirect_uris:JSON.stringify(t)}};return(0,je.WY)(n,i)}function Xe(e,t){const r=(0,n.mapBy)("id",(0,le.t)(e,"data.values.pages",[])),i=(0,n.failSafe)(ge);return Promise.all(r.map((r=>{const n=Object.assign({siteModel:e,pageId:r},t);return i(n)})))}function et(e){const t=(0,p.kI)(e);return["collaborationGroupId","contentGroupId","followersGroupId"].forEach((e=>{const r=(0,g.W)(t,`properties.${e}`);r&&(r.match(/^\{\{.*\}\}$/)?r.match(/:optional\}\}$/g)||(t.properties[e]=r.replace("}}",":optional}}")):delete t.properties[e])})),t}function tt(e,t){let r,i;return r="string"==typeof e?(0,I.PD)(e,t):Promise.resolve(e),r.then((e=>(i=e,Xe(i,t)))).then((()=>Le(i,t))).then((()=>Be(i,t))).then((()=>qe(i.item.id,t))).then((()=>(0,n.failSafe)(We,{success:!0})(i,t))).then((()=>{const e=Object.assign({id:i.item.id,owner:i.item.owner},t);return(0,He.$)(e)})).catch((e=>{throw Error(`removeSite: Error removing site: ${e}`)}))}function rt(e,t,r=!1){if((e=(0,p.kI)(e)).item.owner=t,e.item.access="private",Array.isArray(e.item.typeKeywords)||(e.item.typeKeywords=[]),e.data.values.updatedAt=(new Date).toISOString(),e.data.values.updatedBy=t,r&&e.item.typeKeywords.push(S(e.data.values.subdomain)),!e.item.url){const t=(0,g.W)(e,"data.values.customHostname")||(0,g.W)(e,"data.values.defaultHostname");let r="https";e.data.values.customHostname&&(r="http"),e.item.url=`${r}://${t}`}Array.isArray((0,g.W)(e,"data.values.pages"))||(0,f.q)(e,"data.values.pages",[]),(0,f.q)(e,"data.values.uiVersion",w);const n=((e=ze(e,r)).data.values.capabilities||[]).reduce(((e,t)=>e.includes(t)?e:[...e,t]),["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav"]);return r||n.includes("socialSharing")||n.push("socialSharing"),(0,f.q)(e,"data.values.capabilities",n),(0,g.W)(e,"data.telemetry")||(0,f.q)(e,"data.telemetry",{}),e}var nt=r(147868),it=r(94684),st=r(411767);function ot(e,t,r){return e=rt(e,r.authentication.username,r.isPortal),(0,b.fC)({item:(0,v.S)(e),owner:e.item.owner,authentication:r.authentication}).then((t=>(e.item.id=t.id,(0,_.Q4)({id:e.item.id,owner:e.item.owner,authentication:r.authentication})))).then((t=>(0,n.addSiteDomains)(e,r))).then((t=>{e.data.values.clientId=t[0].clientKey;const n=(0,p.kI)(e.data.values.dcatConfig);delete e.data.values.dcatConfig;const i="data.feeds",s=(0,p.kI)((0,g.W)(e,i));return delete e.data.feeds,e=(0,nt.V)(e),n&&(e.data.values.dcatConfig=n),s&&(0,it.t)(i,s,e),(0,b.$G)({item:(0,v.S)(e),authentication:r.authentication})})).then((n=>(0,Ie.x)(e,t.assets||[],r))).then((t=>{let n=Promise.resolve({success:!0});const i=(0,g.W)(e,"item.properties.collaborationGroupId");return i&&(n=(0,_.Ju)({id:e.item.id,groupId:i,authentication:r.authentication,confirmItemControl:!0})),n})).then((t=>{const n=(0,g.W)(e,"item.properties.parentInitiativeId");return n?(0,st.v)(n,e.item.id,r):Promise.resolve(!0)})).then((t=>e)).catch((e=>{throw Error(`site-utils::createSite - Error creating site ${JSON.stringify(e)}`)}))}function at(e,t){let r;r=t.allSSL?443!==t.httpsPort?`:${t.httpsPort}`:"":80!==t.httpPort?`:${t.httpPort}`:"";const n=t.portalHostname.split("/"),i=n[0];let s="/";return n[1]&&(s=`/${n[1]}/`),`${i}${r}${s}apps/sites/#/${e}`}function ct(e,t){let r="http:";return t.allSSL&&(r="https:"),`${r}//${at(e,t)}`}var ut=r(668805),lt=r(832842);function dt(e,t,r,n){const i={};return(0,ut.s)(e,n).then((e=>{e.item.url=t.solution.url,e.item.title=t.solution.title,e.item.owner=n.authentication.username,e.item.typeKeywords=(0,p.zu)(e.item.typeKeywords,"Hub Initiative Template"),e.item.type="Hub Initiative",Object.assign(e.item.properties,t.teams);const i=(0,Ue.s)(e,t,r);return(0,lt.Kw)(i,n)})).then((e=>{i.model=e;let r=Promise.resolve({success:!0});const s=(0,g.W)(t,"teams.collaborationGroupId");return s&&(r=(0,_.Ju)({id:e.item.id,groupId:s,authentication:n.authentication,confirmItemControl:!0})),r})).then((e=>i.model)).catch((e=>{throw Error(`site-utils::_createSiteInitiative Error ${e}`)}))}function pt(e,t,r){let n=Promise.resolve({success:!0});if((0,g.W)(t,"props.followersGroupId")){const i=t.groups.find((e=>e.id===t.props.followersGroupId));i.tags.push(`hubInitiativeFollowers|${e.item.id}`),n=(0,_.mD)({group:i,authentication:r.authentication})}return n}var ht=r(665688),mt=r(176504);function ft(e,t,r){const n=(0,p.kI)(e),i=(0,p.kI)(n.data.values.dcatConfig),s=(0,p.kI)(n.data.feeds);delete n.data.values.dcatConfig,delete n.data.feeds;const o=(0,Ue.s)(n,t,r);return i&&(o.data.values.dcatConfig=i),s&&(o.data.feeds=s),o}
15function gt(e,t,r,i){e.assets=(0,Re.l)(e,i),e.item.properties||(e.item.properties={}),["customHostname","externalUrl","contentGroupId","followersGroupId","collaborationGroupId","parentInitiativeId"].forEach((t=>{delete e.data.values[t]}));let s=(0,g.W)(t,"solution.title")||"New Site";"number"==typeof s&&(s=s.toString(),(0,f.q)(t,"solution.title",s));const o={};return(0,mt.t)({title:s,types:["core","content","followers"],hubRequestOptions:i}).then((r=>{t.teams=(0,p.kI)(r.props),o.teams=r,Object.assign(e.item.properties,r.props),(0,g.W)(r,"props.contentGroupId")&&(0,f.q)(e,"data.catalog.groups",[r.props.contentGroupId]);let a=s;return function(e){return e.charCodeAt(0)>255||yt.test(e)}(a)&&(a="site"),(0,n.ensureUniqueDomainName)((0,n.slugify)(a),i)})).then((e=>{const r=i.portalSelf;if(t.solution.theme=(0,n.getOrgDefaultTheme)(r),t.solution.subdomain=e,i.isPortal)t.solution.defaultHostname=at(e,r),t.solution.url=ct(e,r);else{const n=(0,ht.G)((0,$e.g)(i));t.solution.defaultHostname=`${e}-${r.urlKey}.${n}`,t.solution.url=`https://${e}-${r.urlKey}.${n}`}})).then((n=>{const i=ft(e,t,r);return"number"==typeof i.item.title&&(i.item.title=(0,g.W)(t,"solution.title"),i.data.values.title=(0,g.W)(t,"solution.title")),i})).catch((e=>{throw Error(`site-utils::createSiteModelFromTemplate Error ${e}`)}))}const yt=/[^\u0000-\u00ff]/;function bt(e,t){const r=(0,p.kI)(e);r.type=Ke(t.isPortal),r.key=`${(0,n.propifyString)(e.item.title)}_${(0,p.Mc)("i")}`,r.itemId=e.item.id,r.item=(0,_e.y)(r.item),delete r.item.url,r.item.properties={schemaVersion:n.SITE_SCHEMA_VERSION,children:[]},r.item.title="{{solution.title}}",r.data.values.subdomain="{{solution.subdomain}}",r.data.values.defaultHostname="{{solution.defaultHostname}}",r.data.values.title="{{solution.title}}",r.data.values.subdomain="{{solution.subdomain}}",r.data.values.defaultHostname="{{solution.defaultHostname}}",delete r.data.catalog,delete r.data.values.collaborationGroupId,["updatedAt","updatedBy","clientId","siteId"].forEach((e=>{r.data.values[e]=""})),["customHostname","externalUrl","contentGroupId","followersGroupId","groups"].forEach((e=>{delete r.data.values[e]})),(0,g.W)(r,"data.values.defaultExtent")&&(r.data.values.defaultExtent="{{organization.defaultExtent}}"),(0,g.W)(r,"data.values.map.basemaps.primary.extent")&&(r.data.values.map.basemaps.primary.extent="{{organization.defaultExtent}}");const i=re(r.data.values.layout);return r.data.values.layout=i.layout,r.data=(0,De.P)(r.data,r.itemId),r.dependencies=ke(e),(0,Pe.t)(e.item,t).then((e=>(r.assets=e.filter((e=>-1===e.name.search(D))),r)))}function vt(e,t){return(0,_.m_)(e,t).then((e=>(e.values.groupId&&!e.values.collaborationGroupId&&(e.values.collaborationGroupId=e.values.groupId,delete e.values.groupId),e)))}function wt(e){return[{prop:"item.properties.contentGroupId",itemControl:!1},{prop:"item.properties.collaborationGroupId",itemControl:!0}].reduce(((t,r)=>{const n=(0,g.W)(e,r.prop);return n&&t.push({id:n,confirmItemControl:r.itemControl}),t}),[])}var St=r(163698);function Et(e,t,r){return function(e,t,r){const n=e=>(0,St.m)(e.item,r).then((({form:e,featureService:t,fieldworker:r,stakeholder:n})=>[e,t,r,n].filter(Boolean))),i=t.reduce(((e,t)=>"Form"===t.item.type?[...e,n(t)]:e),[Promise.resolve([e])]);return Promise.all(i).then((e=>e.reduce(((e,t)=>[...e,...t]),[])))}(e,t,r).then((e=>t.reduce(((t,r)=>e.find((({item:{id:e}})=>r.item.id===e))?t:[...t,r]),[])))}function Tt(e,t,r){const i=(0,n.failSafe)(_.Ju,{success:!0}),s=wt(e);return Et(e,t,r).then((e=>Promise.all(e.reduce(((e,t)=>{const n=s.map((e=>{const n={id:t.item.id,groupId:e.id,confirmItemControl:e.confirmItemControl,authentication:r.authentication};return i(n)}));return e.concat(n)}),[]))))}function It(e,t){const r={teams:["collaborationGroupId","followersGroupId","contentGroupId"].reduce(((t,r)=>{const n=(0,g.W)(e,`item.properties.${r}`);return n&&(t[r]=n),t}),{}),siteId:(0,g.W)(e,"item.id"),siteUrl:(0,g.W)(e,"item.url"),initiative:{item:{id:(0,g.W)(e,"item.properties.parentInitiativeId")}}};return r[e.key]=e,(0,Ue.s)(t,r)}function Ct(e,t,r){const i=t.filter((e=>e.item.type.indexOf("Page")>-1)),s=(0,n.failSafe)(b.$G,{success:!0}),o={id:e.item.id,title:e.item.title};return Promise.all(i.map((t=>(t.data.values.sites.push(o),t=It(e,t),s({item:(0,v.S)(t),authentication:r.authentication})))))}function At(e,t,r){let n=[];return n=n.concat(Tt(e,t,r)),n=n.concat(Ct(e,t,r)),Promise.all(n)}function Ot(e,t){return(0,_.m_)(e.id,t).then((t=>(0,n.upgradeSiteSchema)({item:e,data:t})))}var _t=r(153105);function Dt(e,t){return t.authentication?function(e,t){const r=`${(0,_t.a)(t)}/sharing/rest/community/users`,i=[];for(let t=0;t<e.length;t+=100)i.push(e.slice(t,t+100));const s=i.map((e=>{const n=e.map((e=>`username:"${e}"`)).join(" OR ");return{urlPath:r,requestOptions:Object.assign({params:{filter:n,num:e.length}},t)}}));return(0,n.batch)(s,Pt).then((e=>e.reduce(((e,t)=>e.concat(t)),[])))}(e,t):function(e,t){return Promise.all(e.map((e=>(0,_.PR)(Object.assign({username:e},t)).then((e=>{if(e.firstName||e.lastName||e.fullName)return e})).catch((t=>(n.Logger.error(`Error fetching user, ${e}, from AGO user endpoint, ${t}`),null)))))).then((e=>e.filter(Boolean)))}(e,t)}function Pt(e){return(0,je.WY)(e.urlPath,e.requestOptions).then((e=>e.results)).catch((e=>(n.Logger.error(`Error fetching members from AGO user search endpoint: ${e}`),[])))}},810241:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDetailedSurveyStatus:()=>v,getGroupSharingDetails:()=>l,getInputFeatureServiceModel:()=>n.P,getSourceFeatureServiceModelFromFieldworker:()=>i.M,getStakeholderModel:()=>
15s.R,getSurveyModels:()=>o.m,getSurveyStatus:()=>b,getSurveyStatusFromSchedule:()=>w,isDraft:()=>c.m,isFieldworkerView:()=>A.n,isPublished:()=>u,migrateFormPropertiesSettings:()=>T,setAccess:()=>h,setAccessRevertable:()=>p,shareWithGroup:()=>f,shareWithGroupRevertable:()=>m,shouldDisplayResults:()=>C,unshareWithGroup:()=>y,unshareWithGroupRevertable:()=>g});var n=r(279433),i=r(13095),s=r(911378),o=r(163698),a=r(170209),c=r(73414);function u(e){return!(0,c.m)(e)}const l=(e,t,r)=>{const n=(0,a.ex)(t,r),i=(0,o.m)(e,r);return Promise.all([n,i]).then((([e,{form:t,featureService:r,fieldworker:n,stakeholder:i}])=>{let s=[];return s=u(t.item)?e.capabilities.indexOf("updateitemcontrol")>-1&&[t,r,n,i]||[t,n]:[t,r],{modelsToShare:s.filter((e=>e)),group:e}}))};var d=r(690259);const p=(e,t,r)=>{const{id:n,owner:i,access:s}=e.item,o="shared"===s?"private":s,c=r.authentication;return(0,d.runRevertableTask)((()=>(0,a.zT)({id:n,owner:i,access:t,authentication:c}).then((e=>{if(e.notSharedWith.length)throw new Error(`Failed to set item ${n} access to ${t}`);return e}))),(()=>(0,a.zT)({id:n,owner:i,access:o,authentication:c}).catch((()=>{}))))},h=(e,t,r)=>(0,o.m)(e,r).then((({form:e,fieldworker:n})=>{const i=[e];u(e.item)&&i.push(n);const s=i.reduce(((e,n)=>(n&&e.push(p(n,t,r)),e)),[]);return(0,d.processRevertableTasks)(s)})).catch((()=>{throw new Error(`Failed to set survey ${e} items access to ${t}`)})),m=(e,t,r)=>{const{id:n,owner:i}=e.item,{id:s}=t,o=r.authentication;return(0,d.runRevertableTask)((()=>(0,a.Ju)({id:n,owner:i,groupId:s,confirmItemControl:(0,d.isUpdateGroup)(t),authentication:o}).then((e=>{if(e.notSharedWith.length)throw new Error(`Failed to share item ${n} to group ${s}`);return e}))),(()=>(0,a.lF)({id:n,owner:i,groupId:s,authentication:o}).catch((()=>{}))))},f=(e,t,r)=>l(e,t,r).then((({modelsToShare:e,group:t})=>{const n=e.map((e=>m(e,t,r)));return(0,d.processRevertableTasks)(n)})).catch((()=>{throw new Error(`Failed to share survey ${e} items to group ${t}`)})),g=(e,t,r)=>{const{id:n,owner:i}=e.item,{id:s}=t,o=r.authentication;return(0,d.runRevertableTask)((()=>(0,a.lF)({id:n,owner:i,groupId:s,authentication:o}).then((e=>{if(e.notUnsharedFrom.length)throw new Error(`Failed to unshare item ${n} from group ${s}`);return e}))),(()=>(0,a.Ju)({id:n,owner:i,groupId:s,confirmItemControl:(0,d.isUpdateGroup)(t),authentication:o}).catch((()=>{}))))},y=(e,t,r)=>l(e,t,r).then((({modelsToShare:e,group:t})=>{const n=e.map((e=>g(e,t,r)));return(0,d.processRevertableTasks)(n)})).catch((()=>{throw new Error(`Failed to unshare survey ${e} items with group ${t}`)}));function b({settings:{openStatusInfo:{status:e,schedule:t}}},r){let n=e;return"scheduled"===n&&(n=w(t,r)),n}function v(e,t,r=new Date){let n=e;return"scheduled"===n&&(n=w(t,r),"scheduled"===n?n=r.toDateString()===new Date(t.start).toDateString()?"opening_today":"opening_future":"open"===n&&(n=r.toDateString()===new Date(t.end).toDateString()?"closing_today":"closing_future")),n}function w({start:e,end:t},r=new Date){let n="open";return t&&r>new Date(t)?n="closed":e&&new Date(e)>r&&(n="scheduled"),n}var S=r(507707),E=r(264263);function T(e){const t=(0,S.kI)(e);return(0,E.W)(t.form,"item.properties")||(t.form.item.properties={}),(0,E.W)(t.form,"item.properties.settings")||(t.form.item.properties.settings={}),(0,E.W)(t.form,"item.properties.settings.resultsAvailability")||(t.form.item.properties.settings.resultsAvailability="always"),t}var I=r(958328);function C(e,t,r,n){let i=Promise.resolve(!1);return t&&(i="after"===(0,E.W)(e,"properties.settings.resultsAvailability")?function(e,t,r){const n=`${e}/0`,i={where:`Creator = '${t}'`,returnCountOnly:!0};return(0,I.QH)(Object.assign({url:n,params:i},r)).then((({count:e})=>e>0))}(t.url,r,n):Promise.resolve(!0)),i}var A=r(255616)},176504:(e,t,r)=>{"use strict";r.d(t,{t:()=>u});var n=r(690259),i=r(552318),s=r(800538),o=r(246007),a=r(741626),c=r(432149);function u(e){const{title:t,types:r,hubRequestOptions:u}=e,l=(0,n.getHubProduct)(u.portalSelf),d=(0,n.getSubscriptionType)(u.portalSelf),p=(0,a.E)(u.portalSelf.user,l,d).filter((e=>r.indexOf(e.config.type)>-1)),h=(0,i.D)(u),m=(0,s.a)(h);return(0,o.Z)(m,u.portalSelf).then((e=>(0,c.s)(t,p,e,u))).catch((e=>{throw Error(`Error in team-utils::createHubTeams ${e}`)}))}},549010:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GROUP_ACCESS_PRIVS:()=>k.z,TEAMTYPES:()=>n,TYPEMAP:()=>R,_createTeamGroup:()=>h.P,_createTeamGroups:()=>l.s,_searchTeams:()=>f,_translateTeamTemplate:()=>g.s,addOrInviteCollaborationCoordinators:()=>z,addOrInviteCommunityUsers:()=>W,addOrInviteOrgUsers:()=>q,addOrInvitePartneredUsers:()=>K,addOrInviteUsersToTeam:()=>Z,addOrInviteUsersToTeams:()=>X,addOrInviteWorldUsers:()=>V,addUsersToTeam:()=>s,autoAddUsersAsAdmins:()=>G,canEditTeam:()=>$,canUserCreateTeam:()=>w,canUserCreateTeamInProduct:()=>y.K,createHubTeam:()=>d,createHubTeams:()=>p.t,doesGroupExist:()=>S.s,getAllowedGroupAccess:()=>E.D,getTeamById:()=>U,getTeamMembers:()=>M,getTeamPropertiesMapForProduct:()=>T,getTeamStatus:()=>Q,getTeamTemplate:()=>O,getTeamTypesAvailableInProduct:()=>_,getTeamsAvailableInProduct:()=>A,getTeamsForProduct:()=>D,getUniqueGroupTitle:()=>P.C,getUserCreatableTeams:()=>u.E,groupUsersByOrgRelationship:()=>Y,handleNoUsers:()=>F,hasAllPrivileges:()=>x.P,processAutoAddUsers:()=>H,processEmailUsers:()=>L,processInviteUsers:()=>B,removeTeam:()=>re,removeTeamFromItems:()=>te,removeUsersFromTeam:()=>ne,removeUsersFromTeams:()=>ie,searchTeamContent:()=>j,searchTeamMembers:()=>N,teamsToAddUsersTo:()=>J,updateTeam:()=>se,updateUserMembership:()=>oe});const n=["core","content","followers","team","event","edit"];var i=r(690259);function s(e,t,r,n,s){return(0,i.addUsersToGroup)(e,t,r,n,s)}var o=r(552318),a=r(800538),c=r(246007),u=r(741626),l=r(432149);function d(e){const{title:t,type:r,props:s,hubRequestOptions:d}=e;if(-1===n.indexOf(r))throw new Error(`createHubTeam was passed ${r} which is not a valid type of team. Please send one of: ${n.join(",")}`);const p=d.portalSelf,h=(0,i.getHubProduct)(p),m=(0,i.getSubscriptionType)(p),f=(0,u.E)(p.user,h,m).filter((e=>e.config.type===r)).map((e=>"team"===e.config.type?Object.assign({},e,s):e)),g=(0,o.D)(d),y=(0,a.a)(g);return(0,c.Z)(y,d.portalSelf).then((e=>(0,l.s)(t,f,e,d))).catch((e=>{throw Error(`Error in team-utils::createHubTeam ${e}`)}))}var p=r(176504),h=r(676103),m=r(170209);function f(e){return(0,m.td)(e)}var g=r(845407),y=r(455744),b=r(264263),v=r(421443);function w(e,t,r){const n=(0,b.W)(e,"groups")||[],s=(0,v.Y)(e.orgId)-2;if(n.length>s)return!1;{const n=r.portalSelf,s=(0,i.getHubProduct)(n),o=(0,i.getSubscriptionType)(n);return(0,u.E)(e,s,o).some((e=>e.config.type===t))}}var S=r(216018),E=r(708885);function T(e){const t={content:"contentGroupId",core:"collaborationGroupId"};return"premium"===e&&(t.followers="followersGroupId"),t}var I=r(507707),C=r(441395);function A(e){const t=C.S;return(0,I.kI)(t).filter((t=>t.config.availableIn.indexOf(e)>-1))}function O(e,t){return A(t).find((t=>t.config.type===e))}function _(e){return A(e).map((e=>e.config.type))}function D(e){const t=["content","core"];return"premium"===e&&t.push("followers"),t}var P=r(441568),k=r(559907),x=r(664191);const R={core:"collaborationGroupId",content:"contentGroupId",followers:"followersGroupId"};function U(e,t){return(0,m.ex)(e,t)}function M(e,t){return(0,m.rm)(e,t)}function N(e,t){return(0,m.zv)(e,t)}function j(e){return(0,m.Nt)(e)}function $(e,t){var r,n;const i=null===(r=e.userMembership)||void 0===r?void 0:r.memberType;return(null===(n=e.userMembership)||void 0===n?void 0:n.username)===t.username&&("owner"===i||"admin"===i)}async function F(e,t,r){return{notAdded:[],notEmailed:[],notInvited:[],users:[],errors:[]}}function G(e,t,r){let n=Promise.resolve(null);if(t.length){const i={id:e,admins:t.map((e=>e.username)),authentication:r};n=(0,m.i1)(i)}return n}async function L(e){const t=(0,b.W)(e,"community"),r=[];let n=[];for(const s of t){const t=await(0,i.emailOrgUsers)([s],(0,b.W)(e,"email.message"),(0,b.W)(e,"email.auth"),!0);t.success||(r.push(s.username),t.errors&&(n=n.concat(t.errors)))}return{users:t.map((e=>e.username)),notEmailed:r,errors:n,notInvited:[],notAdded:[]}}async function H(e,t,r=!1){const n=(0,b.W)(e,t);let s,o,a=[],c=[];const{addUserAsGroupAdmin:u}=e;return s=u?await G((0,b.W)(e,"groupId"),n,(0,b.W)(e,"primaryRO")):await(0,i.autoAddUsers)((0,b.W)(e,"groupId"),n,(0,b.W)(e,"primaryRO")),s.notAdded&&(a=a.concat(s.notAdded)),s.errors&&(c=c.concat(s.errors)),r&&(o=await L(e),o.errors&&o.errors.length>0&&(c=c.concat(o.errors))),{users:n.map((e=>e.username)),notAdded:a,errors:c,notEmailed:(null==o?void 0:o.notEmailed)||[],notInvited:[]}}async function B(e,t){const r=(0,b.W)(e,t),n=[];let s=[];const{addUserAsGroupAdmin:o}=e;for(const t of r){const r=await(0,i.inviteUsers)((0,b.W)(e,"groupId"),[t],(0,b.W)(e,"primaryRO"),20160,o?"group_admin":"group_member");r.success||(n.push(t.username),r.errors&&(s=s.concat(r.errors)))}return{users:r.map((e=>e.username)),notInvited:n,errors:s,notEmailed:[],notAdded:[]}}async function W(e){let t=F,r=!1;return e.community&&e.community.length>0&&(t=e.canAutoAddUser?H:B,e.email&&(e.email.hasOwnProperty("groupId")?e.email.groupId===e.groupId&&(t=H,r=!0):(t=H,r=!0))),t(e,"community",r)}
15async function q(e){return e.org&&0!==e.org.length?e.canAutoAddUser?H(e,"org"):B(e,"org"):F()}async function V(e){return e.world&&0!==e.world.length?B(e,"world"):F()}async function K(e){return e.partnered&&0!==e.partnered.length?B(e,"partnered"):F()}async function z(e){return e.collaborationCoordinator&&0!==e.collaborationCoordinator.length?H(e,"collaborationCoordinator"):F()}function Y(e){return e.reduce(((e,t)=>(e[t.orgType].push(t),e)),{world:[],org:[],community:[],partnered:[],collaborationCoordinator:[]})}function J(e,t,r){return t&&r&&["content","followers"].forEach((t=>{r[t]&&r[t].isOk&&e.push(r[t].id)})),e}async function Q(e,t,r,n){const i={teamType:t,id:null,isOk:!1,isMissing:!0,isBroken:!1,canFix:!1,isMember:!1},s=(0,b.W)((0,b.W)(e,"properties"),R[t]);if(s)try{await U(s,n)?(i.id=s,i.isOk=!0,i.isMissing=!1):(i.id=s,i.isBroken=!0,i.canFix=w(r,t,n))}catch(e){i.id=s,i.isBroken=!0,i.canFix=w(r,t,n)}else i.canFix=w(r,t,n);return i}async function Z(e,t,r,n,i,s){const o=Y(t),a={groupId:e,primaryRO:r,allUsers:t,canAutoAddUser:n,addUserAsGroupAdmin:i,email:s},c=Object.assign(a,o),u={community:await W(c),org:await q(c),world:await V(c),partnered:await K(c),collaborationCoordinator:await z(c),notAdded:[],notInvited:[],notEmailed:[],errors:[],groupId:e};return u.notAdded=[...u.community.notAdded,...u.org.notAdded,...u.world.notAdded],u.notInvited=[...u.community.notInvited,...u.org.notInvited,...u.world.notInvited],u.notEmailed=[...u.community.notEmailed,...u.org.notEmailed,...u.world.notEmailed],u.errors=[...u.community.errors,...u.org.errors,...u.world.errors],u}async function X(e,t,r,n=!1,i=!1,s){let o=[],a=[],c=[],u=[];const l=[];for(const d of e){const e=await Z(d,t,r,n,i,s);l.push(e),o=o.concat(e.notAdded),u=u.concat(e.errors),a=a.concat(e.notInvited),c=c.concat(e.notEmailed)}return{notAdded:o,notInvited:a,notEmailed:c,errors:u,responses:l}}var ee=r(954108);async function te(e,t,r){return Promise.all(t.map((t=>{const n=(0,I.kI)(t);return n.item.properties.teams=(0,I.zu)(n.item.properties.teams,e),"admin"===n.item.itemControl||"update"===n.item.itemControl?(0,ee.$G)({item:n.item,authentication:r}):{id:n.item.id,success:!1}})))}async function re(e,t){return(await(0,m.R9)({id:e,authentication:t})).success?(0,m.BN)({id:e,authentication:t}):{groupId:e,success:!1}}async function ne(e,t,r){return(0,m.By)({id:e,users:t,authentication:r})}async function ie(e,t,r){return Promise.all(e.map((e=>ne(e,t,r))))}async function se(e,t){return(0,m.mD)({group:e,authentication:t})}async function oe(e,t,r,n){return(0,m.SJ)({id:e,users:t,newMemberType:r,authentication:n})}},676103:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(170209),i=r(441568),s=r(708885);function o(e,t,r){return t.access=(0,s.D)(t.access,e,r.portalSelf),(0,i.C)(t.title,r).then((e=>(t.title=e,(0,n.sS)({group:t,authentication:r.authentication})))).then((e=>(t.id=e.group.id,(0,n.Et)({id:t.id,authentication:r.authentication})))).then((()=>(t.userMembership={username:e.username,memberType:"owner",applications:0},t))).catch((e=>{throw Error(`Error in team-utils::_createTeamGroup ${e}`)}))}},432149:(e,t,r)=>{"use strict";r.d(t,{s:()=>s});var n=r(845407),i=r(676103);function s(e,t,r,s){const o=t.map((t=>(0,n.s)(t,e,r)));return Promise.all(o.map((e=>(0,i.P)(s.portalSelf.user,e,s)))).then((e=>{const t=e.reduce(((e,t)=>(t.config.propertyName&&(e[t.config.propertyName]=t.id),e)),{});return e.forEach((e=>delete e.config)),{props:t,groups:e}})).catch((e=>{throw Error(`Error in team-utils::_createTeamGroups ${e}`)}))}},845407:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(264263);function i(e,t,r){return["titleI18n","descriptionI18n","snippetI18n"].forEach((i=>{const s=e.config[i],o=i.replace("I18n",""),a=(0,n.W)(r,`addons.services.teams.groups.${s}`);e[o]=a.replace(/{title}/g,t)})),e}},455744:(e,t,r)=>{"use strict";r.d(t,{K:()=>a});var n=r(664191),i=r(264263),s=r(690259),o=r(421443);function a(e,t,r){let a=!1;const c=(0,o.Y)(e.orgId)-5;return((0,i.W)(e,"groups")||[]).length<=c&&(0,s.includes)(r.config.availableIn,t)&&(a=(0,n.P)(e,r.config.requiredPrivs)),a}},216018:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(170209);function i(e,t){const r={q:`(title:"${e}" accountid:${t.portalSelf.id})`,authentication:t.authentication};return(0,n.td)(r).then((e=>e.results.length>0)).catch((e=>{throw Error(`Error in team-utils::doesGroupExist ${e}`)}))}},708885:(e,t,r)=>{"use strict";r.d(t,{D:()=>o});var n=r(664191),i=r(559907),s=r(264263);function o(e,t,r){const o=!!(0,s.W)(r,"canSharePublic")&&(0,n.P)(t,i.z.public),a=(0,n.P)(t,i.z.org);let c=e;return"public"!==e||o?"org"!==e||a||(c="private"):(c="org",a||(c="private")),c}},441568:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(216018);function i(e,t,r=0){let s=e;return r&&(s=`${e} ${r}`),(0,n.s)(s,t).then((n=>n?(r++,i(e,t,r)):s)).catch((e=>{throw Error(`Error in team-utils::getUniqueGroupTitle ${e}`)}))}},741626:(e,t,r)=>{"use strict";r.d(t,{E:()=>u});var n=r(507707),i=r(441395),s=r(455744),o=r(690259);const a=["Demo & Marketing","Demo and Marketing","Organizational Plan","Community","In House","ConnectED","ELA","Education Site License","Education","HUP Online"];var c=r(518944);function u(e,t,r=""){const u=i.S,l=function(e,t){const r=(0,n.kI)(e),i=a;return(0,o.includes)(i,t)||(r.privileges=(0,n.zu)(r.privileges,"portal:user:addExternalMembersToGroup")),r}(e,r);return(0,n.kI)(u).reduce(((e,r)=>{const i=function(e,t){const r=(0,n.kI)(t);
15return(0,c.t)(t,"config.privPropValues",[]).forEach((t=>{(0,o.includes)(e.privileges,t.priv)&&(r[t.prop]=t.value)})),r}(l,r);return(0,s.K)(l,t,i)&&e.push(i),e}),[])}},421443:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i});const n={default:512,mJaJSax0KPHoCNB6:700,q5DTBtIqgaEcBe1j:700,z6hI6KRjKHvhNO0r:700,Xj56SBi2udA78cC9:700,"7ldwmV3MFwjrElY8":700};function i(e){return n[e]||n.default}},559907:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});const n={public:["portal:user:createGroup","portal:user:shareGroupToPublic"],org:["portal:user:createGroup","portal:user:shareGroupToOrg"],private:["portal:user:createGroup"]}},664191:(e,t,r)=>{"use strict";function n(e,t){let r=!1;return Array.isArray(t)&&(r=t.every((t=>e.privileges.indexOf(t)>-1))),r}r.d(t,{P:()=>n})},441395:(e,t,r)=>{"use strict";r.d(t,{S:()=>n});const n=[{config:{groupType:"Hub Collaboration Group",type:"core",availableIn:["premium"],propertyName:"collaborationGroupId",requiredPrivs:["portal:admin:createUpdateCapableGroup"],titleI18n:"collaborationTitle",descriptionI18n:"collaborationDesc",snippetI18n:"collaborationSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:"collaboration"}]},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",_edit_privacy:"on",_edit_contributors:"on",tags:["Hub Group","Hub Initiative Group","Hub Site Group","Hub Core Team Group","Hub Team Group"]},{config:{groupType:"Hub Collaboration Group",type:"core",availableIn:["basic"],propertyName:"collaborationGroupId",requiredPrivs:["portal:admin:createUpdateCapableGroup"],titleI18n:"collaborationTitleBasic",descriptionI18n:"collaborationDescBasic",snippetI18n:"collaborationSnippetBasic",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:"collaboration"}]},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",_edit_privacy:"on",_edit_contributors:"on",tags:["Hub Group","Hub Site Group","Hub Core Team Group","Hub Team Group"]},{config:{groupType:"Portal Collaboration Group",type:"core",availableIn:["portal"],propertyName:"collaborationGroupId",requiredPrivs:["portal:user:createGroup","portal:admin:createUpdateCapableGroup"],titleI18n:"collaborationTitlePortal",descriptionI18n:"collaborationDescPortal",snippetI18n:"collaborationSnippetPortal"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",_edit_privacy:"on",_edit_contributors:"on",tags:["Sites Group","Sites Core Team Group"]},{config:{groupType:"Hub Content Group",type:"content",availableIn:["premium"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitle",descriptionI18n:"contentDesc",snippetI18n:"contentSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:""}]},access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"org",tags:["Hub Group","Hub Content Group","Hub Site Group","Hub Initiative Group"]},{config:{groupType:"Hub Content Group",type:"content",availableIn:["basic"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitleBasic",descriptionI18n:"contentDescBasic",snippetI18n:"contentSnippetBasic",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",
16prop:"membershipAccess",value:""}]},access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"org",tags:["Hub Group","Hub Content Group","Hub Site Group"]},{config:{groupType:"Portal Content Group",type:"content",availableIn:["portal"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitle",descriptionI18n:"contentDescPortal",snippetI18n:"contentSnippetPortal"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Sites Group","Sites Content Group"]},{config:{groupType:"Hub Followers Group",type:"followers",availableIn:["premium"],propertyName:"followersGroupId",requiredPrivs:["portal:user:createGroup"],titleI18
16n:"followersTitle",descriptionI18n:"followersDesc",snippetI18n:"followersSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:""}]},access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!0,notificationsEnabled:!0,sortField:"title",sortOrder:"asc",membershipAccess:"org",tags:["Hub Group","Hub Initiative Followers Group","Hub Initiative Group"]},{config:{groupType:"Generic AGO Site Team",type:"team",availableIn:["basic"],requiredPrivs:["portal:user:createGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Site Team Group"]},{config:{groupType:"Generic AGO Initiative Team",type:"team",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"",tags:["Hub Team Group"]},{config:{groupType:"Generic AGO Edit Supporting Team",type:"edit",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"teamTitle",descriptionI18n:"editTeamDesc",snippetI18n:"editTeamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",tags:["Hub Team Group"],typekeyword:["Hub Team","Hub Edit Supporting Team"]},{config:{groupType:"Generic Portal Edit Supporting Team",type:"edit",availableIn:["portal"],requiredPrivs:["portal:user:createGroup"],titleI18n:"teamTitle",descriptionI18n:"editTeamDesc",snippetI18n:"editTeamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",tags:["Site Team Group"],typekeyword:["Site Team","Site Edit Supporting Team"]},{config:{groupType:"Generic Portal Team",type:"team",availableIn:["portal"],requiredPrivs:["portal:user:createGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Site Team Group"]},{config:{groupType:"Generic Event Team",type:"event",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"eventTeamTitle",descriptionI18n:"eventTeamDesc",snippetI18n:"eventTeamSnippet"},access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!1,sortField:"title",sortOrder:"asc",membershipAccess:"",tags:["Hub Group","Hub Event Group","Hub Initiative Group"]}]},427342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unprotectItem=t.unprotectGroup=t.updateItemResource=t.svcAdminAddToServiceDefinition=t.shareItemWithGroup=t.restUpdateItem=t.restUpdateGroup=t.restSearchItems=t.restRemoveGroup=t.restRemoveFolder=t.restGetUser=t.request=t.removeItemResource=t.queryRelated=t.getSelf=t.getRelatedItems=t.getGroupContent=t.getGroup=t.addItemResource=t.UserSession=t.encodeFormData=t.ArcGISAuthError=t.restRemoveItem=t.removeGroupUsers=t.restSearchGroups=t.setItemAccess=t.searchGroupContent=t.getPortalUrl=t.restGetPortal=t.getUserContent=t.restGetItemResources=t.getItemData=t.getItem=t.restGetGroupCategorySchema=t.SearchQueryBuilder=t.protectItem=t.moveItem=t.createItemInFolder=t.createItem=t.createGroup=t.createFolder=t.addItemRelationship=t.restAddItemData=t.applyEdits=t.addFeatures=t.queryFeatures=t.svcAdminCreateFeatureService=void 0;const n=r(425356),i=r(152176),s=r(883276);var o=r(883276);Object.defineProperty(t,"svcAdminCreateFeatureService",{enumerable:!0,get:function(){return o.createFeatureService}}),Object.defineProperty(t,"queryFeatures",{enumerable:!0,get:function(){return o.queryFeatures}}),Object.defineProperty(t,"addFeatures",{enumerable:!0,get:function(){return o.addFeatures}}),Object.defineProperty(t,"applyEdits",{enumerable:!0,get:function(){return o.applyEdits}});var a=r(425356);Object.defineProperty(t,"restAddItemData",{enumerable:!0,get:function(){return a.addItemData}}),Object.defineProperty(t,"addItemRelationship",{enumerable:!0,get:function(){return a.addItemRelationship}}),Object.defineProperty(t,"createFolder",{enumerable:!0,get:function(){return a.createFolder}}),Object.defineProperty(t,"createGroup",{enumerable:!0,get:function(){return a.createGroup}}),Object.defineProperty(t,"createItem",{enumerable:!0,get:function(){return a.createItem}}),Object.defineProperty(t,"createItemInFolder",{enumerable:!0,get:function(){return a.createItemInFolder}}),Object.defineProperty(t,"moveItem",{enumerable:!0,get:function(){return a.moveItem}}),Object.defineProperty(t,"protectItem",{enumerable:!0,get:function(){return a.protectItem}}),Object.defineProperty(t,"SearchQueryBuilder",{enumerable:!0,get:function(){return a.SearchQueryBuilder}}),Object.defineProperty(t,"restGetGroupCategorySchema",{enumerable:!0,get:function(){return a.getGroupCategorySchema}}),Object.defineProperty(t,"getItem",{enumerable:!0,get:function(){return a.getItem}}),Object.defineProperty(t,"getItemData",{enumerable:!0,get:function(){return a.getItemData}}),Object.defineProperty(t,"restGetItemResources",{enumerable:!0,get:function(){return a.getItemResources}}),Object.defineProperty(t,"getUserContent",{enumerable:!0,get:function(){return a.getUserContent}}),Object.defineProperty(t,"restGetPortal",{enumerable:!0,get:function(){return a.getPortal}}),Object.defineProperty(t,"getPortalUrl",{enumerable:!0,get:function(){return a.getPortalUrl}}
16),Object.defineProperty(t,"searchGroupContent",{enumerable:!0,get:function(){return a.searchGroupContent}}),Object.defineProperty(t,"setItemAccess",{enumerable:!0,get:function(){return a.setItemAccess}}),Object.defineProperty(t,"restSearchGroups",{enumerable:!0,get:function(){return a.searchGroups}}),Object.defineProperty(t,"removeGroupUsers",{enumerable:!0,get:function(){return a.removeGroupUsers}}),Object.defineProperty(t,"restRemoveItem",{enumerable:!0,get:function(){return a.removeItem}});var c=r(152176);Object.defineProperty(t,"ArcGISAuthError",{enumerable:!0,get:function(){return c.ArcGISAuthError}}),Object.defineProperty(t,"encodeFormData",{enumerable:!0,get:function(){return c.encodeFormData}}),Object.defineProperty(t,"UserSession",{enumerable:!0,get:function(){return c.ArcGISIdentityManager}}),t.addItemResource=function(e){return(0,n.addItemResource)(e)},t.getGroup=function(e,t){return(0,n.getGroup)(e,t)},t.getGroupContent=function(e,t){return(0,n.getGroupContent)(e,t)},t.getRelatedItems=function(e){return(0,n.getRelatedItems)(e)},t.getSelf=function(e){return(0,n.getSelf)(e)},t.queryRelated=function(e){return(0,s.queryRelated)(e)},t.removeItemResource=function(e){return(0,n.removeItemResource)(e)},t.request=function(e,t){return(0,i.request)(e,t)},t.restGetUser=function(e){return(0,n.getUser)(e)},t.restRemoveFolder=function(e){return(0,n.removeFolder)(e)},t.restRemoveGroup=function(e){return(0,n.removeGroup)(e)},t.restSearchItems=function(e){return(0,n.searchItems)(e)},t.restUpdateGroup=function(e){return(0,n.updateGroup)(e)},t.restUpdateItem=function(e){return(0,n.updateItem)(e)},t.shareItemWithGroup=function(e){return(0,n.shareItemWithGroup)(e)},t.svcAdminAddToServiceDefinition=function(e,t){return(0,s.addToServiceDefinition)(e,t)},t.updateItemResource=function(e){return(0,n.updateItemResource)(e)},t.unprotectGroup=function(e){return(0,n.unprotectGroup)(e)},t.unprotectItem=function(e){return(0,n.unprotectItem)(e)}},776822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCompleteItem=void 0;const n=r(963333),i=n.__importStar(r(336418)),s=n.__importStar(r(721195)),o=n.__importStar(r(115632));t.getCompleteItem=async function(e,t){const r=await s.getItemBase(e,t),n=await Promise.all([s.getItemDataAsFile(e,r.name,t),s.getItemThumbnailAsFile(e,r.thumbnail,!1,t),s.getItemMetadataAsFile(e,t),s.getItemResourcesFiles(e,t),s.getItemRelatedItemsInSameDirection(e,"forward",t),s.getItemRelatedItemsInSameDirection(e,"reverse",t)]),[a,c,u,l,d,p]=n,h={base:r,data:a,thumbnail:c,metadata:u,resources:l,fwdRelatedItems:d,revRelatedItems:p};if("Feature Service"===r.type)h.featureServiceProperties=await i.getFeatureServiceProperties(r.url,t);else if("Workflow"===r.type){const e=await o.getWorkflowBaseURL(t),n=await i.getWorkflowConfigurationZip(r.id,e,t);h.workflowConfiguration=await o.extractWorkflowFromZipFile(n)}return Promise.resolve(h)}},230038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHubRequestOptions=void 0;const n=r(849287),i=r(427342);t.createHubRequestOptions=function(e,t={}){const r=[];return t.organization?r.push(Promise.resolve(t.organization)):r.push((0,i.getSelf)({authentication:e})),r.push((0,i.restGetUser)({authentication:e})),Promise.all(r).then((([t,r])=>{t.user=r;const i={authentication:e,portalSelf:t,isPortal:t.isPortal};return t.isPortal||(i.hubApiUrl=(0,n.getHubUrlFromPortal)(t)),i}))}},957531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteEmptyGroups=void 0;const n=r(426775);t.deleteEmptyGroups=function(e,t){return 0===e.length?Promise.resolve([]):Promise.all(e.map((e=>(0,n.deleteGroupIfEmpty)(e,t)))).then((t=>e.filter(((e,r)=>t[r]))))}},426775:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteGroupIfEmpty=void 0;const n=r(427342);t.deleteGroupIfEmpty=function(e,t){let r,i;return t.getUsername().then((i=>(r=i,(0,n.getGroup)(e,{authentication:t})))).then((s=>{if(s.owner!==r)return Promise.resolve(null);i=s.protected;const o={paging:{num:1},authentication:t};return(0,n.getGroupContent)(e,o)})).then((r=>{if(!r||r.total>0)return Promise.resolve({success:!1});if(i){const r={id:e,authentication:t};return(0,n.unprotectGroup)(r)}return Promise.resolve({success:!0})})).then((r=>{if(r.success){const r={id:e,authentication:t};return(0,n.restRemoveGroup)(r)}return Promise.resolve({success:!1})})).then((e=>Promise.resolve(e.success))).catch((()=>Promise.resolve(!1)))}},50014:(e,t,r)=>{"use strict";
16Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSolutionContents=void 0;const n=r(963333),i=r(408102),s=n.__importStar(r(957531)),o=n.__importStar(r(504413)),a=n.__importStar(r(437006)),c=n.__importStar(r(359576)),u=n.__importStar(r(902471));t.deleteSolutionContents=function(e,t,r,n){const l=n||{};let d,p,h=0,m=0,f=[];return new Promise((n=>{let g=Promise.resolve([{id:t.id,title:t.title,folder:t.folder,items:[],groups:[]},{id:t.id,title:t.title,folder:t.folder,items:[],groups:[]}]);if(t.items.length>0){e&&(f=t.items.map((e=>e.id)).concat([e]));const n=t.items.filter((e=>"Hub Site Application"===e.type)).map((e=>e.id));h=100/(t.items.length+2),u.reportProgress(m+=h,l),g=c.removeItems(t,n,r,m,h,l)}g.then((e=>([d,p]=e,new Promise((n=>{s.deleteEmptyGroups(t.groups,r).then((()=>{n(e)}))}))))).then((()=>e?0===p.items.length?a.deleteSolutionItem(e,r):Promise.resolve({success:!1,itemId:e}):Promise.resolve({success:!0,itemId:""}))).then((n=>n.success?(u.reportProgress(99,l,e,i.EItemProgressStatus.Finished),o.deleteSolutionFolder(f,t.folder,r)):Promise.resolve(!1))).then((()=>{n([d,p])})).catch((()=>{n([d,p])}))}))}},504413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSolutionFolder=void 0;const n=r(427342);t.deleteSolutionFolder=function(e,t,r){return r.getUser({authentication:r}).then((e=>{const i=(new n.SearchQueryBuilder).match(r.username).in("owner").and().match(e.orgId).in("orgid").and().match(t).in("ownerfolder");return(0,n.restSearchItems)({q:i,authentication:r})})).then((i=>0===i.results.map((e=>e.id)).filter((t=>!e.includes(t))).length?(0,n.restRemoveFolder)({folderId:t,owner:r.username,authentication:r}):Promise.resolve({success:!0}))).then((e=>e.success))}},437006:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSolutionItem=void 0;const n=r(427342),i=r(336418);t.deleteSolutionItem=function(e,t){const r={id:e,authentication:t};return(0,n.unprotectItem)(r).then((r=>r.success?(0,i.removeItem)(e,t):Promise.resolve(r))).then((t=>Promise.resolve({success:t.success,itemId:e})))}},321540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(963333);n.__exportStar(r(957531),t),n.__exportStar(r(426775),t),n.__exportStar(r(504413),t),n.__exportStar(r(437006),t),n.__exportStar(r(663708),t),n.__exportStar(r(359576),t),n.__exportStar(r(902471),t)},663708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructBuildOrderIds=void 0;const n=r(963333).__importStar(r(651632));t.reconstructBuildOrderIds=function(e){return n.topologicallySortItems(e).buildOrder}},359576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeItems=void 0;const n=r(963333),i=r(408102),s=n.__importStar(r(902471)),o=n.__importStar(r(910238)),a=r(427342),c=r(336418),u=n.__importStar(r(115632)),l=r(230038);t.removeItems=function e(t,r,n,d,p,h={}){let m,f;const g=t.items.shift(),y=d+p*(t.items.length+1);return g?e(t,r,n,d,p,h).then((e=>([m,f]=e,(0,a.unprotectItem)({id:g.id,authentication:n})))).then((async()=>{if(r.includes(g.id)){const e=await(0,l.createHubRequestOptions)(n);return o.removeSite(g.id,e)}if("Workflow"===g.type){const e=await u.getWorkflowBaseURL(n);return u.deleteWorkflowItem(g.id,e,n)}return(0,c.removeItem)(g.id,n)})).then((()=>(m.items.push(g),s.reportProgress(y,h,g.id,i.EItemProgressStatus.Finished),[m,f]))).catch((e=>{const t=e.error?.message||e.message;return t&&t.includes("Item does not exist or is inaccessible")?s.reportProgress(y,h,g.id,i.EItemProgressStatus.Ignored):(f.items.push(g),s.reportProgress(y,h,g.id,i.EItemProgressStatus.Failed)),[m,f]})):(m={id:t.id,title:t.title,folder:t.folder,items:[],groups:[]},f={id:t.id,title:t.title,folder:t.folder,items:[],groups:[]},Promise.resolve([m,f]))}},902471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportProgress=void 0;const n=r(408102);t.reportProgress=function(e,t,r="",i=n.EItemProgressStatus.Started){const s=Math.round(e);t.progressCallback&&t.progressCallback(s,t.jobId,{event:"",data:r}
16),t.consoleProgress&&console.log(Date.now(),r,t.jobId??"",n.SItemProgressStatus[i],s+"%")}},182017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSolutionByComponents=t.deleteSolution=void 0;const n=r(963333),i=n.__importStar(r(50014)),s=n.__importStar(r(113600));t.deleteSolution=function(e,t,r){return s.getDeletableSolutionInfo(e,t).then((n=>i.deleteSolutionContents(e,n,t,r))).catch((()=>[void 0,void 0]))},t.deleteSolutionByComponents=function(e,t,r,n,s,o){const a={id:e,title:"",folder:n.folderId,items:[],groups:[]};let c=r.map((e=>({id:e.itemId,type:e.type,title:e.item.title,modified:0,owner:""}))).map((e=>(e.id=n[e.id].itemId,e))).filter((e=>!!e.id));return c=c.filter((e=>t.includes(e.id))),c.sort(((e,r)=>t.indexOf(e.id)-t.indexOf(r.id))),c.forEach((e=>{"Group"===e.type?a.groups.push(e.id):a.items.push(e)})),i.deleteSolutionContents(e,a,s,o)}},651632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topologicallySortItems=void 0;const n=r(923868),i=r(998080);var s;t.topologicallySortItems=function(e){let t=[];const r=[],o={},a={},c={};function u(c){a[c]=s.InProgress;const l=(0,i.findTemplateInList)(e,c);(l.dependencies||[]).concat((0,n.getProp)(l,"properties.syncViews")||[]).forEach((function(e){a[e]===s.NotYetVisited?u(e):a[e]===s.InProgress?o[c]?o[c].push(e):o[c]=[e]:a[e]!==s.Finished&&r.indexOf(e)<0&&r.push(e)}
16)),a[c]=s.Finished,t.push(c)}e.forEach((function(e){a[e.itemId]=s.NotYetVisited,c[e.itemId]=e.item?.typeKeywords&&e.item.typeKeywords.includes("View Service")?"View Service":e.item?.tags&&e.item.tags.includes("Location Tracking Group")?"Location Tracking Group":e.type})),e.forEach((function(e){a[e.itemId]===s.NotYetVisited&&u(e.itemId)}));const l=[],d=[],p=[],h=[];do{const e=t.shift();e&&("Location Tracking Group"===c[e]?l.push(e):"Feature Service"===c[e]?d.push(e):"View Service"===c[e]?p.push(e):h.push(e))}while(t.length>0);return t=l.concat(d,p,h),{buildOrder:t,missingDependencies:r,itemsToBePatched:o}},function(e){e[e.NotYetVisited=0]="NotYetVisited",e[e.InProgress=1]="InProgress",e[e.Finished=2]="Finished"}(s||(s={}))},921298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._templatizeLayerFieldReferences=t._validateEditFieldsInfo=t._validateTypesTemplates=t._validateTemplatesFields=t._validateIndexes=t._validateDisplayField=t._validateFields=t._templatizeLayer=t._templatizeProperty=t._templatize=t.updatePopupInfo=t.postProcessFields=t.updateLayerFieldReferences=t._getSourceSpatialReferenceAndExtent=t.validateSpatialReferenceAndExtent=t.setDefaultSpatialReference=t._updateTemplateDictionaryFields=t._updateGeomFieldName=t._updateSourceLayerFields=t._updateItemFields=t._getDynamicFieldNames=t._getFieldNames=t._updateForPortal=t.removeLayerOptimization=t._isSelfReferential=t._updateAddOptions=t._updateOrder=t.addFeatureServiceDefinition=t.addFeatureServiceLayersAndTables=t.getExistingLayersAndTables=t.getLayersAndTables=t.deTemplatizeFieldInfos=t.processContingentValues=t.updateTemplateForInvalidDesignations=t.updateSettingsFieldInfos=t.setNamesAndTitles=t.getLayerSettings=t._setTrackingViewLayerSettings=t._updateTypeKeywords=t.updateTemplate=t.cacheLayerInfo=t._cachePopupInfo=t.cachePopupInfos=t._cacheFieldInfo=t.cacheIndexes=t.cacheContingentValues=t.cacheFieldInfos=t.deleteViewProps=t.templatize=t.getFeatureServiceRelatedRecords=void 0,t._getLayerChunkSize=t._getNameMapping=t._templatizeDefinitionQuery=t._templatizeTimeInfo=t._templatizeKeys=t._templatizeTypeTemplates=t._templatizeTemplates=t._templatizeLabelingInfo=t._templatizeArcadeExpressions=t._templatizeAuthoringInfo=t._templatizeTemporalRenderer=t._templatizeGenRenderer=t._templatizeRenderer=t._templatizeDrawingInfo=t._templatizeSimpleName=t._templatizeDefinitionExpression=t._templatizeDefinitionEditor=t._templatizeMediaInfos=t._templatizePopupElements=t._templatizeExpressionInfos=t._templatizeFieldName=t._templatizePopupInfoFieldInfos=t._templatizeName=t._templatizePopupInfo=t._templatizeRelationshipFields=t._templatizeTopFilter=t._templatizeAdminSourceLayerFields=t._getDependantItemId=t._templatizeAdminLayerInfoFields=t._templatizeSourceServiceName=t._processAdminObject=t._templatizeAdminLayerInfo=void 0;const n=r(408102),i=r(923868),s=r(998080),o=r(336418),a=r(906837),c=r(427342);function u(e,t){["definitionQuery"].forEach((t=>(0,i.deleteProp)(e,t))),t&&["indexes"].forEach((t=>{(0,i.deleteProp)(e,t)}))}function l(e,t,r,n){e&&e.fields&&(t[e.id]={sourceFields:JSON.parse(JSON.stringify(e.fields)),type:e.type,id:e.id},!r&&n&&(t[e.id].subtypes=e.subtypes,t[e.id].subtypeField=e.subtypeField,t[e.id].defaultSubtypeCode=e.defaultSubtypeCode));const i={editFieldsInfo:!1,types:!1,templates:!1,relationships:!0,drawingInfo:!1,timeInfo:!1,viewDefinitionQuery:!1};return!r&&n&&(i.subtypes=!0,i.subtypeField=!0,i.defaultSubtypeCode=!0),Object.keys(i).forEac
16h((r=>{h(e,r,t,i[r])})),t}function d(e,t,r){const n=(0,i.getProp)(r,"properties.contingentValues");return n&&n[e]&&(t[e].contingentValues=n[e]),t}function p(e,t,r,n){if(!r&&!n&&Array.isArray(e.indexes)){const r=e.objectIdField,n=e.globalIdField;t[e.id].indexes=e.indexes.filter((e=>{if(e.isUnique&&e.fields!==r&&e.fields!==n||"FullText"===e.indexType)return e.name&&delete e.name,e})),delete e.indexes}return t}function h(e,t,r,n){e&&e.hasOwnProperty(t)&&r&&r.hasOwnProperty(e.id)&&(r[e.id][t]=e[t],n&&"relationships"===t?e[t]=null:n&&delete e[t])}function m(e,t,r){r.forEach((r=>{r&&r.hasOwnProperty("popupInfo")&&(e[t][r.id]=r.popupInfo,r.popupInfo={})}))}function f(e,t){const r=(0,i.getProp)(e,"item.typeKeywords"),n=(0,i.getProp)(t,"typeKeywords");return r&&n&&(0,i.setProp)(e,"item.typeKeywords",r.concat(n.filter((e=>r.indexOf(e)<0)))),e}function g(e,t){const r=e.item.url,n=e.itemId;let s;Object.keys(t).some((e=>{if(n===t[e].itemId)return s=e,!0})),e.properties.layers.forEach((e=>{const n=e.id.toString();t[s][`layer${n}`]={url:(0,i.checkUrlPathTermination)(r)+n}}))}function y(e,t,r,n){const s={};return Object.keys(e).forEach((o=>{const a=(0,i.getProp)(e[o],"item.id"),c=parseInt(a,10)>-1,u=c&&n?n[a]:c?a:o;s[`layer${c?a:o}`]={fields:Te(e,o),url:(0,i.checkUrlPathTermination)(t)+u,layerId:u,itemId:r},(0,i.deleteProp)(e[o],"newFields"),(0,i.deleteProp)(e[o],"sourceFields")})),s}function b(e,t){const r=e.dependencies,n=e.itemId,s=Object.keys(t);s.forEach((e=>{n===t[e].itemId&&r.forEach((r=>{s.forEach((n=>{if(r===n){const s={};s[r]=(0,i.getProp)(t[n],"fieldInfos"),t[e].sourceServiceFields=t[e].sourceServiceFields?{...t[e].sourceServiceFields,...s}:s,Object.keys(t[n]).forEach((r=>{r.startsWith("layer")&&(t[e][r]=t[n][r])}))}}))}))}))}function v(e,t,r,n){return Object.keys(e).forEach((t=>{e[t].hasOwnProperty("templates")&&(e[t].templates=JSON.parse((0,s.replaceInTemplate)(JSON.stringify(e[t].templates),n))),e[t].hasOwnProperty("adminLayerInfo")&&(r[t].viewLayerDefinition.table.relatedTables=e[t].adminLayerInfo,(0,i.deleteProp)(e[t],"adminLayerInfo")),e[t].hasOwnProperty("types")&&(e[t].types=JSON.parse((0,s.replaceInTemplate)(JSON.stringify(e[t].types),n)))})),{popupInfos:(0,s.replaceInTemplate)(t,n),fieldInfos:(0,s.replaceInTemplate)(e,n),adminLayerInfos:(0,s.replaceInTemplate)(r,n)}}function w(e){const t=e.properties,r=[];return(t.layers||[]).forEach((function(e){r.push({item:e,type:"layer"})})),(t.tables||[]).forEach((function(e){r.push({item:e,type:"table"})})),r}function S(e,t,r,n,c,h,m,f){return new Promise(((c,g)=>{if((0,a.isTrackingViewTemplate)(f))c(null);else{let a={layers:[],tables:[],authentication:n};(0,i.getProp)(f,"properties.service.hasViews")&&x(f,r);const y=I(t);t=E(t,y,f);const v=20,w=[];t.forEach(((e,i)=>{let o=e.item;const c=o.id,g=f.properties.service.isView,v=f.properties.service.isMultiServicesView,S=r.isPortal;m=l(o,m,g,S),m=d(o.id,m,f),S&&(m=p(o,m,g,v)),o.isView&&u(o,S),g&&(k(o.adminLayerInfo,r),h[c]=o.adminLayerInfo,b(f,r),o.adminLayerInfo=(0,s.replaceInTemplate)(o.adminLayerInfo,r),m&&m.hasOwnProperty(o.id)&&Object.keys(r).some((e=>r[e].itemId===f.itemId&&(m[o.id].sourceServiceFields=r[e].sourceServiceFields,!0)))),S&&(o=A(o,f,r)),C(o),a=T(f,a,w,y,n),"Feature Layer"===o.type?a.layers.push(o):a.tables.push(o),i+1===t.length&&(w.push(Object.assign({},a)),a={layers:[],tables:[],authentication:n})}));const S=t.length>v;w.reduce(((t,r)=>t.then((()=>(0,o.addToServiceDefinition)(e,r,!1,S)))),Promise.resolve(null)).then((()=>c(null)),(e=>g((0,i.fail)(e))))}}))}function E(e,t,r){const n=(0,i.getProp)(r,"properties.service.isMultiServicesView")||!1;return t||n?e.sort(((e,t)=>e.item.id-t.item.id)):e}function T(e,t,r,n,s){return((0,i.getProp)(e,"properties.service.isMultiServicesView")||n)&&(t.layers.length>0||t.tables.length>0)&&(r.push(Object.assign({},t)),t={layers:[],tables:[],authentication:s}),t}function I(e){const t=e.map((e=>e.item.name)),r={};return e.some((e=>{const n=e.item.adminLayerInfo?.viewLayerDefinition?.table;if(n){const e=n.sourceServiceName,i=n.sourceLayerId;if(e&&i>-1)if(Object.keys(r).indexOf(e)>-1){if(r[e].indexOf(i)>-1)return!0;r[e].push(i)}else r[e]=[i];return(n.relatedTables||[]).some((e=>t.indexOf(e.name)>-1))}}))}function C(e){e.multiScaleGeometryInfo&&(0,i.deleteProp)(e,"multiScaleGeometryInfo")}function A(e,t,r){if(e.uniqueIdField&&e.uniqueIdField.name&&(e.uniqueIdField.name=String(e.uniqueIdField.name).toLocaleLowerCase()),"Table"===e.type&&e.adminLayerInfo&&(0,i.deleteProp)(e.adminLayerInfo,"geometryField"),e.isView){const n=(0,i.getProp)(e,"adminLayerInfo.viewLayerDefinition.table");let s=[];if(n){const o=O(n,t,r);s=s.concat(o);const a=_(n);s=s.concat(a),(0,i.setProp)(e,"adminLayerInfo.viewLayerDefinition.table",P(n,s)),Array.isArray(n.relatedTables)&&n.relatedTables.map((e=>{const n=O(e,t,r);s=s.concat(n);const i=_(e);return s=s.concat(i),P(e,[...n,...i])}))}else Object.keys(r).some((t=>{if(r[t].itemId===e.serviceItemId){const n=r[t][`layer${e.id}`];return n&&n.fields&&(s=Array.isArray(n.fields)?n.fields.map((e=>e.name)):Object.keys(n.fields)),!0}}));e=D(e,s)}return(0,i.deleteProp)(e,"isView"),e}function O(e,t,r){let n=[];const i=e.sourceLayerId;
16if("number"==typeof i)return t.dependencies.forEach((t=>{const s=r[t][`layer${i}`];s&&s.fields&&r[t].name===e.sourceServiceName&&(n=Array.isArray(s.fields)?n.concat(s.fields.map((e=>e.name))):n.concat(Object.keys(s.fields)))})),n}function _(e){const t=e.sourceLayerFields.reduce(((e,t)=>(t.statisticType&&e.push(t.name),e)),[]);return[...new Set(t)]}function D(e,t){return t.length>0&&(e.fields&&(e.fields=e.fields.filter((e=>t.indexOf(e.name)>-1))),e.indexes&&(e.indexes=e.indexes.filter((e=>t.indexOf(e.fields)>-1)))),e}function P(e,t){return Array.isArray(e.sourceLayerFields)&&e.sourceLayerFields.length>0&&t.length>0&&(0,i.setProp)(e,"sourceLayerFields",e.sourceLayerFields.filter((e=>t.indexOf(e.source.toLowerCase())>-1))),e}function k(e,t){const r=(0,i.getProp)(e,"viewLayerDefinition.table.name"),n=(0,i.getProp)(e,"geometryField.name");if(n&&r){const n=t.isPortal?`${r}.shape`:`${r}.Shape`;(0,i.setProp)(e,"geometryField.name",n)}else!n&&(0,i.getProp)(e,"geometryField")&&(0,i.deleteProp)(e,"geometryField")}function x(e,t,r=!0){const n=e.properties.layers,i=e.properties.tables,s=n.concat(i),o={};s.forEach((e=>{o[e.id]=e.fields})),Object.keys(t).some((n=>(r?t[n].itemId===e.itemId:n===e.itemId)&&(t[n].fieldInfos=o,!0)))}function R(e,t,r,n){const s=[...e.layers||[],...e.tables||[]];let o,a;return t.dependencies.some((e=>{const t=r[e],c=!n||s.some((e=>{const r=(0,i.getProp)(e,"adminLayerInfo.viewLayerDefinition.table.sourceServiceName");return r&&t.name&&r===t.name&&e.geometryType})),u=(0,i.getProp)(t,"defaultSpatialReference");!o&&u&&c&&(o=u);const l=(0,i.getProp)(t,"defaultExtent");return!a&&l&&c&&(a=l),o&&a})),{spatialReference:o,extent:a}}function U(e,t,r,n,s){return new Promise(((o,a)=>{M(e,t,r,n,s).then((t=>{N(e,t.popupInfos),o({itemTemplate:e,layerInfos:t})}),(e=>a((0,i.fail)(e))))}))}function M(e,t,r,n,s){return new Promise(((o,a)=>{if(e.item.url){const i=e.itemId,a=Object.keys(s);let c;a.some((e=>s[e].itemId===i&&(c=s[e],!0)));const u=e.properties.layers,l=e.properties.tables;u.concat(l).forEach((r=>{const n=r.isView||e.properties.service.isView;if(t&&t.hasOwnProperty(r.id)){const e=t[r.id];e.isView=r.isView,e.newFields=r.fields,e.sourceSchemaChangesAllowed=r.sourceSchemaChangesAllowed,r.editFieldsInfo&&(e.newEditFieldsInfo=JSON.parse(JSON.stringify(r.editFieldsInfo))),n&&c&&s.isPortal&&(e.sourceServiceFields=c.sourceServiceFields)}})),a.forEach((e=>{i===s[e].itemId&&(s[e]=Object.assign(s[e],y(t,s[e].url,i)))})),o(v(t,r,n,s))}else a((0,i.fail)("Feature layer "+e.itemId+" does not have a URL"))}))}function N(e,t){["layers","tables"].forEach((r=>{const n=(0,i.getProp)(e,"data."+r);n&&Array.isArray(n)&&n.forEach((e=>{e.popupInfo=(0,i.getProp)(t,r+"."+e.id)||{}}))}))}function j(e,t,r){return t.startsWith("{{")?t:String((0,s.templatizeTerm)(e,e,"."+String(t).toLowerCase()+(r?"."+r:"")))}function $(e,t,r,n){e&&e.hasOwnProperty(t)&&e[t]&&(e[t]=j(r,e[t],n))}function F(e,t,r,n,i,o){G(t),i&&V(e,r.itemId,t,n);const a=[t];e&&a.push(e),a.forEach((e=>{e.hasOwnProperty("name")&&(e.name=(0,s.templatizeTerm)(e.serviceItemId+".layer"+e.id,e.serviceItemId+".layer"+e.id,".name||"+e.name)),e.hasOwnProperty("extent")&&(e.extent=(0,s.templatizeTerm)(e.serviceItemId,e.serviceItemId,".solutionExtent")),e.hasOwnProperty("serviceItemId")&&(e.serviceItemId=(0,s.templatizeTerm)(e.serviceItemId,e.serviceItemId,".itemId")),e.hasOwnProperty("adminLayerInfo")&&(e.adminLayerInfo=K(e,n,o))}))}function G(e){const t=(e.fields||[]).map((e=>e.name));L(e,t),H(e,t),B(e,t),W(e,t),q(e,t)}function L(e,t){const r=e.displayField||"";let n=-1;if(t.some((e=>(n+=1,e===r||e===r.toLowerCase()))))e.displayField=t[n];else{const r=[],n=(0,i.getProp)(e,"uniqueIdField.name");n&&r.push(n);const s=(0,i.getProp)(e,"globalIdField");s&&r.push(s),t.some((t=>-1===r.indexOf(t)&&(e.displayField=t,!0)))}}function H(e,t){const r=e.indexes;if(r){const n=[];e.indexes=r.reduce(((e,r)=>{const i=r.fields.split(","),s=[];return i.forEach((e=>{-1===n.indexOf(e)&&(n.push(e),t.indexOf(e)>-1&&s.push(e))})),s.length>0&&(r.fields=s.join(","),e.push(r)),e}),[])}}function B(e,t){const r=e.templates;r&&(e.templates=r.map((e=>{const r=(0,i.getProp)(e,"prototype.attributes");return r&&(Object.keys(r).forEach((e=>{-1===t.indexOf(e)&&delete r[e]})),(0,i.setProp)(e,"prototype.attributes",r)),e})))}function W(e,t){const r=e.types;r&&(e.types=r.map((e=>(B(e,t),e))))}function q(e,t){const r=e.editFieldsInfo;r&&Object.keys(r).forEach((e=>{const n=r[e];n&&t.some((t=>t===n||t===n.toLowerCase()&&(r[e]=t,!0)))}))}function V(e,t,r,n){const i=t+".layer"+r.id+".fields",s=r.fields.map((e=>e.name));e&&(J(e,n),te(e,r,i,t,s)),J(r,n),ee(r,t),ce(r,i,s),ue(r,i,s),de(r,i,s),be(r,i),ve(r,i),Se(r,i),Ee(r,i,s)}function K(e,t,r){const n=Object.assign({},e.adminLayerInfo);if(k(n,r),(0,i.deleteProp)(n,"xssTrustedFields"),(0,i.deleteProp)(n,"tableName"),n.viewLayerDefinition){const e=Object.assign({},n.viewLayerDefinition);z(e,t),e.table&&(z(e.table,t),e.table.relatedTables&&e.table.relatedTables.forEac
16h((e=>{z(e,t)}))),n.viewLayerDefinition=e}return n}function z(e,t){(0,i.deleteProp)(e,"sourceId"),e.hasOwnProperty("sourceServiceName")&&(e.sourceServiceName=Y(e.sourceServiceName,t))}function Y(e,t){const r=t.filter((t=>t.name===e));return 1===r.length?j(r[0].id,"name"):void 0}function J(e,t){const r=(0,i.getProp)(e,"adminLayerInfo.viewLayerDefinition.table");if(r){let n=Q(r.sourceServiceName,t);const s=n+".layer"+r.sourceLayerId+".fields";Z(r.sourceLayerFields||[],s);const o=(0,i.getProp)(e,"adminLayerInfo.viewLayerDefinition.table.relatedTables")||[];o.length>0&&o.forEach((e=>{n=Q(e.sourceServiceName,t);const r=n+".layer"+e.sourceLayerId+".fields";X(e.topFilter||{},r),Z(e.sourceLayerFields||[],r);const i=e.parentKeyFields||[];e.parentKeyFields=i.map((e=>j(s,e,"name")));const o=e.keyFields||[];e.keyFields=o.map((e=>j(r,e,"name")))}))}}function Q(e,t){const r=t.filter((t=>t.name===e));return 1===r.length?r[0].id:""}function Z(e,t){e.forEach((e=>$(e,"source",t,"name")))}function X(e,t){if(e){const r=e.orderByFields||"";if(""!==r){const n=r.split(" ")[0];e.orderByFields=e.orderByFields.replace(n,j(t,n,"name"))}const n=e.groupByFields||"";if(""!==n){const r=n.split(",");if(r.length>0){const n=r.map((e=>j(t,e,"name")));e.groupByFields=n.join(",")}}}}function ee(e,t){e&&e.relationships&&e.relationships.forEach((r=>{r.keyField&&$(r,"keyField",t+".layer"+e.id+".fields","name")}))}function te(e,t,r,n,i){if(i&&e.popupInfo){const s=e.popupInfo;re(s,"title",i,r),re(s,"description",i,r),ne(s.fieldInfos||[],t,n,r),se(s.expressionInfos||[],i,r),oe(s.popupElements||[],r,t,n,i),ae(s.mediaInfos||[],i,r,t,n)}}function re(e,t,r,n){e.hasOwnProperty(t)&&r.forEach((r=>{const i=new RegExp("(\\b"+r+"\\b(?![}]{2}))","gm");i.test(e[t])&&(e[t]=e[t].replace(i,j(n,r,"name")))}))}function ne(e,t,r,n){e.forEach((e=>{e.fieldName=ie(e.fieldName,t,r,n)}))}function ie(e,t,r,n){if(e.indexOf("relationships/")>-1){const n=e.split("/"),s=n[1],o=(0,i.getProp)(t,"adminLayerInfo.viewLayerDefinition.table.relatedTables"),a=t.relationships||o;if(a&&a.length>parseInt(s,10)){const t=a[s],o=r+".layer"+t[(0,i.getProp)(t,"relatedTableId")?"relatedTableId":"sourceLayerId"]+".fields";n[2]=j(o,n[2],"name"),e=n.join("/")}}else-1===e.indexOf("expression/")&&(e=j(n,e,"name"));return e}function se(e,t,r){return e.map((e=>(t.forEach((t=>{e.expression=ge(e.expression,t,r)})),e)))}function oe(e,t,r,n,i){e.forEach((e=>{e.hasOwnProperty("fieldInfos")&&ne(e.fieldInfos,r,n,t),e.hasOwnProperty("mediaInfos")&&ae(e.mediaInfos,i,t,r,n)}))}function ae(e,t,r,n,i){["title","caption"].forEach((n=>re(e,n,t,r))),e.forEach((e=>{if(e.hasOwnProperty("value")){const t=e.value,s=t.fields||[];t.fields=s.map((e=>ie(e,n,i,r))),t.hasOwnProperty("normalizeField")&&$(t,"normalizeField",r,"name"),t.hasOwnProperty("tooltipField")&&(t.tooltipField=ie(t.tooltipField,n,i,r))}}))}function ce(e,t,r){if(e){const n=e.definitionEditor||{};if(n){const e=n.inputs;e&&e.forEach((e=>{e.parameters&&e.parameters.forEach((e=>{$(e,"fieldName",t,"name")}))})),n.hasOwnProperty("parameterizedExpression")&&(n.parameterizedExpression=le(n.parameterizedExpression||"",t,r,"name"))}}}function ue(e,t,r){e&&e.hasOwnProperty("definitionExpression")&&(e.definitionExpression=le(e.definitionExpression||"",t,r,"name"))}function le(e,t,r,n){return r.forEach((r=>{const i=new RegExp("\\b"+r+"\\b(?![}]{2})","gm");e&&i.test(e)&&(e=e.replace(i,j(t,r,n)))})),e}function de(e,t,r){if(e){const n=e.drawingInfo;n&&(pe(n.renderer||{},t,r),ye(n.labelingInfo||[],t,r))}}function pe(e,t,r){switch(e.type){case"classBreaks":case"uniqueValue":case"predominance":case"simple":case"heatmap":he(e,t,r);break;case"temporal":me(e,t,r)}}function he(e,t,r){if(e){const n=e.authoringInfo;n&&fe(n,t,r);const i=["field","normalizationField"];i.forEach((r=>$(e,r,t,"name"))),["field1","field2","field3"].forEach((r=>$(e,r,t,"name")));const s=e.rotationExpression;s&&r.forEach((r=>{const n=new RegExp("(\\["+r+"\\])","gm");n.test(s)&&(e.rotationExpression=s.replace(n,"["+j(t,r,"name")+"]"))})),e.valueExpression&&r.forEach((r=>{e.valueExpression=ge(e.valueExpression,r,t)}));const o=e.visualVariables;o&&o.forEach((e=>
16{i.forEach((r=>$(e,r,t,"name"))),e.valueExpression&&r.forEach((r=>{e.valueExpression=ge(e.valueExpression,r,t)}))}))}}function me(e,t,r){[e.latestObservationRenderer,e.observationRenderer,e.trackRenderer].forEach((e=>{pe(e,t,r)}))}function fe(e,t,r){if(e){const n=["field","normalizationField"],i=e.field1;n.forEach((e=>$(i,e,t,"name")));const s=e.field2;n.forEach((e=>$(s,e,t,"name")));const o=e.fields;o&&(e.fields=o.map((e=>j(t,e,"name"))));const a=["endTime","field","startTime"],c=e.visualVariables;c&&a.forEach((e=>{r.indexOf(c[e])>-1&&$(c,e,t,"name")}))}}function ge(e,t,r){const n=j(r,t,"name");if(e){let r="(?:\\$feature\\.)("+t+")\\b",i=new RegExp(r,"gm");e=i.test(e)?e.replace(i,"$feature."+n):e,r="(?:[$]feature)(\\[\\\"?\\'?)"+t+"(\\\"?\\'?\\])",i=new RegExp(r,"gm");let s=i.exec(e);s&&(e=e.replace(i,"$feature"+s[1]+n+s[2])),r="(?:[$]feature)(\\[\\\"?\\'?)(\\w+)[.]"+t+"(\\\"?\\'?\\])",i=new RegExp(r,"gm"),s=i.exec(e),s&&s.length>3&&(e=e.replace(i,"$feature"+s[1]+s[2]+"."+n+s[3])),r="(\\\"|\\')+"+t+"(\\\"|\\')+",i=new RegExp(r,"gm"),s=i.exec(e),s&&(e=e.replace(i,s[1]+n+s[2]))}return e}function ye(e,t,r){e.forEach((e=>{e.hasOwnProperty("fieldInfos")&&(e.fieldInfos||[]).forEach((e=>$(e,"fieldName",t,"name")));const n=e.labelExpression||"",i=e.labelExpressionInfo||{};r.forEach((r=>{const s=j(t,r,"name"),o=new RegExp('(\\[\\"*)+('+r+')(\\"*\\])+',"gm");let a=o.exec(n);if(a&&(e.labelExpression=n.replace(o,a[1]+s+a[3])),i.value){let t=i.value;const n=new RegExp("(\\{"+r+"\\})","gm");t=n.test(t)?t.replace(n,"{"+s+"}"):t,a=o.exec(t),t=a?t.replace(o,a[1]+s+a[3]):t,e.labelExpressionInfo.value=t}i.expression&&(e.labelExpressionInfo.expression=ge(i.expression,r,t))}))}))}function be(e,t){(e.templates||[]).forEach((e=>{const r=we((0,i.getProp)(e,"prototype.attributes"),t,"name");r&&(e.prototype.attributes=r)}))}function ve(e,t){const r=e.types;r&&Array.isArray(r)&&r.length>0&&r.forEach((e=>{const r=we(e.domains,t,"name");r&&(e.domains=r);const n=e.templates;n&&n.length>0&&n.forEach((e=>{const r=we((0,i.getProp)(e,"prototype.attributes"),t,"name");r&&(e.prototype.attributes=r)}))}))}function we(e,t,r){let n;if(e){n={};const i=Object.keys(e);i&&i.length>0&&i.forEach((i=>{n[j(t,i,r)]=e[i]}))}return n}function Se(e,t){if(e.timeInfo){const r=e.timeInfo;["endTimeField","startTimeField","trackIdField"].forEach((e=>{""!==r[e]?$(r,e,t,"name"):r[e]=null}))}}function Ee(e,t,r){e&&e.hasOwnProperty("viewDefinitionQuery")&&(e.viewDefinitionQuery=le(e.viewDefinitionQuery||"",t,r,"name")),e&&e.hasOwnProperty("definitionQuery")&&(e.definitionQuery=le(e.definitionQuery||"",t,r,"name"))}function Te(e,t){const r=e[t],n={},s=r.newFields,o=s?s.map((e=>e.name)):[];if((r.sourceFields||[]).forEach((e=>{const t=String(e.name).toLowerCase();s.forEach((r=>{-1===o.indexOf(e.name)&&-1===o.indexOf(t)&&r.alias&&r.alias===e.alias&&(n[t]={name:r.name,alias:r.alias,type:r.type?r.type:""}),String(r.name).toLowerCase()===t&&(n[t]={name:r.name,alias:r.alias?r.alias:"",type:r.type?r.type:""})}))})),r.editFieldsInfo&&r.newEditFieldsInfo){const e=JSON.parse(JSON.stringify(r.editFieldsInfo)),t=JSON.parse(JSON.stringify(r.newEditFieldsInfo)),s=Object.keys(n);Object.keys(e).forEach((i=>{const a=String(e[i]).toLowerCase();if((-1===s.indexOf(a)||n[a].name!==t[i])&&o.indexOf(a)>-1){let s;r.sourceSchemaChangesAllowed&&!r.isView&&(r.hasOwnProperty("deleteFields")||(r.deleteFields=[]),r.deleteFields.push(a)),r.sourceFields.some((t=>(t.name===e[i]&&(s=t),t.name===e[i]))),n[a]={name:t[i],alias:s&&s.alias?s.alias:"",type:s&&s.type?s.type:""}}})),(0,i.deleteProp)(r,"sourceSchemaChangesAllowed"),(0,i.deleteProp)(r,"editFieldsInfo"),(0,i.deleteProp)(r,"newEditFieldsInfo"),(0,i.deleteProp)(r,"isView")}return n}t.getFeatureServiceRelatedRecords=function(e,t,r){const n={url:e+`/${t}`,relationshipId:t,objectIds:r};return(0,c.queryRelated)(n)},t.templatize=function(e,t,r,n){n=n||{};const o=e.item.id,c=e.item.url;e.item={...e.item,id:(0,s.templatizeTerm)(o,o,".itemId"),url:j(o,"url"),typeKeywords:(0,s.templatizeIds)(e.item.typeKeywords)},(0,a.templatizeTracker)(e),(0,i.deleteProp)(e,"properties.service.size");const u=e.properties.layers||[],l=e.properties.tables||[],d=u.concat(l),p=e.data||{},h=p.layers||[],m=p.tables||[],f=h.concat(m);n[c]=e.item.url,d.concat(f).forEach((e=>{n[c+"/"+e.id]=j(o,"layer"+e.id+".url")})),e.properties.service.serviceItemId=(0,s.templatizeTerm)(e.properties.service.serviceItemId,e.properties.service.serviceItemId,".itemId");const g=(0,i.getProp)(e,"properties.service.initialExtent");g&&(e.properties.service.initialExtent=(0,s.templatizeTerm)(o,o,".solutionExtent"));const y=(0,i.getProp)(e,"properties.service.fullExtent");y&&(e.properties.service.fullExtent=(0,s.templatizeTerm)(o,o,".solutionExtent")),e.properties.defaultExtent=g||y,!(0,i.getProp)(e,"properties.service.spatialReference")&&(0,i.getProp)(e,"properties.defaultExtent.spatialReference")&&(0,i.setCreateProp)(e,"properties.service.spatialReference",e.properties.defaultExtent.spatialReference);let b=!1;return d.forEach((i=>{const s=f.filter((e=>i.id===e.id)),o=1===s.length?s[0]:void 0;F(o,i,e,t,r,n),b=!!(i.hasZ||o&&o.hasZ)||b})),b&&(e.properties.service.enableZDefaults=!0,e.properties.service.zDefault=0),e},t.deleteViewProps=u,t.cacheFieldInfos=l,t.cacheContingentValues=d,t.cac
16heIndexes=p,t._cacheFieldInfo=h,t.cachePopupInfos=function(e){const t={layers:{},tables:{}};return e&&e.layers&&e.layers.length>0&&m(t,"layers",e.layers),e&&e.tables&&e.tables.length>0&&m(t,"tables",e.tables),t},t._cachePopupInfo=m,t.cacheLayerInfo=function(e,t,r,s){if(e){const o=`layer${e}`,a=(0,i.getProp)(s,`${n.UNREACHABLE}.${t}`)||{itemId:t};a[o]=(0,i.getProp)(a,o)||{layerId:e,itemId:t},""!==r&&(a[o].url=r);const c={};c[t]=a,s[n.UNREACHABLE]={...s[n.UNREACHABLE],...c}}},t.updateTemplate=function(e,t,r){return f(e,r),t[e.itemId]=Object.assign(t[e.itemId]||{},{itemId:r.serviceItemId,url:(0,i.checkUrlPathTermination)(r.serviceurl),name:r.name}),e.itemId=r.serviceItemId,(0,s.replaceInTemplate)(e,t)},t._updateTypeKeywords=f,t._setTrackingViewLayerSettings=g,t.getLayerSettings=y,t.setNamesAndTitles=function(e){const t=(0,i.generateGUID)(),r=[];return e.map((e=>{if("Feature Service"===e.item.type&&(e.item.title=e.item.title||e.item.name,!(0,a.isTrackingViewTemplate)(e))){let n=e.item.name||e.item.title;n=n.replace(/_[0-9A-F]{32}/gi,"");const i=n.substring(0,50)+"_"+t;e.item.name=-1===r.indexOf(i)?i:`${i}_${r.filter((e=>e===i)).length}`,r.push(i)}return e}))},t.updateSettingsFieldInfos=b,t.updateTemplateForInvalidDesignations=function(e,t){return new Promise(((r,n)=>{if(e.properties.hasInvalidDesignations=!0,e.item.url){const s=e.item.url;(0,c.request)(s+"?f=json",{authentication:t}).then((t=>{const n={};(t.layers||[]).concat(t.tables||[]).forEach((e=>{e&&e.hasOwnProperty("id")&&(n[e.id]=e)})),e.data[e.itemId]=Object.assign({itemId:e.itemId},y(n,s,e.itemId)),r(e)}),(e=>n((0,i.fail)(e))))}else r(e)}))},t.processContingentValues=function(e,t,r){return new Promise(((n,s)=>{if((0,i.getProp)(e,"service.isView"))n();else{const o=(e.layers||[]).concat(e.tables||[]),a=[],u=o.reduce(((e,n)=>(n.hasContingentValuesDefinition&&(e.push((0,c.request)(`${t}/${n.id}/contingentValues?f=json`,{authentication:r})),a.push(n.id)),e)),[]);u.length>0?Promise.all(u).then((t=>{const r={};t.forEach(((e,t)=>{(0,i.deleteProp)(e,"typeCodes"),(0,i.getProp)(e,"stringDicts")&&(0,i.getProp)(e,"contingentValuesDefinition")&&(e.contingentValuesDefinition.stringDicts=e.stringDicts,(0,i.deleteProp)(e,"stringDicts")),(0,i.deleteProps)((0,i.getProp)(e,"contingentValuesDefinition"),["layerID","layerName","geometryType","hasSubType"]),r[a[t]]=e})),e.contingentValues=r,n()}),s):n()}}))},t.deTemplatizeFieldInfos=v,t.getLayersAndTables=w,t.getExistingLayersAndTables=function(e,t,r){return new Promise((n=>{const s=t.map((t=>(0,c.request)((0,i.checkUrlPathTermination)(e)+t,{authentication:r})));Promise.all(s.map((e=>e.catch((e=>e))))).then(n)}))},t.addFeatureServiceLayersAndTables=function(e,t,r,n){return new Promise(((s,c)=>{if((0,a.isTrackingViewTemplate)(e))g(e,t),s(null);else{const a={},u={},l=w(e);l.length>0?S(e.item.url||"",l,t,n,e.key,u,a,e).then((()=>{U(e,a,r,u,t).then((e=>{(0,o.getLayerUpdates)({message:"updated layer definition",objects:e.layerInfos.fieldInfos,itemTemplate:e.itemTemplate,authentication:n},t.isPortal).reduce(((e,r)=>e.then((()=>(0,o.getRequest)(r,!1,!1,t.isPortal)))),Promise.resolve(null)).then((()=>s(null)),(e=>c((0,i.fail)(e))))}))}),(e=>c((0,i.fail)(e)))):s(null)}}))},t.addFeatureServiceDefinition=S,t._updateOrder=E,t._updateAddOptions=T,t._isSelfReferential=I,t.removeLayerOptimization=C,t._updateForPortal=A,t._getFieldNames=O,t._getDynamicFieldNames=_,t._updateItemFields=D,t._updateSourceLayerFields=P,t._updateGeomFieldName=k,t._updateTemplateDictionaryFields=x,t.setDefaultSpatialReference=function(e,t,r){r&&(0,i.setCreateProp)(e,`${t}.defaultSpatialReference`,r)},t.validateSpatialReferenceAndExtent=function(e,t,r){if((0,i.getProp)(e,"service.isView")){const n=R(e,t,r,!0),s=R(e,t,r,!1),o=n.spatialReference||s.spatialReference,a=n.extent||s.extent,c=(0,i.getProp)(o,"wkid"),u=(0,i.getProp)(e,"service.spatialReference.wkid");c&&u&&c!==u&&(0,i.setCreateProp)(e,"service.spatialReference",o);const l=(0,i.getProp)(e,"service.fullExtent");a&&l&&JSON.stringify(a)!==JSON.stringify(l)&&(0,i.setCreateProp)(e,"defaultExtent",a)}},t._getSourceSpatialReferenceAndExtent=R,t.updateLayerFieldReferences=U,t.postProcessFields=M,t.updatePopupInfo=N,t._templatize=j,t._templatizeProperty=$,t._templatizeLayer=F,t._validateFields=G,t._validateDisplayField=L,t._validateIndexes=H,t._validateTemplatesFields=B,t._validateTypesTemplates=W,t._validateEditFieldsInfo=q,t._templatizeLayerFieldReferences=V,t._templatizeAdminLayerInfo=K,t._processAdminObject=z,t._templatizeSourceServiceName=Y,t._templatizeAdminLayerInfoFields=J,t._getDependantItemId=Q,t._templatizeAdminSourceLayerFields=Z,t._templatizeTopFilter=X,t._templatizeRelationshipFields=ee,t._templatizePopupInfo=te,t._templatizeName=re,t._templatizePopupInfoFieldInfos=ne,t._templatizeFieldName=ie,t._templatizeExpressionInfos=se,t._templatizePopupElements=oe,t._templatizeMediaInfos=ae,t._templatizeDefinitionEditor=ce,t._templatizeDefinitionExpression=ue,t._templatizeSimpleName=le,t._templatizeDrawingInfo=de,t._templatizeRenderer=pe,t._templatizeGenRenderer=he,t._templatizeTemporalRenderer=me,t._templatizeAuthoringInfo=fe,t._templatizeArcadeExpressions=ge,t._templatizeLabelingInfo=ye,t._templatizeTemplates=be,t._templatizeTypeTemplates=ve,t._templatizeKeys=we,t._templatizeTimeInfo=Se,t._templatizeDefinition
16Query=Ee,t._getNameMapping=Te,t._getLayerChunkSize=function(){return 20}},734402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateItemWithZipObject=void 0;const n=r(963333).__importStar(r(340391)),i=r(336418);t.updateItemWithZipObject=async function(e,t,r){const s={id:t,data:await n.zipObjectToZipFile(e,`${t}.zip`)};return(0,i.updateItem)(s,r)}},923868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueStringList=t.regExTest=t.getTemplateById=t.cleanLayerId=t.cleanLayerBasedItemId=t.cleanItemId=t.hasDatasource=t.globalStringReplace=t.getUniqueTitle=t.hasTypeKeyword=t.hasAnyKeyword=t.getUTCTimestamp=t.setProp=t.setCreateProp=t.idTest=t.getPropWithDefault=t.getProps=t.getProp=t.getIDs=t.getSubgroupIds=t.failWithIds=t.fail=t.deleteProps=t.deleteProp=t.deleteItemProps=t.sanitizeJSONAndReportChanges=t.compareJSONProperties=t.compareJSONNoEmptyStrings=t.compareJSON=t.cloneObject=t.saveBlobAsFile=t.jsonToJson=t.jsonToFile=t.jsonToBlob=t.getTemplatedIds=t.getSpecifiedWordRegEx=t.getAgoIdTemplateRegEx=t.getAgoIdRegEx=t.generateGUID=t.generateEmptyCreationResponse=t.delay=t.dedupe=t.createShortId=t.createLongId=t.convertIModel=t.checkUrlPathTermination=t.blobToText=t.blobToFile=t.blobToJson=t.appendQueryParam=void 0,t._padPositiveNum=t._getRandomNumberInRange=void 0;const n=r(849287),i=r(947176);function s(e,t,r){return new File([e],t||"",{type:r??e.type})}function o(e){return new Promise((t=>{const r=new FileReader;r.onload=function(e){const r=e.target.result;t(r||"")},r.readAsText(e)}))}function a(e){const t=(new TextEncoder).encode(JSON.stringify(e));return new Blob([t],{type:"application/octet-stream"})}function c(e,t){let r=[];const n=g(e),i=g(t);if(n!==i)("undefined"!==n&&"null"!==n||"null"!==i&&"undefined"!==i)&&r.push("Type difference: "+n+" vs. "+i);else if(e!==t)switch(n){case"boolean":case"number":r.push("Value difference: "+e+" vs. "+t);break;case"string":r.push('String difference: "'+e+'" vs. "'+t+'"');break;case"object":const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length||JSON.stringify(n)!==JSON.stringify(i))Array.isArray(e)&&Array.isArray(t)?r.push("Array length difference: ["+n.length+"] vs. ["+i.length+"]"):r.push("Props difference: "+JSON.stringify(n)+" vs. "+JSON.stringify(i));else for(let s=0;s<n.length;++s){const o=c(e[n[s]],t[i[s]]);o.length>0&&(r=r.concat(o))}}return r}function u(e,t){const r=t.split(".");if(Array.isArray(e))e.forEach((e=>u(e,t)));else{const n=r.slice(1).join(".");void 0!==e[r[0]]&&(1===r.length?delete e[t]:u(e[r[0]],n))}}function l(e,t){t.forEach((t=>{u(e,t)}))}function d(e){return h(e,/({*)(\b[0-9A-F]{32}\b)/gi).reduce((function(e,t){return t.indexOf("{{")<0&&e.push(t.replace("{","")),e}),[])}function p(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e)}function h(e,t){return e&&t.test(e)?e.match(t):[]}function m(e,t){return Math.random()*(t-e)+e}function f(e,t){let r=e.toString();const n=t-r.length;return n>0&&(r="0".repeat(n)+r),r}function g(e){return null===e?"null":typeof e}t.appendQueryParam=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+t},t.blobToJson=function(e){return new Promise((t=>{o(e).then((e=>{try{t(JSON.parse(e))}catch(e){t(null)}}),(()=>t(null)))}))},t.blobToFile=s,t.blobToText=o,t.checkUrlPathTermination=function(e){return e?e.endsWith("/")?e:e+"/":e},t.convertIModel=function(e){const t={...e};return t.resources=e?.resources?Object.values(e.resources):[],t},t.createLongId=function(){return(0,n.createId)("")+(0,n.createId)("")+(0,n.createId)("")+(0,n.createId)("")},t.createShortId=function(){return(m(.2777777777777778,.9999999999996456).toString(36)+"0000000").substr(2,8)},t.dedupe=function(e=[]){if(0===e.length)return[];const t=new Set(e),r=[];return t.forEach((e=>r.push(e))),r},t.delay=function(e){return new Promise((t=>setTimeout(t,e)))},t.generateEmptyCreationResponse=function(e,t=""){return{item:null,id:t,type:e,postProcess:!1}},t.generateGUID=function(){try{return crypto.randomUUID().replace(/-/g,"")}catch{return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},t.getAgoIdRegEx=function(){return/\b([0-9A-Fa-f]){32}\b/g},t.getAgoIdTemplateRegEx=function(){return/{{\b([0-9A-Fa-f]){32}\b}}/g},t.getSpecifiedWordRegEx=function(e){return new RegExp(`\\b${e}\\b`,"g")},t.getTemplatedIds=function(e){let t=[];const r=e.match(/{{[0-9A-F]{32}.itemId}}/gi);return r&&(t=r.map((e=>e.replace("{{","").replace(".itemId}}","")))),t},t.jsonToBlob=a,t.jsonToFile=function(e,t,r="application/json"){return s(a(e),t,r)},t.jsonToJson=function(e){return JSON.parse(JSON.stringify(e))},t.saveBlobAsFile=function(e,t){return new Promise((r=>{const n=URL.createObjectURL(t),i=document.createElement("a");i.setAttribute("href",n),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout((()=>{URL.revokeObjectURL(n),r(null)}),500)}))},t.cloneObject=function e(t){let r={};if(Array.isArray(t))r=t.map(e);else if("object"==typeof t)if(t instanceof File){const e=t.type?{type:t.type
17}:void 0;r=new File([t],t.name,e)}else for(const n in t)null!=t[n]&&"object"==typeof t[n]?r[n]=e(t[n]):r[n]=t[n];else r=t;return r},t.compareJSON=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.compareJSONNoEmptyStrings=function(e,t){return JSON.stringify(e).replace(/":""/g,'":null')===JSON.stringify(t).replace(/":""/g,'":null')}
17,t.compareJSONProperties=c,t.sanitizeJSONAndReportChanges=function(e,t){const r=(0,i.sanitizeJSON)(e,t),n=c(e,r);return n.length>0&&(console.warn("Changed "+n.length+(1===n.length?" property":" properties")),n.forEach((e=>console.warn("    "+e)))),r},t.deleteItemProps=function(e){const t=["accessInformation","appCategories","banner","categories","culture","description","documentation","extent","groupDesignations","industries","languages","licenseInfo","listed","name","properties","proxyFilter","screenshots","size","snippet","spatialReference","tags","title","type","typeKeywords","url"];return l(e,Object.keys(e).filter((e=>t.indexOf(e)<0))),e},t.deleteProp=u,t.deleteProps=l,t.fail=function(e){return e?{success:!1,error:e.response?.error||e.error||e}:{success:!1}},t.failWithIds=function(e,t){return t?{success:!1,itemIds:e,error:t.error||t}:{success:!1,itemIds:e}},t.getSubgroupIds=function(e){if(e){const t="group.";return e.filter((e=>e.startsWith(t))).map((e=>e.substring(t.length)))}return[]},t.getIDs=d,t.getProp=p,t.getProps=function(e,t){return t.reduce(((t,r)=>{const n=p(e,r);return n&&t.push(n),t}),[])},t.getPropWithDefault=function(e,t,r){const n=t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e);return void 0===n?r:n},t.idTest=function(e,t){d(e).forEach((e=>{-1===t.indexOf(e)&&t.push(e)}))},t.setCreateProp=function(e,t,r){const n=t.split(".");n.reduce(((e,t,i)=>i===n.length-1?(e[t]=r,r):(e[t]||(e[t]={}),e[t])),e)},t.setProp=function(e,t,r){if(p(e,t)){const n=t.split(".");n.reduce(((e,t,i)=>i===n.length-1?(e[t]=r,r):e[t]),e)}},t.getUTCTimestamp=function(){const e=new Date;return f(e.getUTCFullYear(),4)+f(e.getUTCMonth()+1,2)+f(e.getUTCDate(),2)+"_"+f(e.getUTCHours(),2)+f(e.getUTCMinutes(),2)+"_"+f(e.getUTCSeconds(),2)+f(e.getUTCMilliseconds(),3)},t.hasAnyKeyword=function(e,t){const r=p(e,"item.typeKeywords")||e.typeKeywords||[];return t.reduce(((e,t)=>(e||(e=r.includes(t)),e)),!1)},t.hasTypeKeyword=function(e,t){return(p(e,"item.typeKeywords")||e.typeKeywords||[]).includes(t)},t.getUniqueTitle=function(e,t,r){e=e?e.trim():"_";const n=(p(t,r)||[]).map((e=>e.title));let i=e,s=0;for(;n.indexOf(i)>-1;)s++,i=e+" "+s;return i},t.globalStringReplace=function e(t,r,n){return t&&Object.keys(t).forEach((i=>{const s=t[i];s&&("object"==typeof s?e(s,r,n):"string"==typeof s&&(t[i]=t[i].replace(r,n)))})),t},t.hasDatasource=function(e,t,r){return e.some((e=>e.itemId===t&&e.layerId===r))},t.cleanItemId=function(e){return e?e.replace("{{","").replace(".itemId}}",""):e},t.cleanLayerBasedItemId=function(e){return e?e.replace("{{","").replace(/([.]layer([0-9]|[1-9][0-9])[.](item|layer)Id)[}]{2}/,""):e},t.cleanLayerId=function(e){return e?.toString()?parseInt(e.toString().replace(/[{]{2}.{32}[.]layer/,"").replace(/[.]layerId[}]{2}/,""),10):e},t.getTemplateById=function(e,t){let r;return e.some((e=>e.itemId===t&&(r=e,!0))),r},t.regExTest=h,t.uniqueStringList=function(e){return e.filter(n.unique)},t._getRandomNumberInRange=m,t._padPositiveNum=f},955929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubscriptionInfo=void 0;const n=r(427342);t.getSubscriptionInfo=function(e){const t=`${(0,n.getPortalUrl)(e)}/portals/self/subscriptioninfo`,r={httpMethod:"GET",...e};return(0,n.request)(t,r)}},113600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDeletableSolutionInfo=void 0;const n=r(963333),i=n.__importStar(r(134854)),s=n.__importStar(r(721195));t.getDeletableSolutionInfo=function(e,t){let r;return new Promise(((n,o)=>{i.getSolutionSummary(e,t).then((e=>{r=e;const n=r.items.map((e=>s.getSolutionsRelatedToAnItem(e.id,t)));return Promise.all(n)})).then((e=>{r.items=r.items.filter(((t,r)=>1===e[r].length)),n(r)})).catch(o)}))}},896660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemTypeAbbrev=void 0,t.getItemTypeAbbrev=function(e){return{Group:"grp","Big Data Analytic":"bda","Feature Collection":"col","Feature Service":"svc",Feed:"fee","Geocoding Service":"xxx","Geodata Service":"xxx","Geometry Service":"xxx","Geoprocessing Service":"gs","Globe Service":"xxx","Image Service":"xxx",KML:"xxx","Map Service":"xxx","Network Analysis Service":"xxx","Real Time Analytic":"rta","Relational Database Connection":"xxx","Scene Service":"xxx","Stream Service":"xxx",Tool:"xxx","Vector Tile Service":"vts",WFS:"xxx",WMS:"xxx",WMTS:"xxx","Workflow Manager Service":"xxx","3D Web Scene":"xxx","Web Map":"map","Web Scene":"sc2",Application:"xxx","Data Store":"xxx","Desktop Application":"xxx","Excalibur Imagery Project":"xxx",Form:"frm","Hub Initiative":"hin","Hub Page":"hpg","Hub Site Application":"hsa","Insights Model":"xxx","Insights Page":"xxx","Insights Theme":"xxx","Insights Workbook":"xxx",Mission:"xxx","Mobile Application":"xxx","Native Application":"xxx",Notebook:"nbk","Oriented Imagery Catalog":"oic","Ortho Mapping Project":"xxx","QuickCapture Project":"qck","Site Application":"xxx","Site Initiative":"xxx","Site Page":"xxx",S
17olution:"sol",StoryMap:"sty","Urban Model":"xxx","Web Experience Template":"wxt","Web Experience":"wex","Web Mapping Application":"wma","Workforce Project":"wrk","360 VR Experience":"xxx","AppBuilder Extension":"xxx","AppBuilder Widget Package":"xxx","Application Configuration":"xxx","ArcGIS Pro Add In":"pro","ArcGIS Pro Configuration":"xxx","ArcPad Package":"xxx","Basemap Package":"xxx","CAD Drawing":"xxx","CityEngine Web Scene":"xxx","Code Attachment":"cod","Code Sample":"sam","Color Set":"xxx","Compact Tile Package":"xxx","CSV Collection":"xxx",CSV:"csv",Dashboard:"dsh","Data Pipeline":"dpl","Deep Learning Package":"xxx","Desktop Add In":"dai","Desktop Application Template":"dat","Desktop Style":"dst","Document Link":"doc","Explorer Add In":"xxx","Explorer Layer":"xxx","Explorer Map":"xxx","Feature Collection Template":"xxx","File Geodatabase":"xxx",GeoJson:"jsn",GeoPackage:"xxx","Geoprocessing Package":"gpk","Geoprocessing Sample":"geo","Globe Document":"xxx","Image Collection":"xxx",Image:"img","iWork Keynote":"xxx","iWork Numbers":"xxx","iWork Pages":"xxx","KML Collection":"xxx","Layer Package":"lyp","Layer Template":"xxx",Layer:"xxx",Layout:"xxx","Locator Package":"xxx","Map Document":"xxx","Map Package":"xxx","Map Template":"mpt","Microsoft Excel":"xls","Microsoft Powerpoint":"ppt","Microsoft Word":"wrd","Mobile Basemap Package":"xxx","Mobile Map Package":"xxx","Mobile Scene Package":"xxx","Native Application Installer":"xxx","Native Application Template":"xxx",netCDF:"xxx","Operation View":"opv","Operations Dashboard Add In":"xxx","Operations Dashboard Extension":"xxx",PDF:"xxx","Pro Layer Package":"xxx","Pro Layer":"xxx","Pro Map Package":"prm","Pro Map":"xxx","Pro Report":"xxx","Project Package":"ppk","Project Template":"prt","Published Map":"xxx","Raster function template":"xxx","Report Template":"xxx","Rule Package":"xxx","Scene Document":"xxx","Scene Package":"xxx","Service Definition":"xxx",Shapefile:"xxx","Statistical Data Collection":"xxx",Style:"sty","Survey123 Add In":"xxx","Symbol Set":"xxx","Task File":"xxx","Tile Package":"xxx","Toolbox Package":"xxx","Vector Tile Package":"xxx","Viewer Configuration":"xxx","Visio Document":"xxx","Window Mobile Package":"xxx","Windows Mobile Package":"xxx","Windows Viewer Add In":"xxx","Windows Viewer Configuration":"xxx",Workflow:"wfw","Workflow Manager Package":"xxx",Undefined:"und",Unsupported:"unk"}[e]||"xxx"}},134854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSolutionSummary=void 0;const n=r(963333),i=r(408102),s=n.__importStar(r(663708)),o=n.__importStar(r(721195)),a=n.__importStar(r(998080));t.getSolutionSummary=async function(e,t){const r={id:e,title:"",folder:"",items:[],groups:[]};let n=[],c=i.DeployedSolutionFormatVersion;const u=await Promise.all([o.getItemBase(e,t),o.getItemDataAsJson(e,t)]),l=u[0],d=u[1];if("Solution"!==l.type||!l.typeKeywords.includes("Solution")||!l.typeKeywords.includes("Deployed"))throw new Error("Item "+e+" is not a deployed Solution");r.title=l.title,r.folder=l.ownerFolder||"",c=a.extractSolutionVersion(d),n=d.templates;const p=await o.getItemsRelatedToASolution(e,t);r.items=p.map((e=>({id:e.id,type:e.type,title:e.title,modified:e.modified,owner:e.owner})));let h=[];h=c<1?s.reconstructBuildOrderIds(n):n.map((e=>e.itemId));let m=new Set;
17return d.templates.forEach((e=>{"Group"===e.type?m.add(e.itemId):e.groups&&e.groups.forEach((e=>{m=m.add(e)}))})),r.groups=[],m.forEach((e=>r.groups.push(e))),r.items.sort(((e,t)=>h.indexOf(e.id)-h.indexOf(t.id))),r}},983846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(963333);n.__exportStar(r(427342),t),n.__exportStar(r(776822),t),n.__exportStar(r(230038),t),n.__exportStar(r(321540),t),n.__exportStar(r(182017),t),n.__exportStar(r(651632),t),n.__exportStar(r(921298),t),n.__exportStar(r(734402),t),n.__exportStar(r(923868),t),n.__exportStar(r(113600),t),n.__exportStar(r(896660),t),n.__exportStar(r(134854),t),n.__exportStar(r(955929),t),n.__exportStar(r(408102),t),n.__exportStar(r(102529),t),n.__exportStar(r(947176),t),n.__exportStar(r(249977),t),n.__exportStar(r(449722),t),n.__exportStar(r(62140),t),n.__exportStar(r(336418),t),n.__exportStar(r(721195),t),n.__exportStar(r(320655),t),n.__exportStar(r(998080),t),n.__exportStar(r(906837),t),n.__exportStar(r(968210),t),n.__exportStar(r(900154),t),n.__exportStar(r(115632),t),n.__exportStar(r(715046),t),n.__exportStar(r(340391),t)},408102:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.SItemProgressStatus=t.EItemProgressStatus=t.SFileType=t.EFileType=t.UNREACHABLE=t.DeployedSolutionFormatVersion=t.SolutionTemplateFormatVersion=void 0,t.SolutionTemplateFormatVersion=1,t.DeployedSolutionFormatVersion=1,t.UNREACHABLE="unreachable",function(e){e[e.Data=0]="Data",e[e.Info=1]="Info",e[e.Metadata=2]="Metadata",e[e.Resource=3]="Resource",e[e.Thumbnail=4]="Thumbnail"}(r||(t.EFileType=r={})),function(e){e[e.Data=0]="Data",e[e.Info=1]="Info",e[e.Metadata=2]="Metadata",e[e.Resource=3]="Resource",e[e.Thumbnail=4]="Thumbnail"}(n||(t.SFileType=n={})),function(e){e[e.Started=0]="Started",e[e.Created=1]="Created",e[e.Cancelled=2]="Cancelled",e[e.Finished=3]="Finished",e[e.Ignored=4]="Ignored",e[e.Failed=5]="Failed",e[e.Unknown=6]="Unknown"}(i||(t.EItemProgressStatus=i={})),t.SItemProgressStatus=["1 Started","2 Created","3 Cancelled","3 Finished","3 Ignored","3 Failed","Unknown"]},102529:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemHash=t.findReusableSolutionsAndItems=t.getIdsFromSolutionTemplates=t.getSolutionItemsFromDeployedSolutions=t.getDeployedSolutions=t.getDeployedSolutionsAndItems=void 0;const n=r(427342);function i(e){return s(e).then((t=>o(e,t)))}function s(e){const t=(new n.SearchQueryBuilder).match(e.username).in("owner").and().match("Solution").in("type").and().match("Deployed").in("typekeywords");return(0,n.restSearchItems)({q:t,num:100,authentication:e}).then((e=>(e.results.sort(((e,t)=>e.title!==t.title?e.title<t.title?-1:1:e.id<t.id?-1:1)),e)))}function o(e,t){const r=[],i=[],s={};return t.results.length>0&&t.results.forEach((t=>{const o=t.typeKeywords.filter((e=>/solutionversion-.+/.exec(e))),a=o.length>0?o[0]:"";i.push(t.id),s[t.id]={created:t.created,title:t.title,version:a},r.push((0,n.getItemData)(t.id,{authentication:e}))})),Promise.all(r).then((e=>e.reduce(((e,t,r)=>{const n=i[r];return e[n]={templates:t.templates.map((e=>e.itemId)),solutionInfo:s[n]},e}),{})))}function a(e,t){return(0,n.getItemData)(e,{authentication:t}).then((e=>e.templates.map((e=>e.itemId))))}function c(e,t){return a(e,t).then((e=>{const r=e.map((e=>{const r={q:`typekeywords:source-${e} owner:${t.username}`,authentication:t};return(0,n.restSearchItems)(r)}));return Promise.all(r).then((t=>t.reduce(((t,r,n)=>(t[e[n]]=r.results.reduce(((e,t)=>(e[t.id]={created:t.created,solutions:{},title:t.title,type:t.type},e)),{}),t)),{})))}))}t.getDeployedSolutionsAndItems=i,t.getDeployedSolutions=s,t.getSolutionItemsFromDeployedSolutions=o,t.getIdsFromSolutionTemplates=a,t.findReusableSolutionsAndItems=function(e,t){return c(e,t).then((e=>i(t).then((t=>{const r=Object.keys(e);return Object.keys(t).forEach((n=>{const i=t[n];r.forEach((t=>{Object.keys(e[t]).forEach((r=>{const s=e[t][r];i.templates.indexOf(r)>-1&&Object.keys(s.solutions).indexOf(n)<0&&(s.solutions[n]=i.solutionInfo)}))}))})),e}))))},t.getItemHash=c},947176:(e,t,r)=>{"use strict";
17Object.defineProperty(t,"__esModule",{value:!0}),t.validateHTML=t.sanitizeURLProtocol=t.sanitizeJSON=t.sanitizeHTML=t.createZip=t.Sanitizer=void 0;const n=r(963333).__importDefault(r(745594)),i=r(923868),s=r(621450);var o=r(621450);Object.defineProperty(t,"Sanitizer",{enumerable:!0,get:function(){return o.Sanitizer}}),t.createZip=function(e,t,r){return new Promise(((s,o)=>{const a=new n.default;let c=a;r&&(c=a.folder(r)),t.forEach((e=>c.file(e.name,e,{binary:!0}))),a.generateAsync({type:"blob"}).then((t=>s((0,i.blobToFile)(t,e,"application/zip"))),o)}))},t.sanitizeHTML=function(e,t){return t||(t=new s.Sanitizer),t.sanitize(e)},t.sanitizeJSON=function(e,t){return t||(t=new s.Sanitizer),t.sanitize(e)},t.sanitizeURLProtocol=function(e,t){return t||(t=new s.Sanitizer),t.sanitizeUrl(e)},t.validateHTML=function(e,t){return t||(t=new s.Sanitizer),t.validate(e)}},470246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._applySchema=void 0;const n=r(849287);t._applySchema=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=1)return e;const t=(0,n.cloneObject)(e);t.item.properties||(t.item.properties={});const r=(0,n.getProp)(t,"data.templates")||[];return t.data.templates=r.map((e=>({key:e.fieldName||e.key,type:e.type,item:e.item,data:e.data,itemId:e.itemId||e.fieldName||e.key,resources:e.resources||[]}))),t.item.properties.schemaVersion=1,t}},984519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isLegacySolution=void 0;const n=r(923868);t._isLegacySolution=function(e){let t=!1;const r=(0,n.getProp)(e,"item.typeKeywords")||[];return r.includes("Template")||r.includes("hubSolutionTemplate")&&r.includes("solutionTemplate")&&(t=!0),t}},873262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeThreeDotZero=void 0;const n=r(923868);t._upgradeThreeDotZero=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=3)return e;{const t=(0,n.cloneObject)(e);return t.item.properties.schemaVersion=3,t}}},304570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotFive=void 0;const n=r(923868);t._upgradeTwoDotFive=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2.5)return e;{const t=(0,n.cloneObject)(e);
17return t.data.templates.forEach((e=>{if("Form"===e.type){(0,n.getProp)(e,"properties.form.portalUrl")&&(e.properties.form.portalUrl="{{portalBaseUrl}}");const t=parseFloat((0,n.getProp)(e,"properties.form.version")||"2.5");if(!(0,n.getProp)(e,"properties.form")||t>=3.8)return e;e.properties.form.layerName="survey",(0,n.getProp)(e,"properties.form.theme")&&(e.properties.form.themes=[e.properties.form.theme],delete e.properties.form.theme);const r=e=>(e.appearance&&e.appearance.layout&&(e.appearance.layout="vertical"),e);e.properties.form.questions=e.properties.form.questions.map((e=>e.questions?{...e,questions:e.questions.map(r)}:r(e))),e.properties.form.version=3.8}})),t.item.properties.schemaVersion=2.5,t}}},362030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotFour=void 0;const n=r(849287);t._upgradeTwoDotFour=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2.4)return e;{const t=(0,n.cloneObject)(e);return t.data.templates.map((e=>({src:`{{${e.key}.item.id}}`,val:`{{${e.itemId}.itemId}}`}))).forEach((e=>{t.data=(0,n.deepStringReplace)(t.data,e.src,e.val)})),t.data.templates=t.data.templates.map((e=>(e.assets&&(e.resources=e.assets.map((t=>{let r=t.name;return r.indexOf("/")>-1&&(r=r.split("/")[1]),`${e.itemId}-${r}`}))),e.estimatedDeploymentCostFactor||(e.estimatedDeploymentCostFactor=1),e))),t.item.properties.schemaVersion=2.4,t}}},205323:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotOne=void 0;const n=r(849287);t._upgradeTwoDotOne=function(e){return(0,n.getProp)(e,"item.properties.schemaVersion")>=2.1||(e.data.templates=e.data.templates.map((e=>(e.key=e.fieldName||e.key,e.itemId=e.itemId||e.key,e))),e.item.properties.schemaVersion=2.1),e}},559652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotSeven=void 0;const n=r(849287);t._upgradeTwoDotSeven=function(e){return(0,n.getProp)(e,"item.properties.schemaVersion")>=2.7||(e.data.templates=e.data.templates.map(((e,t,r)=>(e.itemId||(e.itemId=(0,n.createId)()),e.dependencies||(e.dependencies=[]),t>0&&0===e.dependencies.length&&(e.dependencies=[r[t-1].itemId]),e))),e.item.properties.schemaVersion=2.7),e}},987898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotSix=void 0;const n=r(923868);t._upgradeTwoDotSix=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2.6)return e;{const t=(0,n.cloneObject)(e),r=(e,t)=>((0,n.getProp)(t,"properties.form.questions.length")&&t.properties.form.questions.forEach((r=>{r.maps&&r.maps.forEach((r=>{const i=(0,n.cleanItemId)(r.itemId);t.dependencies=t.dependencies.filter((e=>e!==i)),e.push(i)}))})),e),i=t.data.templates.filter((({type:e})=>"Form"===e)).reduce(r,[]);return t.data.templates=t.data.templates.filter((e=>!i.includes(e.itemId))),t.item.properties.schemaVersion=2.6,t}}},89958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotThree=void 0;const n=r(923868),i=r(849287);t._upgradeTwoDotThree=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2.3)return e;const t=(0,i.cloneObject)(e);return t.data.templates=t.data.templates.map((e=>(e.resources?(e.assets=e.resources.map((e=>({name:e,type:"resource"}))),delete e.resources):e.assets=[],e))),t.item.properties.schemaVersion=2.3,t}},719798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._upgradeTwoDotTwo=void 0;const n=r(923868),i=r(849287);t._upgradeTwoDotTwo=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2.2)return e;const t=(0,i.cloneObject)(e);return[{src:"{{solution.name}}",val:"{{solution.title}}"},{src:"{{initiative.name}}",val:"{{solution.title}}"},{src:"{{initiative.title}}",val:"{{solution.title}}"},{src:"{{initiative.extent}}",val:"{{organization.defaultExtentBBox}}"},{src:"{{initiative.collaborationGroupId",val:"{{teams.collaborationGroupId"},{src:"{{initiative.openDataGroupId",val:"{{teams.contentGroupId"},{src:"{{initiative.contentGroupId",val:"{{teams.contentGroupId"},{src:"{{initiative.followersGroupId",val:"{{teams.followersGroupId"},{src:"{{collaborationGroupId",val:"{{teams.collaborationGroupId"},{src:"{{contentGroupId",val:"{{teams.contentGroupId"},{src:"{{followersGroupId",val:"{{teams.followersGroupId"},{src:"{{initiative.id",val:"{{initiative.item.id"},{src:"{{organization.portalBaseUrl",val:"{{portalBaseUrl"}
17].forEach((e=>{t.data=(0,i.deepStringReplace)(t.data,e.src,e.val)})),t.item.properties.schemaVersion=2.2,t}},474155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._convertIndicatorField=t._convertIndicatorToDefinition=t._convertIndicatorsToDefinitions=t._upgradeTwoDotZero=void 0;const n=r(849287);function i(e={}){return e.fields&&Array.isArray(e.fields)||(e.fields=[]),e.fields.map(t._convertIndicatorToDefinition)}t._upgradeTwoDotZero=function(e){if((0,n.getProp)(e,"item.properties.schemaVersion")>=2)return e;const t=(0,n.cloneObject)(e),r=((0,n.getProp)(t,"data.configurationSettings")||[]).find((e=>"Indicators"===e.category));return t.data.indicators=i(r),delete t.data.configurationSettings,t.item.properties.schemaVersion=2,t},t._convertIndicatorsToDefinitions=i,t._convertIndicatorToDefinition=function(e){return{id:e.fieldName,type:"Data",name:e.label||e.fieldName,optional:e.optional||!1,definition:{description:e.label||e.fieldName,supportedTypes:[].concat(e.layerOptions.supportedTypes),geometryTypes:[].concat(e.layerOptions.geometryTypes),fields:e.fields.map(t._convertIndicatorField)}}},t._convertIndicatorField=function(e){return{id:e.fieldName,name:e.label,optional:e.optional||!1,description:e.tooltip,supportedTypes:[].concat(e.supportedTypes)}}},249977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.migrateSchema=t.CURRENT_SCHEMA_VERSION=void 0;const n=r(984519),i=r(470246),s=r(474155),o=r(205323),a=r(719798),c=r(89958),u=r(362030),l=r(304570),d=r(987898),p=r(559652),h=r(873262),m=r(849287);t.CURRENT_SCHEMA_VERSION=3,t.migrateSchema=function(e){(0,m.getProp)(e,"item.properties")||(e.item.properties={});const r=(0,m.getProp)(e,"item.properties.schemaVersion");if(r===t.CURRENT_SCHEMA_VERSION)return Promise.resolve(e);{const t=(0,n._isLegacySolution)(e),m=[];return r||t?(m.push(i._applySchema,s._upgradeTwoDotZero,o._upgradeTwoDotOne,a._upgradeTwoDotTwo,c._upgradeTwoDotThree,u._upgradeTwoDotFour,l._upgradeTwoDotFive,d._upgradeTwoDotSix,p._upgradeTwoDotSeven),m.push(h._upgradeThreeDotZero)):m.push(h._upgradeThreeDotZero),m.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve(e))}}},449722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateItemResourceFile=t.removeItemResourceFile=t.getThumbnailFromStorageItem=t.isSupportedFileType=t.generateThumbnailStorageFilename=t.generateStorageFilePaths=t.generateSourceThumbnailUrl=t.generateSourceResourceUrl=t.generateSourceMetadataUrl=t.generateSourceThumbnailPath=t.generateSourceFilePaths=t.generateMetadataStorageFilename=t.copyFilesToStorageItem=t.copyFilesFromStorageItem=t.convertBlobToSupportableResource=t.addThumbnailFromBlob=void 0;const n=r(408102),i=r(427342),s=r(923868),o=r(804824),a=r(839516),c=r(721195),u=r(10143);function l(e){return{folder:e+"_info_metadata",filename:"metadata.xml"}}function d(e,t,r,n=!1){return{itemId:t,url:(0,s.appendQueryParam)(m(e,t,r,n),"w=400"),...f(t,r)}}function p(e,t,r=!1){return(0,s.checkUrlPathTermination)(e)+(r?"community/groups/":"content/items/")+t+"/info/metadata/metadata.xml"}function h(e,t,r){return(0,s.checkUrlPathTermination)(e)+"content/items/"+t+"/resources/"+r}function m(e,t,r,n=!1){return(0,s.checkUrlPathTermination)(e)+(n?"community/groups/":"content/items/")+t+"/info/"+r}function f(e,t){const r=e+"_info_thumbnail",n=t.split("/");return{folder:r,filename:1===n.length?n[0]:n[1]}}function g(e){const t=e.match(/\.([a-z]+)$/i);return!!t&&"|.json|.xml|.txt|.png|.pbf|.zip|.jpeg|.jpg|.gif|.bmp|.gz|.svg|.svgz|.geodatabase|".indexOf("|"+t[0]+"|")>=0}t.addThumbnailFromBlob=function(e,t,r,n=!1){const s={params:{thumbnail:e},authentication:r};return s[n?"group":"item"]={id:t},n?(0,i.restUpdateGroup)(s):(0,i.restUpdateItem)(s)},t.convertBlobToSupportableResource=function(e,t=""){const r=e.name||t;let n=r;return n&&!g(n)&&(n+=".zip"),{blob:new File([e],n,{type:e.type}),filename:r,mimeType:e.type}},t.copyFilesFromStorageItem=function(e,t,r,i,s,o,a={},c={}){const l=a.properties||null;return a.itemId&&(t=t.map((e=>(0===e.filename.indexOf(a.itemId)&&""===e.folder&&(e.filename=e.filename.replace(`${a.itemId}-`,"")),e)))),new Promise(((d,p)=>{const h=t.map((e=>({folder:e.type===n.EFileType.Data?i:e.folder,filename:e.filename,type:e.type,mimeType:l?l[e.filename]:"",url:e.url})));(0,u.copyAssociatedFilesByType)(h,e,r,s,o,a,c).then((e=>{e.filter((e=>"metadata.xml"!==e.filename)).map((e=>e.fetchedFromSource&&e.copiedToDestination)).reduce(((e,t)=>e&&t),!0)?d(!0):p()}))}))},t.copyFilesToStorageItem=function(e,t,r){return new Promise((n=>{(0,u.copyFilesAsResources)(e,t,r).then((e=>{n(e.filter((e=>e.fetchedFromSource&&e.copiedToDestination)).map((e=>e.folder+"/"+e.filename)))}))}))},t.generateMetadataStorageFilename=l,t.generateSourceFilePaths=function(e,t,r,n,i=!1,s=0){const a=n.map((r=>({itemId:t,url:h(e,t,r),...(0,o.convertItemResourceToStorageResource)(t,r,s)})));return a.push({itemId:t,url:p(e,t,i),...l(t)}),r&&a.push(d(e,t,r,i)),a},t.generateSourceThumbnailPath=d,t.generateSourceMetadataUrl=p,t.generateSourceResourceUrl=h,t.generateSourceThumbnailUrl=m,t.generateStorageFilePaths=function(e,t,r=[],n=0){return r.map((r=>({url:h(e,t,r),...(0,a.convertStorageResourceToItemResource)(r,n)})))},t.generateThumbnailStorageFilename=f,t.isSupportedFileType=g,t.getThumbnailFromStorageItem=function(e,t){let r,i;return t.forEach((e=>{e.type===n.EFileType.Thumbnail&&(r=e.url,i=e.filename)})),r?(0,c.getThumbnailFile)(r,i,e):Promise.resolve(null)},t.removeItemResourceFile=function(e,t,r){return(0,i.removeItemResource)({id:e,resource:t,authentication:r})},t.updateItemResourceFile=function(e,t,r,n){const s=t.split("/"),o=s.length>1?s.slice(0,s.length-1).join("/"):void 0,a=s[s.length-1];return(0,i.updateItemResource)({id:e,prefix:o,name:a,resource:r,authentication:n})}},215863:(e,t,r)=>{"use strict";
17Object.defineProperty(t,"__esModule",{value:!0}),t.addTextResource=t.addBlobResource=void 0;const n=r(427342);t.addBlobResource=function(e,t,r,i,s){if(i&&i.indexOf(".")<0)return new Promise(((e,t)=>{t(new n.ArcGISAuthError("Filename must have an extension indicating its type"))}));const o={id:t,resource:e,name:i,authentication:s,params:{}};return r&&(o.params={resourcesPrefix:r}),(0,n.addItemResource)(o)},t.addTextResource=function(e,t,r,i,s){if(i&&i.indexOf(".")<0)return new Promise(((e,t)=>{t(new n.ArcGISAuthError("Filename must have an extension indicating its type"))}));const o={id:t,content:e,name:i,authentication:s,params:{}};return r&&(o.params={resourcesPrefix:r}),(0,n.addItemResource)(o)}},369982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMetadataFromBlob=void 0;const n=r(427342);t.addMetadataFromBlob=function(e,t,r){const i={item:{id:t},params:{metadata:e},authentication:r};return(0,n.restUpdateItem)(i)}},804824:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertItemResourceToStorageResource=void 0;
17const n=r(520672);t.convertItemResourceToStorageResource=function(e,t,r=0,i){if(void 0!==i)switch(i){case n.SolutionResourceType.data:e=`${e}_info_data`;break;case n.SolutionResourceType.fakezip:e=`${e}_info_dataz`;break;case n.SolutionResourceType.info:e=`${e}_info`;break;case n.SolutionResourceType.metadata:e=`${e}_info_metadata`;break;case n.SolutionResourceType.thumbnail:e=`${e}_info_thumbnail`}let s=e,o=t;const a=o.lastIndexOf("/");if(a>=0){let e=o.substr(0,a);0===r?(e=e.replace("/","_"),s+="_"+e):s+="/"+e,o=o.substr(a+1)}return{folder:s,filename:o}}},839516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertStorageResourceToItemResource=void 0;const n=r(408102);t.convertStorageResourceToItemResource=function(e,t=0){const r=e.split("/");let i=r.pop(),s="";const o=r.shift();let a=n.EFileType.Resource;if(o)if(o.endsWith("_info_thumbnail"))a=n.EFileType.Thumbnail;else if(o.endsWith("_info_metadata"))a=n.EFileType.Metadata,i="metadata.xml";else if(o.endsWith("_info_data"))a=n.EFileType.Data;else if(o.endsWith("_info_dataz"))i=i.replace(/\.zip$/,""),a=n.EFileType.Data;else if(t<1){const e=o.indexOf("_");e>0&&(s=o.substr(e+1))}else s=r.join("/");return{type:a,folder:s,filename:i}}},10143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._sendZipsSeriallyToItem=t._detemplatizeResources=t._copyAssociatedFileZips=t.copyAssociatedFilesByType=t.copyFilesAsResources=void 0;const n=r(963333),i=r(408102),s=r(849287),o=r(541843),a=r(204426),c=r(289241),u=r(102023),l=r(609398),d=r(923868),p=r(721195),h=n.__importDefault(r(745594));function m(e,t,r){return new Promise((n=>{const i=e.filter((e=>Object.keys(e.zip.files).length>0));i.length>0?y(i,t,r).then((e=>{n(e)})):n([])}))}function f(e){return{filename:`resources${e}.zip`,zip:new h.default,filelist:[]}}function g(e,t,r,n,i,s={}){const o=[];if("Vector Tile Service"===r.type){const s=n.filter((e=>"root.json"===e.filename)),a="{{"+t+".url}}",c=i.portal+"/content/items/"+r.itemId,u=new RegExp(a,"g");s.forEach((t=>{o.push(new Promise((r=>{(0,p.getBlobAsFile)(t.url,t.filename,e).then((e=>{(0,d.blobToJson)(e).then((e=>{const n=JSON.parse(JSON.stringify(e).replace(u,c));t.file=(0,d.jsonToFile)(n,t.filename),t.url="",r(null)}))}))})))}))}else if("Geoprocessing Service"===r.type){const i={};i[`{{${t}.itemId}}`]=r.itemId,r.dependencies.forEach((e=>{i[`{{${e}.itemId}}`]=s[e].itemId})),n.forEach((t=>{o.push(new Promise((r=>{(0,p.getBlobAsFile)(t.url,t.filename,e).then((e=>{(0,d.blobToJson)(e).then((e=>{let n=JSON.stringify(e);
17Object.keys(i).forEach((e=>{const t=new RegExp(e,"g");n=n.replace(t,i[e])}));const s=JSON.parse(n);t.file=(0,d.jsonToFile)(s,t.filename),t.url="",r(null)}))}))})))}))}return Promise.all(o)}function y(e,t,r){return new Promise((n=>{let i=[];const s=e.pop();let o=Promise.resolve([]);e.length>0&&(o=y(e,t,r)),o.then((e=>(i=e,new Promise((e=>{setTimeout((()=>e()),1e3)}))))).then((()=>(0,u.copyZipIntoItem)(s,t,r))).then((e=>{e.filelist.forEach((t=>{i.push((0,l.createCopyResults)(t,!0,e.copiedToDestination))})),n(i)}))}))}t.copyFilesAsResources=function(e,t,r,n=40){return new Promise((i=>{const s=[],o=[];if(e.length>0){const t=49999e3;let r=0,i=f(r);o.push(i);let a=0;e.forEach((e=>{(i.filelist.length>=n||a+e.file.size>=t)&&(r++,i=f(r),o.push(i),a=0),s.push((0,c.copyResourceIntoZip)(e,i)),a+=e.file.size}))}s.length>0?Promise.all(s).then((e=>{e=e.filter((e=>!(e.fetchedFromSource&&void 0===e.copiedToDestination))),m(o,t,r).then((t=>{i(e.concat(t))}))})):i([])}))},t.copyAssociatedFilesByType=async function(e,t,r,n,u,l={},d={}){return new Promise((p=>{let f=[],y=e;f=e.filter((e=>e.type===i.EFileType.Data||e.type===i.EFileType.Metadata)).map((e=>{switch(e.type){case i.EFileType.Data:return(0,o.copyDataIntoItem)(e,t,n,u);case i.EFileType.Metadata:return(0,a.copyMetadataIntoItem)(e,t,n,u)}})),y=e.filter((e=>e.type===i.EFileType.Info||e.type===i.EFileType.Resource));const b=[];new Promise((e=>{y.length>0?g(t,r,l,y,u,d).then((()=>{(0,s.chunkArray)(y,40).forEach(((e,r)=>{const n={filename:`resources${r}.zip`,zip:new h.default,filelist:[]};f=f.concat(e.map((e=>(0,c.copyResourceIntoZipFromInfo)(e,t,n)))),b.push(n)})),e(null)})):e(null)})).then((()=>{f.length>0?Promise.all(f).then((e=>{e=e.filter((e=>!(e.fetchedFromSource&&void 0===e.copiedToDestination))),m(b,n,u).then((t=>{p(e.concat(t))}))})):p([])}))}))},t._copyAssociatedFileZips=m,t._detemplatizeResources=g,t._sendZipsSeriallyToItem=y},541843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMimeTypedFile=t.copyDataIntoItem=void 0;const n=r(609398),i=r(886867),s=r(336418);function o(e){return new File([e.blob],e.filename,{type:e.mimeType})}t.copyDataIntoItem=function(e,t,r,a){return new Promise((c=>{(0,i.getBlob)(e.url,t).then((t=>{const i={id:r,data:o({blob:t,filename:e.filename,mimeType:e.mimeType||t.type})};(0,s.updateItem)(i,a,e.folder).then((()=>c((0,n.createCopyResults)(e,!0,!0))),(()=>c((0,n.createCopyResults)(e,!0,!1))))}),(()=>c((0,n.createCopyResults)(e,!1))))}))},t.createMimeTypedFile=o},204426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyMetadataIntoItem=void 0;const n=r(369982),i=r(609398),s=r(886867);t.copyMetadataIntoItem=function(e,t,r,o){return new Promise((a=>{(0,s.getBlob)(e.url,t).then((t=>{"text/xml"===t.type||"application/xml"===t.type?(0,n.addMetadataFromBlob)(t,r,o).then((()=>a((0,i.createCopyResults)(e,!0,!0))),(()=>a((0,i.createCopyResults)(e,!0,!1)))):a((0,i.createCopyResults)(e,!1))}),(()=>a((0,i.createCopyResults)(e,!1))))}))}},289241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyResourceIntoZipFromInfo=t.copyResourceIntoZip=void 0;const n=r(609398),i=r(721195);t.copyResourceIntoZip=function(e,t){return e.folder?t.zip.folder(e.folder).file(e.filename,e.file,{binary:!0}):t.zip.file(e.filename,e.file,{binary:!0}),t.filelist.push(e),(0,n.createCopyResults)(e,!0)},t.copyResourceIntoZipFromInfo=function(e,t,r){return new Promise((s=>{let o;o=e.file?Promise.resolve(e.file):(0,i.getBlobAsFile)(e.url,e.filename,t),o.then((t=>{e.folder?r.zip.folder(e.folder).file(e.filename,t,{binary:!0}):r.zip.file(e.filename,t,{binary:!0}),r.filelist.push(e),s((0,n.createCopyResults)(e,!0))}),(()=>s((0,n.createCopyResults)(e,!1))))}))}},102023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyZipIntoItem=void 0;const n=r(427342),i=r(923868),s=r(609398);t.copyZipIntoItem=function(e,t,r){return new Promise((o=>{e.zip.generateAsync({type:"blob"}).then((t=>(0,i.blobToFile)(t,e.filename,"application/zip"))).then((e=>{const i={id:t,resource:e,authentication:r,params:{archive:!0}};return(0,n.addItemResource)(i)})).then((()=>o((0,s.createCopyResults)(e,!0,!0))),(()=>o((0,s.createCopyResults)(e,!0,!1))))}))}},609398:(e,t)=>
17{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCopyResults=void 0,t.createCopyResults=function(e,t,r){return{...e,fetchedFromSource:t,copiedToDestination:r}}},886867:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlob=void 0;const n=r(427342);t.getBlob=function(e,t,r={}){if(!e)return Promise.reject("Url must be provided");const i={authentication:t,rawResponse:!0,...r};return(0,n.request)(e,i).then((e=>e.blob()))}},541246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemResourcesFilesFromPaths=void 0;const n=r(721195);t.getItemResourcesFilesFromPaths=function(e,t){return Promise.all(e.map((e=>new Promise((r=>{(0,n.getBlobAsFile)(e.url,e.filename,t).then((t=>{r({itemId:e.itemId,file:t,folder:e.folder,filename:e.filename})}),(()=>{r(null)}))}))))).then((e=>e.filter((e=>!!e))))}},121633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemResourcesPaths=void 0;const n=r(721195),i=r(449722);t.getItemResourcesPaths=function(e,t,r,s=0){return(0,n.getItemResources)(e.itemId,r).then((t=>{const n=t.resources.map((e=>e.resource)).filter((t=>{let r=!0;return"Hub Site Application"===e.type&&t.match(/^draft-(\d+).json$/)&&(r=!1),"StoryMap"===e.type&&(-1!==["oembed.json","oembed.xml"].indexOf(t)&&(r=!1),t.match(/^draft_[\s\S]*.json$/)&&(r=!1),"published_data.json"===t&&(r=!1)),"Web Experience"===e.type&&"config/config.json"===t&&(r=!1),"Geoprocessing Service"===e.type?t.indexOf("webtool")>-1:r})),o=(0,i.generateSourceFilePaths)(r.portal,e.itemId,e.item.thumbnail,n,"Group"===e.type,s);return Promise.resolve(o)}))}},62140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(963333);n.__exportStar(r(215863),t),n.__exportStar(r(369982),t),n.__exportStar(r(804824),t),n.__exportStar(r(839516),t),n.__exportStar(r(10143),t),n.__exportStar(r(541843),t),n.__exportStar(r(204426),t),n.__exportStar(r(289241),t),n.__exportStar(r(102023),t),n.__exportStar(r(609398),t),n.__exportStar(r(886867),t),n.__exportStar(r(541246),t),n.__exportStar(r(121633),t),n.__exportStar(r(520672),t),n.__exportStar(r(414689),t)},520672:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SolutionResourceType=void 0,function(e){e[e.thumbnail=0]="thumbnail",e[e.metadata=1]="metadata",e[e.resource=2]="resource",e[e.data=3]="data",e[e.fakezip=4]="fakezip",e[e.info=5]="info"}(r||(t.SolutionResourceType=r={}))},414689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTextResource=void 0;const n=r(427342);t.updateTextResource=function(e,t,r,i,s){if(i&&i.indexOf(".")<0)return new Promise(((e,t)=>{t(new n.ArcGISAuthError("Filename must have an extension indicating its type"))}));const o={id:t,content:e,name:i,authentication:s,params:{}};return r&&(o.params={resourcesPrefix:r}),(0,n.updateItemResource)(o)}},336418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._countRelationships=t._addItemMetadataFile=t._addItemDataFile=t.updateItemURL=t.updateItemTemplateFromDictionary=t.updateItemExtended=t.updateGroup=t.updateItem=t.shareItem=t.removeUsers=t.reassignGroup=t.searchGroupContents=t.searchGroupAllContents=t.searchAllGroups=t.searchGroups=t.searchAllItems=t.searchItems=t.removeItemOrGroup=t.removeItem=t.removeGroup=t.removeFolder=t.hasInvalidGroupDesignations=t._parseAdminServiceData=t.setWorkflowConfigurationZip=t.getWorkflowConfigurationZip=t.getFeatureServiceProperties=t.getServiceLayersAndTables=t.getRequest=t._sortRelationships=t.moveItemsToFolder=t.moveItemToFolder=t.getLayerUpdates=t.getLayers=t.extractDependencies=t.createUniqueGroup=t.createUniqueFolder=t.createItemWithData=t.createFullItem=t.createFeatureService=t.convertExtent=t.convertExtentWithFallback=t._validateExtent=t.convertToISearchOptions=t.checkRequestStatus=t.addToServiceDefinition=t.addTokenToUrl=t.addForwardItemRelationships=t.addForwardItemRelationship=t.getUserSession=t.addItemData=void 0,t._updateItemURL=t._updateIndexesForRelationshipKeyFields=t._setItemProperties=t._reportVariablesInItem=t._lowercaseDomain=t._getUpdate=t._getSubtypeUpdates=t._getContingentValuesUpdates=t._getRelationshipUpdates=t._getFallbackExtent=t._getCreateServiceOptions=void 0;const n=r(921298),i=r(923868),s=r(427342),o=r(947176),a=r(721195),c=r(715046),u=r(998080),l=r(906837);function d(e,t,r){const n={id:e,file:t,authentication:r};return(0,s.restAddItemData)(n)}function p(e,t,r,n){return new Promise((i=>{const o={originItemId:e,destinationItemId:t,relationshipType:r,authentication:n};
17(0,s.addItemRelationship)(o).then((t=>{i({success:t.success,itemId:e})}),(()=>{i({success:!1,itemId:e})}))}))}function h(e,t){return new Promise((r=>{e&&t?t.getToken(e).then((t=>{t&&(e=(0,i.appendQueryParam)(e,"token="+t)),r(e)}),(()=>r(e))):r(e)}))}function m(e,t){return new Promise(((r,n)=>{const i=e.statusURL||e.statusUrl;if(i){const e=setInterval((()=>{(0,s.request)(i,{authentication:t}).then((t=>{["completed","success"].indexOf(t.status.toLowerCase())>-1?(clearInterval(e),r()):"failed"===t.status.toLowerCase()&&(clearInterval(e),n(t))}),(t=>{clearInterval(e),n(t)}))}),2e3)}else r()}))}function f(e){let t={q:"",start:1,num:100};return"string"==typeof e?t.q=e:e instanceof s.SearchQueryBuilder?t.q=e.toParam():t={...t,...e},"relevance"===t.sortField&&delete t.sortField,t}function g(e){return("number"!=typeof e.xmin||"number"!=typeof e.xmax||"number"!=typeof e.ymax||"number"!=typeof e.ymin)&&(e.xmin=-179,e.xmax=179,e.ymax=89,e.ymin=-89,e.spatialReference={wkid:4326}),e}function y(e,t,r,n,s){return new Promise(((o,a)=>{const c={xmin:-179,xmax:179,ymin:-89,ymax:89,spatialReference:{wkid:4326}};b(g(e),r,n,s).then((e=>{JSON.stringify(e)===JSON.stringify(g(e))?o(e):b(t||c,r,n,s).then(o,(e=>a((0,i.fail)(e))))}),(()=>{b(c,r,n,s).then(o,(e=>a((0,i.fail)(e))))}))}))}function b(e,t,r,n){const o={authentication:n,httpMethod:"GET"};return new Promise(((n,a)=>{e.spatialReference.wkid!==t?.wkid&&t?(o.params={f:"json",inSR:e.spatialReference.wkid,outSR:t.wkid,extentOfInterest:JSON.stringify(e)},(0,s.request)((0,i.checkUrlPathTermination)(r)+"findTransformations",o).then((c=>{const u=c&&c.transformations?c.transformations:void 0;let l;u&&u.length>0&&(l=u[0].wkid?u[0].wkid:u[0].geoTransforms?u[0]:void 0),o.params={f:"json",outSR:t.wkid,inSR:e.spatialReference.wkid,geometries:{geometryType:"esriGeometryPoint",geometries:[{x:e.xmin,y:e.ymin},{x:e.xmax,y:e.ymax}]},transformation:l},(0,s.request)((0,i.checkUrlPathTermination)(r)+"project",o).then((e=>{const r=2===e.geometries.length?e.geometries:void 0;n(r?{xmin:r[0].x,ymin:r[0].y,xmax:r[1].x,ymax:r[1].y,spatialReference:t}:void 0)}),(e=>a((0,i.fail)(e))))}),(e=>a((0,i.fail)(e))))):n(e)}))}async function v(e,t,r){const n={itemId:e,folderId:t,authentication:r};return(0,s.moveItem)(n)}function w(e,t,r){const n=[].concat(e.map((e=>e.id)),t.map((e=>e.id))),i=[];return n.forEach((e=>{r.layers.some((t=>e===t.id&&(i.push(t),!0)))})),i}function S(e,t,r=!1){return new Promise(((o,a)=>{const u={service:{},layers:[],tables:[]};e=e.replace("/rest/services","/rest/admin/services"),(0,s.request)(e+"?f=json",{authentication:t}).then((s=>{u.service=E(s),s.adminServiceInfo?.cacheMaxAge&&(u.service.cacheMaxAge=s.adminServiceInfo.cacheMaxAge),s.layers&&(u.layers=s.layers,u.layers.forEach((e=>{e.serviceItemId=u.service.serviceItemId,e.extent=null,(0,n.removeLayerOptimization)(e)}))),delete s.layers,s.tables&&(u.tables=s.tables,u.tables.forEach((e=>{e.serviceItemId=u.service.serviceItemId,e.extent=null}))),delete s.tables,L(u),(0,n.processContingentValues)(u,e,t).then((()=>{r?(0,c.getWorkforceServiceInfo)(u,e,t).then(o,a):o(u)}),(e=>a((0,i.fail)(e))))}),(e=>a((0,i.fail)(e))))}))}function E(e){const t=e.layers||[],r=e.tables||[];return(0,i.setCreateProp)(e,"layers",t.filter((e=>"Feature Layer"===e.type))),(0,i.setCreateProp)(e,"tables",r.concat(t.filter((e=>"Table"===e.type)))),e}function T(e,t){return new Promise(((r,n)=>{const i={id:e,authentication:t};(0,s.restRemoveGroup)(i).then((e=>e.success?r(e):n(e)),n)}))}function I(e,t,r=!0){return new Promise(((n,i)=>{const o={id:e,authentication:t,params:{permanentDelete:r}};(0,s.restRemoveItem)(o).then((e=>e.success?n(e):i(e)),i)}))}function C(e){return(0,s.restSearchItems)(e)}function A(e,t,r){const n={q:e,params:{...r},authentication:t};return(0,s.restSearchGroups)(n)}function O(e,t,r,n){const i=n||{start:1,num:24},s={sortField:"title",sortOrder:"asc",...i};let o=r||[];return new Promise(((r,n)=>{A(e,t,s).then((n=>{o=o.concat(n.results),n.nextStart>0?(i.start=n.nextStart,r(O(e,t,o,i))):r(o)}),(e=>n(e)))}))}function _(e,t,r,n,i){const o={groupId:e,q:t,params:Object.assign({num:100},n),authentication:r,portal:i};return Array.isArray(o.params.categories)&&(o.params.categories=o.params.categories.map((e=>e.split(",")))),(0,s.searchGroupContent)(o)}function D(e,t,r,n,o,a){return new Promise(((c,u)=>{const d={item:e,params:{text:t||{}},authentication:r};n&&(d.params.thumbnail=n),(0,l.isTrackingViewTemplate)(void 0,e)&&a&&(d.owner=a.locationTracking.owner),(0,s.restUpdateItem)(d).then((t=>{if(o&&"private"!==o){const n={id:e.id,access:"public"===o?"public":"org",authentication:r};(0,s.setItemAccess)(n).then((()=>c(t)),(e=>u((0,i.fail)(e))))}else c(t)}),(e=>u((0,i.fail)(e))))}))}function P(e,t,r){return new Promise(((n,s)=>{const o=t=>{d(e,t,r).then(n,s)};t.type.startsWith("text/plain")?(0,i.blobToText)(t).then(o,s):"application/json"===t.type?(0,i.blobToJson)(t).then(o,s):o(t)}))}function k(e,t,r){return new Promise(((n,i)=>{const o={item:{id:e},params:{metadata:t},authentication:r};(0,s.restUpdateItem)(o).then(n,i)}))}function x(e,t,r){return new Promise(((s,o)=>{const a=e.properties,c=r.folderId,d=r.isPortal,p=e.itemId;(0,n.validateSpatialReferenceAndExtent)(a,e,r);const h=R(a,r),m={},f={item:{title:e.item.title,name:e.item.name,preserveLayerIds:!0},folderId:c,params:m,authentication:t};f.item=(0,l.isTrackingViewTemplate)(e)?(0,l.setTrackingOptions)(e,f,r):G(f.item,0,a,m,d),y(r.organization.defaultExtent,h,a.service.spatialReference,r.organization.helperServices.geometry.url,t).then((t=>{r[p].solutionExtent=t,(0,n.setDefaultSpatialReference)(r,p,t.spatialReference),f.item=(0,u.replaceInTemplate)(f.item,r),f.params=(0,u.replaceInTemplate)(f.params,r),e.item.thumbnail&&(f.params.thumbnail=e.item.thumbnail),s(f)}),(e=>o((0,i.fail)(e))))}))}function R(e,t){const r=e.service.spatialReference,n=(0,i.getProp)(e,"defaultExtent.spatialReference.wkid"),s=(0,i.getProp)(t,"params.defaultExtent");return n&&n===r.wkid?e.defaultExtent:s||e.defaultExtent}function U(e){const t={layers:[]};
17return Object.keys(e.objects).forEach((r=>{const n=e.objects[r];n.relationships&&n.relationships.length>0&&t.layers.push({id:n.id,relationships:n.relationships}),(0,i.deleteProp)(n,"relationships")})),t}function M(e){const t=[];return Object.keys(e.objects).forEach((r=>{const n=e.objects[r];n.contingentValues&&t.push({id:n.id,contingentValues:n.contingentValues}),(0,i.deleteProp)(n,"contingentValues")})),t}function N(e){const t=[];return Object.keys(e.objects).forEach((r=>{const n=e.objects[r];n.subtypeField&&t.push({id:n.id,subtypeField:n.subtypeField,subtypes:n.subtypes,defaultSubtypeCode:n.defaultSubtypeCode}),(0,i.deleteProp)(n,"subtypeField"),(0,i.deleteProp)(n,"subtypes"),(0,i.deleteProp)(n,"defaultSubtypeCode")})),t}function j(e,t,r,n,s){const o={delete:{url:(0,i.checkUrlPathTermination)(e)+t+"/deleteFromDefinition",params:{deleteFromDefinition:{fields:r&&r.hasOwnProperty("deleteFields")?r.deleteFields:[]}}},update:{url:(0,i.checkUrlPathTermination)(e)+(t?`${t}/updateDefinition`:"updateDefinition"),params:{updateDefinition:r}},add:{url:(0,i.checkUrlPathTermination)(e)+"addToDefinition",params:{addToDefinition:r}},refresh:{url:(0,i.checkUrlPathTermination)(e)+"refresh",params:{f:"json"}}};return{url:o[s].url,params:o[s].params,args:n}}function $(e){if(!e)return e;const[t,r,n]=e.match(/(https?:\/\/)(.+)/),[i,...s]=n.split("/");return`${r}${i.toLowerCase()}/${s.join("/")}`}function F(e,t,r,n){const i=e=>JSON.stringify(e).match(/{{.+?}}/gim);r&&(0,u.hasUnresolvedVariables)(r)&&console.log(e+" ("+t+") contains variables in base: "+JSON.stringify(i(r))),n&&(0,u.hasUnresolvedVariables)(n)&&console.log(e+" ("+t+") contains variables in data: "+JSON.stringify(i(n)))}function G(e,t,r,n,s){const o=["Create","Query","Editing","Update","Delete","Uploads","Sync","Extract"],a=(0,i.getProp)(r,"service.capabilities")||(s?"":[]);e.capabilities=s?a.split(",").filter((e=>o.indexOf(e)>-1)).join(","):a,r.service.capabilities&&(r.service.capabilities=e.capabilities),L(r);const c=["isView","sourceSchemaChangesAllowed","isUpdatableView","capabilities","isMultiServicesView"],u=["layers","tables"];s&&u.push("adminServiceInfo");const l=Object.keys(e);return Object.keys(r.service).forEach((t=>{-1===l.indexOf(t)&&u.indexOf(t)<0&&(e[t]=r.service[t],r.service.isView&&c.indexOf(t)>-1&&(n[t]=r.service[t]))})),e.isMultiServicesView&&(0,i.getProp)(e,"editorTrackingInfo.enableEditorTracking")&&(e.editorTrackingInfo.enableEditorTracking=!1,n.editorTrackingInfo=e.editorTrackingInfo),s&&Object.keys(e).indexOf("initialExtent")>-1&&!e.initialExtent&&(0,i.deleteProp)(e,"initialExtent"),e}function L(e){(e.layers||[]).concat(e.tables||[]).forEach((e=>{const t=e.relationships,r=e.indexes;if(t&&t.length>0&&r&&r.length>0){const e=t.reduce(((e,t)=>("esriRelRoleOrigin"===t.role&&t.keyField&&e.indexOf(t.keyField)<0&&e.push(t.keyField),e)),[]);r.map((t=>(e.some((e=>new RegExp(`\\b${e}\\b`).test(t.fields)))&&(t.isUnique=!0),t)))}}))}function H(e,t,r,n=1){return new Promise(((o,a)=>{const c={item:{id:e,url:t},authentication:r};(0,s.restUpdateItem)(c).then((c=>{c.success?setTimeout((()=>{(0,s.getItem)(e,{authentication:r}).then((i=>{const s=i.url.indexOf("{");if(s>-1&&console.warn(e+" has template variable: "+i.url.substr(s)),t===i.url)o(e);else{const s="URL not updated for "+i.type+" "+i.id+": "+i.url+" ("+n+")";--n>0?H(e,t,r,n).then(o,a):(console.error(e+": "+s+"; FAILED"),a(s))}}),(e=>a((0,i.fail)(e))))}),1e3):a((0,i.fail)(c))}),(e=>a((0,i.fail)(e))))}))}t.addItemData=d,t.getUserSession=function(e={}){return new s.UserSession(e)},t.addForwardItemRelationship=p,t.addForwardItemRelationships=function(e,t,r){return new Promise((n=>{const i=new Array;t.forEach((t=>{t.relatedItemIds.forEach((n=>{i.push(p(e,n,t.relationshipType,r))}))})),Promise.all(i).then((e=>n(e)))}))},t.addTokenToUrl=h,t.addToServiceDefinition=function e(t,r,n=!1,o=!1){return o&&(r.params={...r.params,async:!0}),new Promise(((o,a)=>{(0,s.svcAdminAddToServiceDefinition)(t,r).then((e=>{m(e,r.authentication).then((()=>o(null)),(e=>a((0,i.fail)(e))))}),(s=>{n?a((0,i.fail)(s)):e(t,r,!0,!0).then((()=>o(null)),(e=>a(e)))}))}))},t.checkRequestStatus=m,t.convertToISearchOptions=f,t._validateExtent=g,t.convertExtentWithF
17allback=y,t.convertExtent=b,t.createFeatureService=function(e,t,r){return new Promise(((n,o)=>{x(e,t,r).then((e=>{(0,s.svcAdminCreateFeatureService)(e).then((e=>{e.encodedServiceURL=$(e.encodedServiceURL),e.serviceurl=$(e.serviceurl),n(e)}),(e=>o((0,i.fail)(e))))}),(e=>o((0,i.fail)(e))))}))},t.createFullItem=function(e,t,r,n,a,c,u,l,d="private"){return new Promise(((p,m)=>{const f={item:{...e},folderId:t,authentication:r};h(n,a).then((e=>{e&&(f.item.thumbnailUrl=(0,i.appendQueryParam)(e,"w=400")),(0,s.createItemInFolder)(f).then((e=>{if(e.success){let t;if("private"!==d){const n={id:e.id,access:"public"===d?"public":"org",authentication:r};t=(0,s.setItemAccess)(n)}else t=Promise.resolve({itemId:e.id});t.then((()=>{const t=[];c&&t.push(P(e.id,c,r)),Array.isArray(l)&&l.length>0&&t.push(new Promise(((t,n)=>{(0,o.createZip)("resources.zip",l).then((i=>{const o={id:e.id,resource:i,authentication:r,params:{archive:!0}};(0,s.addItemResource)(o).then(t,n)}),n)}))),u&&t.push(k(e.id,u,r)),Promise.all(t).then((()=>p(e)),(e=>m((0,i.fail)(e))))}),(e=>m((0,i.fail)(e))))}else m((0,i.fail)())}),(e=>m((0,i.fail)(e))))}))}))},t.createItemWithData=function(e,t,r,n,o="private"){return new Promise(((a,c)=>{const u={item:{title:"_",...e,data:t},folderId:n,authentication:r};e.thumbnail&&(u.params={thumbnail:e.thumbnail},delete u.item.thumbnail),u.params&&u.params.data?u.params[u.params.data instanceof File?"file":"text"]=u.params.data:u.params?t instanceof File?u.params.file=t:u.params.text=t:t instanceof File?u.params={file:t}:u.params={text:t||{}},(0,s.createItemInFolder)(u).then((e=>{if(e.success)if("private"!==o){const t={id:e.id,access:"public"===o?"public":"org",authentication:r};(0,s.setItemAccess)(t).then((()=>{a({folder:e.folder,id:e.id,success:!0})}),(e=>c((0,i.fail)(e))))}else a({folder:e.folder,id:e.id,success:!0});else c((0,i.fail)())}),(e=>c((0,i.fail)(e))))}))},t.createUniqueFolder=function e(t,r,n){return new Promise(((o,a)=>{const c=(0,
18i.getUniqueTitle)(t,r,"user.folders"),u={title:c,authentication:n};(0,s.createFolder)(u).then((e=>o(e)),(s=>{const u=(0,i.getProp)(s,"response.error.details");if(Array.isArray(u)&&u.length>0){const l="Folder title '"+c+"' not available.";u.indexOf(l)>=0?((0,i.getProp)(r,"user.folders")||(0,i.setCreateProp)(r,"user.folders",[]),r.user.folders.push({title:c}),e(t,r,n).then(o,a)):a(s)}else a(s)}))}))},t.createUniqueGroup=function e(t,r,n,o,a){return new Promise(((c,u)=>{let l;l=a&&a!==o.username?O(`(owner:${a}) orgid:${n.organization.id}`,o):Promise.resolve([]),l.then((a=>{n.allGroups=a.concat((0,i.getProp)(n,"user.groups")),r.title=(0,i.getUniqueTitle)(t,n,"allGroups");const l={group:r,authentication:o};(0,s.createGroup)(l).then(c,(s=>{const a=(0,i.getProp)(s,"response.error.details");if(Array.isArray(a)&&a.length>0){const i="You already have a group named '"+r.title+"'. Try a different name.";a.indexOf(i)>=0?(n.user.groups.push({title:r.title}),e(t,r,n,o).then(c,u)):u(s)}else u(s)}))}),(e=>u(e)))}))},t.extractDependencies=function(e,t){const r=[];return new Promise(((n,o)=>{e.properties.service.isView&&e.item.url&&!(0,l.isTrackingViewTemplate)(e)?(0,s.request)((0,i.checkUrlPathTermination)(e.item.url)+"sources?f=json",{authentication:t}).then((e=>{e&&e.services&&e.services.forEach((e=>{r.push({id:e.serviceItemId,name:e.name})})),n(r)}),(e=>o((0,i.fail)(e)))):(0,c.isWorkforceProject)(e)?n((0,c.getWorkforceDependencies)(e,r)):n(r)}))},t.getLayers=function(e,t,r){return new Promise(((n,o)=>{0===t.length&&n([]),e=e.replace("/rest/services","/rest/admin/services");const a=[];t.forEach((t=>{const n={authentication:r};a.push((0,s.request)((0,i.checkUrlPathTermination)(e)+t.id+"?f=json",n))})),Promise.all(a).then((e=>n(e)),(e=>o((0,i.fail)(e))))}))},t.getLayerUpdates=function(e,t){const r=e.itemTemplate.item.url.replace("rest/services","rest/admin/services"),n=[],s=j(r,null,null,e,"refresh");n.push(s),Object.keys(e.objects).forEach((s=>{const o=Object.assign({},e.objects[s]);t&&(0,i.deleteProps)(o,["type","id","relationships","sourceServiceFields"]),o.hasOwnProperty("deleteFields")&&(n.push(j(r,s,o,e,"delete")),(0,i.deleteProp)(o,"deleteFields"),n.push(j(r,null,null,e,"refresh")))}));const o=N({message:"add subtype updates",objects:e.objects,itemTemplate:e.itemTemplate,authentication:e.authentication});if(o.length>0&&t&&o.forEach((t=>{n.push(j(r+t.id,null,{subtypeField:t.subtypeField},e,"update")),n.push(j(r+t.id,null,{defaultSubtypeCode:t.defaultSubtypeCode},e,"update")),n.push(j(r+t.id,null,{subtypes:t.subtypes},e,"add"))})),!e.itemTemplate.properties.service.isView){const t=U({message:"updated layer relationships",objects:e.objects,itemTemplate:e.itemTemplate,authentication:e.authentication});
18t.layers=w(e.itemTemplate.properties.layers,e.itemTemplate.properties.tables,t),t.layers.length>0&&(n.push(j(r,null,t,e,"add")),n.push(s));const i=M({message:"add layer contingent values",objects:e.objects,itemTemplate:e.itemTemplate,authentication:e.authentication});i.length>0&&i.forEach((t=>{n.push(j(r+t.id,null,t.contingentValues,e,"add"))}))}return t&&Object.keys(e.objects).forEach((t=>{const s=Object.assign({},e.objects[t]);let o;Array.isArray(s.indexes)&&s.indexes.length>0&&(n.some((e=>{if(e.url.indexOf(`${t}/addToDefinition`)>-1)return o=e,!0}))?o.params.addToDefinition={...o.params.addToDefinition,indexes:s.indexes}:n.push(j((0,i.checkUrlPathTermination)(r)+t,null,{indexes:s.indexes},e,"add")))})),1===n.length?[]:n},t.moveItemToFolder=v,t.moveItemsToFolder=async function(e,t,r){const n=new Array;return e.forEach((e=>{n.push(v(e,t,r))})),Promise.all(n)},t._sortRelationships=w,t.getRequest=function e(t,r=!1,n=!1,o=!1){return new Promise(((a,c)=>{const u={params:t.params,authentication:t.args.authentication};(n&&t.url.indexOf("addToDefinition")>-1||t.url.indexOf("updateDefinition")>-1||t.url.indexOf("deleteFromDefinition")>-1)&&(u.params={...u.params,async:!0}),(0,s.request)(t.url,u).then((e=>{m(e,u.authentication).then((()=>a(null)),(e=>c((0,i.fail)(e))))}),(n=>{r?c(n):e(t,!0,!0,o).then((()=>a()),(e=>c(e)))}))}))},t.getServiceLayersAndTables=function(e,t){return new Promise(((r,n)=>{const s=(0,c.isWorkforceProject)(e);e.item.url?S(e.item.url,t,s).then((t=>{e.properties=t,r(e)}),(e=>n((0,i.fail)(e)))):r(e)}))},t.getFeatureServiceProperties=S,t.getWorkflowConfigurationZip=async function(e,t,r){const n=`${t}/admin/${e}/export`;return(0,s.request)(n,{authentication:r,headers:{Accept:"application/octet-stream",Authorization:`Bearer ${r.token}`,"X-Esri-Authorization":`Bearer ${r.token}`},params:{f:"zip"}})},t.setWorkflowConfigurationZip=async function(e,t,r,n){const i=`${r}/admin/${e}/import`;return(0,s.request)(i,{authentication:n,headers:{Accept:"application/octet-stream",Authorization:`Bearer ${n.token}`,"X-Esri-Authorization":`Bearer ${n.token}`},params:{file:t}})},t._parseAdminServiceData=E,t.hasInvalidGroupDesignations=function(e){return!!e&&["livingatlas"].indexOf(e)>-1},t.removeFolder=function(e,t){return new Promise(((r,n)=>{const i={folderId:e,authentication:t};(0,s.restRemoveFolder)(i).then((e=>e.success?r(e):n(e)),n)}))},t.removeGroup=T,t.removeItem=I,t.removeItemOrGroup=function(e,t,r=!0){return new Promise(((n,i)=>{I(e,t,r).then(n,(r=>{T(e,t).then(n,(()=>i(r)))}))}))},t.searchItems=C,t.searchAllItems=function e(t,r){const n=f(t),i=r||{query:n.q,start:1,num:100,nextStart:-1,total:0,results:[]};return new Promise(((r,s)=>{C(t).then((t=>{i.results=i.results.concat(t.results),i.num=i.total=i.results.length,t.nextStart>0?(n.start=t.nextStart,r(e(n,i))):r(i)}),(e=>s(e)))}))},t.searchGroups=A,t.searchAllGroups=O,t.searchGroupAllContents=function e(t,r,n,i,s,o){const a=o||{query:r,start:1,num:100,nextStart:-1,total:0,results:[]};return"relevance"===(i=i||{}).sortField&&delete i.sortField,new Promise(((o,c)=>{_(t,r,n,i,s).then((c=>{a.results=a.results.concat(c.results),a.num=a.total=a.results.length,c.nextStart>0?(i.start=c.nextStart,o(e(t,r,n,i,s,a))):o(a)}),(e=>c(e)))}))},t.searchGroupContents=_,t.reassignGroup=function(e,t,r){const n={authentication:r,params:{targetUsername:t}};return(0,s.request)(`${r.portal}/community/groups/${e}/reassign`,n)},t.removeUsers=function(e,t,r){return(0,s.removeGroupUsers)({id:e,users:t,authentication:r})},t.shareItem=function(e,t,r,n){return new Promise(((o,a)=>{const c={groupId:e,id:t,authentication:r};n&&(c.owner=n),(0,s.shareItemWithGroup)(c).then((()=>o(null)),(e=>a((0,i.fail)(e))))}))},t.updateItem=function(e,t,r,n){return new Promise(((i,o)=>{const a={item:e,folderId:r,authentication:t,params:{...n??{}}};e?.data instanceof File?a.params.file=e.data:a.params.text=e.data,(0,s.restUpdateItem)(a).then((e=>e.success?i(e):o(e)),(e=>o(e)))}))},t.updateGroup=function(e,t,r){return new Promise(((n,i)=>{const o={group:e,authentication:t,params:{...r??{}}};(0,s.restUpdateGroup)(o).then((e=>e.success?n(e):i(e)),(e=>i(e)))}))},t.updateItemExtended=D,t.updateItemTemplateFromDictionary=function(e,t,r){return new Promise(((n,i)=>{Promise.all([(0,a.getItemBase)(e,r),(0,a.getItemDataAsJson)(e,r)]).then((([n,i])=>{if((0,u.hasUnresolvedVariables)(n)||(0,u.hasUnresolvedVariables)(i)){const{item:s,data:o}=(0,u.replaceInTemplate)({item:n,data:i},t);return F(e,n.type,s,o),D(s,o,r)}return Promise.resolve({success:!0,id:e})})).then((e=>n(e))).catch((e=>i(e)))}))},t.updateItemURL=function(e,t,r){return H(e,t,r,3)}
18,t._addItemDataFile=P,t._addItemMetadataFile=k,t._countRelationships=function(e){return e.reduce(((e,t)=>e+(t.relationships?t.relationships.length:0)),0)},t._getCreateServiceOptions=x,t._getFallbackExtent=R,t._getRelationshipUpdates=U,t._getContingentValuesUpdates=M,t._getSubtypeUpdates=N,t._getUpdate=j,t._lowercaseDomain=$,t._reportVariablesInItem=F,t._setItemProperties=G,t._updateIndexesForRelationshipKeyFields=L,t._updateItemURL=H},721195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPortalDefaultBasemap=t._getItemResourcesTranche=t._getGroupContentsTranche=t._fixTextBlobType=t.getThumbnailFile=t.getSolutionsRelatedToAnItem=t.getPortalUrlFromAuth=t.getPortalSharingUrlFromAuth=t.getJson=t.getItemThumbnailUrl=t.getItemThumbnailAsFile=t.getItemThumbnail=t.getItemsRelatedToASolution=t.getItemResourcesFiles=t.getItemResources=t.getItemRelatedItemsInSameDirection=t.getItemRelatedItems=t.getItemMetadataBlobUrl=t.getItemMetadataBlob=t.getItemMetadataAsFile=t.getItemInfoFileUrlPrefix=t.getItemDataBlobUrl=t.getItemDataBlob=t.getItemDataAsJson=t.getItemDataAsFile=t.getItemBase=t.getGroupContents=t.getGroupCategorySchema=t.getGroupBase=t.getFilenameFromUrl=t.getEnterpriseServers=t.getBlobCheckForError=t.getBlobAsFile=t.getFoldersAndGroups=t.getUsername=t.getUser=t.getPortalUrls=t.getPortal=t.checkJsonForError=void 0;const n=r(923868),i=r(427342),s=r(886867),o=r(336418),a="PK��";function c(e){return e.getUser()}function u(e,t,r,i=[],s){return new Promise(((o,a)=>{l(e,r,i).then((e=>o(e?(0,n.blobToFile)(e,t,s):null)),a)}))}function l(e,t,r=[]){return new Promise(((i,o)=>{(0,s.getBlob)(e,t).then((e=>{v(e).then((e=>{"application/json"===e.type?(0,n.blobToJson)(e).then((t=>{if(t?.error){const e=t.error.code;void 0!==e&&r.indexOf(e)>=0?i(null):o(t)}else i(e)})):i(e)}),o)}),o)}))}function d(e,t){return new Promise((r=>{l(p(e,t),t,[400,500]).then((e=>r(v(e))),(()=>r(null)))}))}function p(e,t){return`${b(t)}/content/items/${e}/data`}function h(e,t){return`${b(t)}/content/items/${e}/info/`}function m(e,t){return new Promise(((r,n)=>{l(f(e,t),t,[400]).then(r,n)}))}function f(e,t){return h(e,t)+"metadata/metadata.xml"}function g(e,t,r,n,i=100){return new Promise((s=>{S({id:e,relationshipType:t,authentication:n,params:{direction:r,start:1,num:i}}).then((e=>{s(e)}))}))}function y(e,t,r,i){return(0,n.checkUrlPathTermination)(b(i))+(r?"community/groups/":"content/items/")+e+"/info/"+t}function b(e){return(0,n.getProp)(e,"portal")||"https://www.arcgis.com/sharing/rest"}function v(e){return new Promise(((t,r)=>{e&&e.size>0&&(e.type.startsWith("text/plain")||e.type.startsWith("application/json"))?(0,n.blobToText)(e).then((r=>{try{JSON.parse(r),t(new Blob([e],{type:"application/json"}))}catch(n){r.length>4&&r.substr(0,4)===a?t(new Blob([e],{type:"application/zip"})):r.startsWith("<")?t(new Blob([e],{type:"text/xml"})):t(e)}}),r):e?t(e):r()}))}function w(e,t,r){return new Promise(((n,s)=>{const o={paging:t,authentication:r};(0,i.getGroupContent)(e,o).then((i=>{if(i.num>0){const a=i.items.map((e=>e.id));i.nextStart>0?(o.paging.start=i.nextStart,w(e,t,r).then((e=>{n(a.concat(e))}),s)):n(a)}else n([])}),s)}))}function S(e){return new Promise((t=>{const r={total:0,relatedItems:[]};(0,i.getRelatedItems)(e).then((n=>{n.aggregations.total.count>0?(r.total=n.aggregations.total.count,r.relatedItems=n.relatedItems,n.nextkey?(e.params.start+=e.params.num,e.params.nextkey=n.nextkey,S(e).then((e=>{r.total+=e.total,r.relatedItems=r.relatedItems.concat(e.relatedItems),t(r)}))):t(r)):t(r)}),(()=>{t(r)}))}))}function E(e,t,r){return new Promise(((n,s)=>{const o=b(r),a=`${o}/content/items/${e}/resources`,c=[],l={params:{...t},authentication:r};(0,i.request)(a,l).then((i=>{i.num>0?(i.resources.forEach((t=>{const n=`${o}/content/items/${e}/resources/${t.resource}`;c.push(u(n,t.resource,r))})),i.nextStart>0?(t.start=i.nextStart,E(e,t,r).then((e=>{n(c.concat(e))}),s)):n(c)):n([])}),s)}))}t.checkJsonForError=function(e){return void 0!==e?.error},t.getPortal=function(e,t){const r={authentication:t};return(0,i.restGetPortal)(e,r)},t.getPortalUrls=function(e){return new Promise((t=>{const r={httpMethod:"GET",authentication:e,rawResponse:!1},n=`${e.portal}/portals/self/urls`;(0,i.request)(n,r).then((e=>{t(e)}),(()=>t({})))}))},t.getUser=c,t.getUsername=function(e){return new Promise(((t,r)=>{c(e).then((e=>t(e.username)),r)}))},t.getFoldersAndGroups=function(e){return new Promise(((t,r)=>{const n={httpMethod:"GET",authentication:e,rawResponse:!1},s=`${e.portal}/content/users/${encodeURIComponent(e.username)}`,o=`${e.portal}/community/users/${encodeURIComponent(e.username)}`;Promise.all([(0,i.request)(s,n),(0,i.request)(o,n)]).then((e=>{t({folders:e[0].folders||[],groups:e[1].groups||[]})}),(e=>r(e)))}))},t.getBlobAsFile=u,t.getBlobCheckForError=l,t.getEnterpriseServers=async function(e,t){const r=`${e}/portals/self/servers`;return(await(0,i.request)(r,{authentication:t,httpMethod:"GET",params:{f:"json"}})).servers},t.getFilenameFromUrl=function(e){if(!e)return"";let t=e.indexOf("?");t<0&&(t=e.length);const r=e.lastIndexOf("/",t)+1;return r<t?e.substring(r,t):""},t.getGroupBase=function(e,t){const r={authentication:t};return(0,i.getGroup)(e,r)},t.getGroupCategorySchema=function(e,t){const r={authentication:t};return(0,i.restGetGroupCategorySchema)(e,r)},t.getGroupContents=function(e,t){return new Promise(((r,n)=>{w(e,{start:1,num:100},t).then((e=>{r(e)}),n)}))},t.getItemBase=function(e,t){const r={authentication:t};return(0,i.getItem)(e,r)},t.getItemDataAsFile=function(e,t,r){return new Promise((i=>{d(e,r).then((e=>i((0,n.blobToFile)(e,t))),(()=>i(null)))}))},t.getItemDataAsJson=function(e,t){return new Promise((r=>{d(e,t).then((e=>r((0,n.blobToJson)(e))),(()=>r(null)))}))},t.getItemDataBlob=d,t.getItemDataBlobUrl=p,t.getItemInfoFileUrlPrefix=h,t.getItemMetadataAsFile=function(e,t){return new Promise((r=>{m(e,t).then((e=>{!e||e&&e.type.startsWith("application/json")?r(null):r((0,n.blobToFile)(e,"metadata.xml"))}),(()=>r(null)))}))},t.getItemMetadataBlob=m,t.getItemMetadataBlobUrl=f,t.getItemRelatedItems=g,t.getItemRelatedItemsInSameDirection=function(e,t,r){return new Promise((n=>{const i=["APIKey2Item","Area2CustomPackage","Area2Package","Item2Attachment","Item2Report","Listed2Provisioned","Map2AppConfig","Map2Area","Map2FeatureCollection","Map2Service","MobileApp2Code","Service2Data","Service2Layer","Service2Route","Service2Service","Service2Style","Solution2Item","Style2Style","Survey2Data","Survey2Service","SurveyAddIn2Data","Theme2Story","TrackView2Map","WebStyle2DesktopStyle","WMA2Code","WorkforceMap2FeatureService"],s=i.map((n=>g(e,n,t,r)));Promise.all(s).then((e=>{const t=[];for(let r=0;r<i.length;++r)e[r].total>0&&t.push({relationshipType:i[r],relatedItemIds:e[r].relatedItems.map((e=>e.id))});n(t)}))}))},t.getItemResources=function(e,t){return new Promise((r=>{const n={authentication:t};(0,i.restGetItemResources)(e,n).then(r,(()=>{r({total:0,start:1,num:0,nextStart:-1,resources:[]})}))}))},t.getItemResourcesFiles=function(e,t){return new Promise(((r,n)=>{E(e,{start:1,num:100},t).then((e=>{Promise.all(e).then(r,n)}),n)}))},t.getItemsRelatedToASolution=function(e,t){return g(e,"Solution2Item","forward",t).then((e=>e.relatedItems))},t.getItemThumbnail=function(e,t,r,n){return new Promise(((i,s)=>{t?l(y(e,t,r,n),n,[500]).then((e=>i(v(e))),s):i(null)}))},t.getItemThumbnailAsFile=function(e,t,r,n){return new Promise(((i,s)=>{if(!t)return void i(null);const o=y(e,t,r,n),a=t.lastIndexOf("/")+1;u(o,t.substring(a),n,[400,500]).then(i,s)}))},t.getItemThumbnailUrl=y,t.getJson=function(e,t){return(0,s.getBlob)(e,t,{httpMethod:"GET"}).then((e=>v(e))).then((e=>"application/json"===e.type?(0,n.blobToJson)(e):Promise.resolve(null)))},t.getPortalSharingUrlFromAuth=b,t.getPortalUrlFromAuth=function(e){return b(e).replace("/sharing/rest","")},t.getSolutionsRelatedToAnItem=function(e,t){return g(e,"Solution2Item","reverse",t).then((e=>e.relatedItems.map((e=>e.id))))},t.getThumbnailFile=function(e,t,r){return new Promise((n=>{u(e,t,r,[500]).then(n,(()=>n(null)))}))},t._fixTextBlobType=v,t._getGroupContentsTranche=w,t._getItemResourcesTranche=E,t.getPortalDefaultBasemap=function(e,t,r){return(0,o.searchGroups)(e,r,{num:1}).then((({results:[e]})=>{if(!e)throw new Error("No basemap group found");return(0,o.searchGroupContents)(e.id,`title:${t}`,r,{num:1})})).then((({results:[e]})=>{if(!e)throw new Error("No basemap found");return e}))}},320655:(e,t,r)=>{"use strict";
18Object.defineProperty(t,"__esModule",{value:!0}),r(963333).__exportStar(r(914735),t)},914735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareItemToGroups=void 0;const n=r(427342);t.shareItemToGroups=function(e,t,r,i){return Promise.all(e.map((e=>{const s={id:t,groupId:e,authentication:r};return i&&(s.owner=i),(0,n.shareItemWithGroup)(s)})))}},998080:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.templatizeIds=t.templatizeFieldReferences=t.templatizeToLowerCase=t.templatizeTerm=t.replaceTemplate=t.replaceInTemplate=t.removeTemplate=t.getDefaultExtent=t.getIdsInTemplatesList=t.hasUnresolvedVariables=t.findTemplateInList=t.findTemplateIndexInList=t.extractSolutionVersion=t.createPlaceholderTemplate=t.createInitializedItemTemplate=t.createInitializedGroupTemplate=t.placeholder=t.TRANSFORMS=t.PRINT_SERVER_NAME=t.NA_SERVER_NAME=t.GEOCODE_SERVER_NAME=t.GEOMETRY_SERVER_NAME=t.SERVER_NAME=void 0;const n=r(514215),i=r(923868);function s(e,t=""){return{itemId:e,type:t,key:(0,i.createShortId)(),item:{id:e,type:t},data:{},resources:[],dependencies:[],groups:[],properties:{},estimatedDeploymentCostFactor:2}}function o(e,t){const r=t;return e.findIndex((e=>r===e.itemId))}function a(e){const t=e.extent;return null===t||Array.isArray(t)&&0===t.length?t:"{{solutionItemExtent}}"}function c(e,t,r=""){if(!e)return e;const n=new RegExp(t,"g");return e.replace(n,"{{"+t+r+"}}")}function u(e,t){return t.startsWith("{{")?t:String(c(e,e,"."+String(t).toLowerCase()))}t.SERVER_NAME="portalBaseUrl",t.GEOMETRY_SERVER_NAME="organization.helperServices.geometry.url",t.GEOCODE_SERVER_NAME="organization.helperServices.geocode:getDefaultLocatorURL",t.NA_SERVER_NAME="organization.helperServices.route.url",t.PRINT_SERVER_NAME="organization.helperServices.printTask.url",t.TRANSFORMS={getDefaultLocatorURL:(e,r)=>r?r[0].url:`{{${t.GEOCODE_SERVER_NAME}}}`},t.placeholder=function(e){return"{{"+e+"}}"},t.createInitializedGroupTemplate=function(e){const t=s(e.id,e.type);return t.item={...t.item,description:e.description,snippet:e.snippet,tags:e.tags,typeKeywords:e.typeKeywords,title:e.title,thumbnail:e.thumbnail},t},t.createInitializedItemTemplate=function(e){const t=s(e.id,e.type);return t.item={...t.item,accessInformation:e.accessInformation,categories:e.categories,contentStatus:e.contentStatus,created:e.created,culture:e.culture,description:e.description,extent:a(e),licenseInfo:e.licenseInfo,modified:e.modified,name:e.name,origUrl:e.origUrl,properties:e.properties,snippet:e.snippet,spatialReference:void 0,tags:e.tags,thumbnail:e.thumbnail,title:e.title,typeKeywords:e.typeKeywords,url:e.url},t},t.createPlaceholderTemplate=s,t.extractSolutionVersion=function(e){let t=(0,i.getProp)(e,"metadata.version");return t?"string"==typeof t?(t=parseInt(e.metadata.version,10),isNaN(t)?0:t):t:0},t.findTemplateIndexInList=o,t.findTemplateInList=function(e,t){const r=o(e,t);return r>=0?e[r]:null},t.hasUnresolvedVariables=function(e){return(t=e,t&&JSON.stringify(t).match(/{{.+?}}/gim)||[]).length>0;var t},t.getIdsInTemplatesList=function(e){return e.map((e=>e.itemId))},t.getDefaultExtent=a,t.removeTemplate=function(e,t){const r=o(e,t);r>=0&&e.splice(r,1)},t.replaceInTemplate=function(e,r){return(0,n.adlib)(e,r,t.TRANSFORMS)},t.replaceTemplate=function(e,t,r){const n=o(e,t);return n>=0&&(e[n]=r,!0)},t.templatizeTerm=c,t.templatizeToLowerCase=u,t.templatizeFieldReferences=function(e,t,r,n=!1){let i=JSON.stringify(e);return t.forEach((e=>{let t="\\b"+e.name+"\\b(?![.])(?![}]{2})";n||(t+='(?!":)'),i=i.replace(new RegExp(t,"g"),u(r,e.name+".name"))})),JSON.parse(i)},t.templatizeIds=function(e){let t=JSON.stringify(e);const r=/[0-9A-F]{32}/gim;return e&&r.test(t)&&((0,i.uniqueStringList)(t.match(r)).forEach((e=>{const r=new RegExp(e,"gm");t=t.replace(r,"{{"+e+".itemId}}")})),e=JSON.parse(t)),e}},906837:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTrackingOptions=t.templatizeServiceItemId=t._setName=t.templatizeTracker=t.isTrackingViewGroup=t.isTrackingViewTemplate=t.getTackingServiceOwner=t._validateTrackingTemplates=t.setLocationTrackingEnabled=void 0;const n=r(923868),i=r(721195),s=r(998080);function o(e,t){if(!t.locationTrackingEnabled&&e.some((e=>((0,n.getProp)(e,"item.typeKeywords")||[]).indexOf("Location Tracking View")>-1)))throw console.error("Location tracking not enabled or user is not admin."),new Error("Location tracking not enabled or user is not admin.")}function a(e,t){const r=(0,n.getProp)(e,"item.typeKeywords")||(0,n.getProp)(t,"typeKeywords"),i=(0,n.getProp)(e,"item.properties.trackViewGroup")||(0,n.getProp)(t,"properties.trackViewGroup");return!!(r&&r.indexOf("Location Tracking View")>-1&&i)}function c(e,t,r,i){const s=(0,n.getProp)(e,t);s&&(0,n.setProp)(e,t,s.replace(r,i))}function u(e,t){const r=(0,n.getProp)(e,t);r&&(0,n.setProp)(e,t,(0,s.templatizeTerm)(r,r,".itemId"))}t.setLocationTrackingEnabled=function(e,t,r,i){const s=(0,n.getProp)(e,"helperServices.locationTracking");s&&(r.locationTracking=s),r.locationTrackingEnabled=!(!r.locationTracking||"org_admin"!==(0,n.getProp)(t,"role")),i&&o(i,r)},t._validateTrackingTemplates=o,t.getTackingServiceOwner=function(e,t){if(e.locationTrackingEnabled){const r=e.locationTracking.id;return(0,i.getItemBase)(r,t).then((r=>(e.locationTracking.owner=r.owner,e[r.id]={itemId:r.id},Promise.resolve(r&&r.owner===t.username))),(()=>Promise.resolve(!1)))}return Promise.resolve(!1)},t.isTrackingViewTemplate=a,t.isTrackingViewGroup=function(e){const t=(0,n.getProp)(e,"item.tags");return!!(t&&t.indexOf("Location Tracking Group")>-1)},t.templatizeTracker=function(e){if(a(e)){const t=(0,n.getProp)(e,"item.properties.trackViewGroup");e.groups.push(t),e.dependencies.push(t);const r=(0,s.templatizeTerm)(t,t,".itemId");(0,n.setProp)(e,"item.properties.trackViewGroup",r),c(e,"item.name",t,r),c(e,"properties.service.adminServiceInfo.name",t,r),(e.properties.layers||[]).concat(e.properties.tables||[]).forEac
18h((e=>{u(e,"adminLayerInfo.viewLayerDefinition.sourceServiceItemId")}))}},t._setName=c,t.templatizeServiceItemId=u,t.setTrackingOptions=function(e,t,r){return a(e)&&((0,n.setCreateProp)(t,"owner",r.locationTracking.owner),(0,n.setCreateProp)(t.item,"name",e.item.name),(0,n.setCreateProp)(t.item,"isView",!0),(0,n.setCreateProp)(t.item,"owner",r.locationTracking.owner),(0,n.setCreateProp)(t.params,"isView",!0),(0,n.setCreateProp)(t.params,"outputType","locationTrackingService"),delete t.folderId),t.item}},968210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._replaceVelocityUrls=t.updateVelocityReferences=t.getVelocityInfo=t.getVelocityUrlBase=t.PROP_NAMES=t.BASE_NAMES=void 0;const n=r(955929),i=r(923868);function s(e){return(0,n.getSubscriptionInfo)({authentication:e}).then((e=>{let t="",r=!1;const n=(0,i.getProp)(e,"orgCapabilities");return Array.isArray(n)&&n.some((e=>(r="velocity"===e.id||r,r&&"active"===e.status&&e.velocityUrl&&(t=e.velocityUrl),t))),Promise.resolve({velocityUrl:t,hasVelocity:r})}))}function o(e,t){let r=JSON.stringify(e);if(r.indexOf(t)>-1){r=r.replace(new RegExp(`${t}`,"gi"),"{{velocityUrl}}");const e=new RegExp("{{velocityUrl}}.+?(?=/[A-Za-z]+Server)","gi"),n=r.match(e);return n&&n.filter(((e,t,r)=>r.indexOf(e)===t)).forEach((e=>{r=r.replaceAll(e,`${e}_{{solutionItemId}}`)})),JSON.parse(r)}return e}t.BASE_NAMES=["feat-lyr-new","feat-lyr-existing","stream-lyr-new"],t.PROP_NAMES=[".portal.mapServicePortalItemID",".portal.featureServicePortalItemID",".portal.streamServicePortalItemID",".portalItemId"],t.getVelocityUrlBase=function(e,t){return t.hasOwnProperty("velocityUrl")?Promise.resolve(t.velocityUrl):s(e).then((e=>(t.velocityUrl=e.velocityUrl,Promise.resolve(e.velocityUrl))))},t.getVelocityInfo=s,t.updateVelocityReferences=function(e,t,r){const n=r.velocityUrl;return e&&"Web Map"===t&&n&&(e.operationalLayers||[]).concat(e.tables||[]).forEach((e=>{e.url&&e.url.indexOf(n)>-1&&e.itemId&&delete e.itemId})),n&&e?o(e,n):e},t._replaceVelocityUrls=o},900154:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._updateDependencies=t._globalTemplatize=t.postProcessWebToolReferences=t.preProcessWebTool=void 0;const n=r(923868);function i(e,t,r,i){return e.forEach((e=>{const o=JSON.stringify(e.item),a=JSON.stringify(e.data);(0,n.globalStringReplace)(e.item,new RegExp(t,"gi"),r),(0,n.globalStringReplace)(e.data,new RegExp(t,"gi"),r),s(e,o,a,i)})),e}function s(e,t,r,n){const i=e.dependencies.indexOf(n)>-1;t&&t!==JSON.stringify(e.item)&&!i&&e.dependencies.push(n),r&&r!==JSON.stringify(e.data)&&!i&&e.dependencies.push(n)}t.preProcessWebTool=function(e,t){if("Geoprocessing Service"===e.type){const r=e.item.origUrl,n=`{{${e.itemId}.url}}`;t[r]=n}},t.postProcessWebToolReferences=function(e,t){const r=Object.keys(t).filter((e=>e.indexOf("GPServer")>-1));return r.length>0&&r.forEach((r=>{const n=t[r].replace("{{","").replace(".url}}","");i(e,r,t[r],n);const s=r.replace(/[0-9A-F]{32}/gim,`{{${n}.itemId}}`);i(e,s,t[r],n)})),e},t._globalTemplatize=i,t._updateDependencies=s},115632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkflowDependencies=t.updateWorkflowTemplateIds=t.storeKeyWorkflowServiceId=t.preprocessWorkflowTemplates=t.getWorkflowEnterpriseServerRootURL=t.getWorkflowBaseURL=t.getWorkflowManagerAuthorized=t.extractWorkflowFromZipFile=t.deleteWorkflowItem=t.compressWorkflowIntoZipFile=void 0;const n=r(963333),i=n.__importStar(r(721195)),s=n.__importStar(r(340391)),o=r(427342),a=r(336418),c=r(721195),u=r(541843),l=r(923868),d=n.__importDefault(r(745594));async function p(e,t){const r=(await(0,c.getEnterpriseServers)(e,t)).find((e=>"WorkflowManager"===e.serverFunction));return r?r.url:""}function h(e,t,r,n){const i=(0,l.getProp)(r,`data.${e}.itemId`).replace("{{","").replace(".itemId}}","");i&&n.indexOf(i)<0&&n.push(i),t.workflows[r.itemId][e]=i,t[i]={}}t.compressWorkflowIntoZipFile=async function(e){const t=new d.default;Object.keys(e).forEach((r=>{t.file(r,e[r])}));const r=(0,u.createMimeTypedFile)({blob:await t.generateAsync({type:"blob"}),filename:"workflow_configuration.zip",mimeType:"application/zip"});return Promise.resolve(r)},t.deleteWorkflowItem=async function(e,t,r){const n=await(0,c.getItemDataAsJson)(e,r),i=n?.groupId,s=`${t}/admin/${e}`,u={authentication:r,headers:{Accept:"application/json",Authorization:`Bearer ${r.token}`,"X-Esri-Authorization":`Bearer ${r.token}`},httpMethod:"DELETE",params:{f:"json"}},l=await(0,o.request)(s,u);return i&&await(0,a.removeGroup)(i,r),Promise.resolve(l.success)},t.extractWorkflowFromZipFile=async function(e){const t=await s.getZipObjectC
18ontents(await s.blobToZipObject(e)),r={};return t.forEach((e=>{r[e.file]=e.content})),Promise.resolve(r)},t.getWorkflowManagerAuthorized=async function(e,t){try{const r=`${e}/checkStatus`,n={authentication:t,httpMethod:"GET",params:{f:"json"}},i=await(0,o.request)(r,n),s=i?.hasAdvancedLicense||!1;return Promise.resolve(s)}catch(e){return Promise.resolve(!1)}},t.getWorkflowBaseURL=async function(e,t,r){let n;if(!t){const n=await i.getUser(e);r=r??n.orgId,t=await i.getPortal("",e)}const s=`https://${t.portalHostname}`,o=`${s}/sharing/rest`;return n=t.isPortal?await p(o,e):t.helperServices?.workflowManager?.url??s,Promise.resolve(r?`${n}/${r}`:`${n}/workflow`)},t.getWorkflowEnterpriseServerRootURL=p,t.preprocessWorkflowTemplates=function(e,t){const r=e.filter((e=>"Workflow"===e.type)).reduce(((e,r)=>(t.workflows={...t.workflows},t.workflows[r.itemId]={},h("viewSchema",t,r,e),h("workflowLocations",t,r,e),h("workflowSchema",t,r,e),e)),[]),n=[];return{deployTemplates:e.filter((e=>{if(r.indexOf(e.itemId)<0)return!0;n.push(e)})),workflowManagedTemplates:n}},t.storeKeyWorkflowServiceId=h,t.updateWorkflowTemplateIds=function(e,t){return t.workflows&&Object.keys(t.workflows).forEach((r=>{const n=t.workflows[r],i=[n.viewSchema,n.workflowLocations,n.workflowSchema];e=e.map((e=>(i.indexOf(e.itemId)>-1&&(e.dependencies=e.dependencies.map((e=>(i.indexOf(e)>-1&&(e=t[e].itemId),e))),e.itemId=t[e.itemId].itemId),e)))})),e},t.getWorkflowDependencies=function(e){const t=e.data;t&&["viewSchema","workflowLocations","workflowSchema"].forEach((r=>{if(Object.keys(t).indexOf(r)>-1){const n=t[r].itemId;n&&e.dependencies.indexOf(n)<0&&e.dependencies.push(n)}}))}},715046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._applyEdits=t._updateDispatchers=t._getField=t._getAddFeatures=t._updateUrl=t._getFields=t.fineTuneCreatedWorkforceItem=t._getURLs=t.urlTest=t.getKeyWorkforceProperties=t.isWorkforceProject=t._templatizeWorkforceDispatcherOrWorker=t._templatizeWorkforceProject=t.postProcessWorkforceTemplates=t.getReplaceValue=t.getLayerId=t._templatizeUrlTemplate=t.getUrlDependencies=t._getAssignmentIntegrationInfos=t._getAssignmentTypeInfos=t._updateGlobalIdAndAssignmentType=t.getWorkforceServiceInfo=t.getWorkforceDependencies=t.templatizeWorkforce=t.extractWorkforceDependencies=t.convertWorkforceItemToTemplate=void 0;const n=r(427342),i=r(923868),s=r(998080),o=r(921298);function a(e,t,r){return new Promise(((n,s)=>{const o=[];if(t.forEach((t=>{const r=(0,i.getProp)(e,t+".serviceItemId"),n=(0,i.getProp)(e,t);r?-1===o.indexOf(r)&&o.push(r):(0,i.idTest)(n,o)})),(0,i.getProp)(e,"assignmentIntegrations")){let t=[],a=[];e.assignmentIntegrations.forEach((e=>{e.assignmentTypes&&Object.keys(e.assignmentTypes).forEach((n=>{const s=e.assignmentTypes[n].urlTemplate;(0,i.idTest)(s,o);const c=w(s,r);Array.isArray(c.requests)&&c.requests.length>0&&(t=t.concat(c.requests),a=a.concat(c.urls))}))})),t.length>0?Promise.all(t).then((e=>{const t={};Array.isArray(e)&&e.forEach(((e,r)=>{e.serviceItemId&&(t[a[r]]=e.serviceItemId,-1===o.indexOf(e.serviceItemId)&&o.push(e.serviceItemId))})),n({dependencies:o,urlHash:t})}),(e=>s((0,i.fail)(e)))):n({dependencies:o,urlHash:{}})}else n({dependencies:o,urlHash:{}})}))}function c(e,t,r,n){return t.forEach((t=>{if((0,i.getProp)(e,t))if((0,i.getProp)(e[t],"serviceItemId")){const r=e[t].serviceItemId;let a=".itemId";if((0,i.getProp)(e[t],"url")){const i=m(e[t].url);(0,o.cacheLayerInfo)(i,r,e[t].url,n),e[t].url=(0,s.templatizeTerm)(r,r,f(i,".url")),a=f(i,a)}e[t].serviceItemId=(0,s.templatizeTerm)(r,r,a)}else e[t]=(0,s.templatizeTerm)(e[t],e[t],".itemId")})),e.folderId="{{folderId}}",(e.assignmentIntegrations||[]).forEach((e=>{h(e,r),e.assignmentTypes&&Object.keys(e.assignmentTypes).forEach((t=>{h(e.assignmentTypes[t],r)}))})),e}function u(e){const t=e=>(e.GlobalID&&(e.GlobalID=`{${e.GlobalID}}`),e.assignmenttype&&(e.assignmenttype=`{${e.assignmenttype}}`),e),r=(0,i.getProp)(e,"assignmentIntegrationInfos");r&&Array.isArray(r)&&(0,i.setProp)(e,"assignmentIntegrationInfos",r.map(t));const n=(0,i.getProp)(e,"assignmentTypeInfos");n&&Array.isArray(n)&&(0,i.setProp)(e,"assignmentTypeInfos",n.map(t))}function l(e){const t=[],r=["description",e.globalIdFieldName];
18return e.features.forEach((e=>{const n={};r.forEach((t=>{n[t]=e.attributes[t]})),t.push(n)})),t}function d(e,t){return new Promise(((r,n)=>{let s=[],o=[];const a=[],c=["appid",e.globalIdFieldName,"prompt","urltemplate","assignmenttype"];e.features.forEach((e=>{const r={};c.forEach((n=>{if(r[n]=e.attributes[n],"urltemplate"===n){const a=e.attributes[n],c=(0,i.getIDs)(a);r.dependencies=c;const u=w(a,t);Array.isArray(u.requests)&&u.requests.length>0&&(s=s.concat(u.requests),o=o.concat(u.urls))}})),a.push(r)})),p(s,o).then((e=>{a.forEach((t=>{h(t,e.urlHash)})),r(a)}),(e=>n((0,i.fail)(e))))}))}function p(e,t){return new Promise(((r,n)=>{const s=[];e.length>0?Promise.all(e).then((e=>{const n={};Array.isArray(e)&&e.forEach(((e,r)=>{e.serviceItemId&&(n[t[r]]=e.serviceItemId,-1===s.indexOf(e.serviceItemId)&&s.push(e.serviceItemId))})),r({dependencies:s,urlHash:n})}),(e=>n((0,i.fail)(e)))):r({dependencies:s,urlHash:{}})}))}function h(e,t){const r=(0,i.getProp)(e,"urlTemplate")?"urlTemplate":"urltemplate";let n=(0,i.getProp)(e,r);n&&((0,i.getIDs)(n).forEach((e=>{n=n.replace(e,(0,s.templatizeTerm)(e,e,".itemId"))})),S(n).forEach((r=>{const i=f(m(r),".url"),o=t[r];Array.isArray(e.dependencies)&&e.dependencies.indexOf(o)<0&&e.dependencies.push(o),n=n.replace(r,(0,s.templatizeTerm)(o,o,i))})),(0,i.setProp)(e,r,n))}function m(e){return e.indexOf("FeatureServer/")>-1?e.substr(e.lastIndexOf("/")+1):void 0}function f(e,t){return isNaN(Number.parseInt(e,10))?`${t}`:`.layer${e}${t}`}function g(e,t){if(b(e)){const r=e.item.properties||{},n=v(2),o=r.workforceProjectGroupId,a=[];Object.keys(r).forEach((t=>{if(n.indexOf(t)>-1){const n=r[t];n!==o&&a.push(n),e.item.properties[t]=(0,s.templatizeTerm)(r[t],r[t],".itemId")}})),e.dependencies=e.dependencies.filter((e=>e!==o&&a.indexOf(e)<0));const c=(0,i.getProp)(e,"properties.workforceInfos");c&&Object.keys(c).forEach((t=>{c[t].forEach((t=>{t.dependencies&&(t.dependencies.forEach((t=>{a.indexOf(t)<0&&a.push(t);const r=e.dependencies.indexOf(t);r>-1&&e.dependencies.splice(r,1)})),delete t.dependencies)}))})),t[o]=a}return e}function y(e,t){if((e.item.typeKeywords||[]).indexOf(t)>-1){const t=(e.item.properties||{}).workforceFeatureServiceId;t&&(e.item.properties.workforceFeatureServiceId=(0,s.templatizeTerm)(t,t,".itemId"))}return e}function b(e){return(e.item.typeKeywords||[]).indexOf("Workforce Project")>-1}function v(e){return 1===e?["groupId","workerWebMapId","dispatcherWebMapId","dispatchers","assignments","workers","tracks"]:["workforceDispatcherMapId","workforceProjectGroupId","workforceWorkerMapId"]}function w(e,t){const r=S(e),i=[];return r.forEach((e=>{const r={f:"json",authentication:t};i.push((0,n.request)(e,r))})),{requests:i,urls:r}}function S(e){return(0,i.regExTest)(e,/=(http.*?FeatureServer.*?(?=&|$))/gi).map((e=>e.replace("=","")))}function E(e,t,r){return new Promise(((s,o)=>{const a={f:"json",fields:"*",authentication:r};e=T(e);const c=[];t.forEach((t=>{c.push((0,n.request)(`${e}${t}`,a))})),Promise.all(c).then((t=>{const r={};t.forEach((t=>{r[`${e}${t.id}`]=t.fields.map((e=>e.name))})),s(r)}),(e=>o((0,i.fail)(e))))}))}function T(e){return e+(e.endsWith("/")?"":"/")}function I(e,t){const r=[];return e.forEach((e=>{const n={};Object.keys(e).forEach((r=>{const i=C(r,t);n[i]=e[r]})),r.push({attributes:n})})),r}function C(e,t){return t.filter((t=>t.toLowerCase()===e.toLowerCase()))[0]}function A(e,t,r,s,o){return new Promise(((a,c)=>{if(e){const u=o?"userid":"userId";(0,n.queryFeatures)({url:e,where:`${u} = '${t}'`,authentication:s}).then((n=>{if(n&&n.features)if(0===n.features.length){const n=[{attributes:{name:r}}];n[0].attributes[u]=t,O(e,n,s).then(a,c)}else a(!0);else a(!1)}),(e=>c((0,i.fail)(e))))}else a(!1)}))}function O(e,t,r,s=!1){return new Promise(((o,a)=>{t.length>0?(0,n.applyEdits)({url:e,adds:t,useGlobalIds:s,authentication:r}).then((e=>{e&&e.addResults?o(!0):a((0,i.fail)({success:!1,message:"Failed to add dispatch record."}))}),(e=>a((0,i.fail)({success:!1,message:"Failed to add dispatch record.",error:e})))):o(!0)}))}t.convertWorkforceItemToTemplate=function(e,t,r){return new Promise(((n,s)=>{const o=v(1),u=e.data;u?a(u,o,t).then((t=>{e.dependencies=t.dependencies,e.data=c(u,o,t.urlHash,r),n(e)}),(e=>s((0,i.fail)(e)))):n(e)}))},t.extractWorkforceDependencies=a,t.templatizeWorkforce=c,t.getWorkforceDependencies=function(e,t){const r=e.item.properties||{},n=v(2);t=n.reduce((function(e,n){return r[n]&&t.indexOf(r[n])<0&&e.push(r[n]),e}),t);const s=(0,i.getProp)(e,"properties.workforceInfos.assignmentIntegrationInfos");return s&&s.length>
180&&s.forEach((e=>{Object.keys(e).indexOf("dependencies")>-1&&e.dependencies.forEach((e=>{t.indexOf(e)<0&&t.push(e)}))})),t.map((e=>({id:e,name:""})))},t.getWorkforceServiceInfo=function(e,t,r){return new Promise(((s,o)=>{t=T(t=t.replace("/rest/admin/services","/rest/services"));const a=[(0,n.queryFeatures)({url:`${t}3`,where:"1=1",authentication:r}),(0,n.queryFeatures)({url:`${t}4`,where:"1=1",authentication:r})];Promise.all(a).then((t=>{const[n,a]=t;e.workforceInfos={assignmentTypeInfos:l(n)},d(a,r).then((t=>{e.workforceInfos.assignmentIntegrationInfos=t,u(e.workforceInfos),s(e)}),(e=>o((0,i.fail)(e))))}),(e=>o((0,i.fail)(e))))}))},t._updateGlobalIdAndAssignmentType=u,t._getAssignmentTypeInfos=l,t._getAssignmentIntegrationInfos=d,t.getUrlDependencies=p,t._templatizeUrlTemplate=h,t.getLayerId=m,t.getReplaceValue=f,t.postProcessWorkforceTemplates=function(e){const t={};return e.map((e=>(e=y(e=g(e,t),"Workforce Dispatcher"),y(e,"Workforce Worker")))).map((e=>(t[e.itemId]&&(e.dependencies=e.dependencies.concat(t[e.itemId])),e)))},t._templatizeWorkforceProject=g,t._templatizeWorkforceDispatcherOrWorker=y,t.isWorkforceProject=b,t.getKeyWorkforceProperties=v,t.urlTest=w,t._getURLs=S,t.fineTuneCreatedWorkforceItem=function(e,t,r,n){return new Promise(((o,a)=>{t.getUser().then((c=>{r=T(r);const u=(0,i.getProp)(e,"data.dispatchers");A(u&&u.url?u.url:`${r}2`,c.username||"",c.fullName||"",t,n.isPortal).then((c=>{let u=(0,i.getProp)(e,"properties.workforceInfos");u&&r?(u=(0,s.replaceInTemplate)(u,n),E(r,[2,3,4],t).then((e=>{const n=`${r}3`,i=O(n,I(u.assignmentTypeInfos,e[n]),t,!0),s=`${r}4`,c=O(s,I(u.assignmentIntegrationInfos,e[s]),t,!0);Promise.all([i,c]).then(o,a)}),(e=>a((0,i.fail)(e))))):o({success:c})}),(e=>a((0,i.fail)(e))))}),(e=>a((0,i.fail)(e))))}))},t._getFields=E,t._updateUrl=T,t._getAddFeatures=I,t._getField=C,t._updateDispatchers=A,t._applyEdits=O},340391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipObjectToZipFile=t.modifyFilesinZipObject=t.jsonToZipFile=t.jsonToZipObject=t.jsonFilesToZipObject=t.getZipObjectContents=t.fetchZipObject=t.blobToZipObject=void 0;const n=r(963333).__importDefault(r(745594)),i=r(541843),s=r(886867);async function o(e){return(new n.default).loadAsync(e)}async function a(e,t=[],r=["png","jpeg","jpg","gif","svg","xls","xlsx"]){const n=[],i=[];return e.forEach(((e,s)=>{(async()=>{if(0===t.length||t.includes(e)){const t=r.includes(e.split(".").pop())?"blob":"string",o=s.async(t);i.push(o),n.push({file:e,content:await o})}})()})),await Promise.all(i),n.sort(((e,t)=>e.file.localeCompare(t.file)))}function c(e,t){const r=new n.default;return r.file(e,JSON.stringify(t)),r}async function u(e,t){const r=t.endsWith(".zip")?t:`${t}.zip`;return(0,i.createMimeTypedFile)({blob:await e.generateAsync({type:"blob"}),filename:r,mimeType:"application/zip"})}t.blobToZipObject=o,t.fetchZipObject=async function(e,t){return o(await(0,s.getBlob)(e,t))},t.getZipObjectContents=a,t.jsonFilesToZipObject=function(e){const t=new n.default;return Object.keys(e).forEach((r=>{t.file(r,e[r])})),t},t.jsonToZipObject=c,t.jsonToZipFile=async function(e,t,r){return u(c(e,t),r)},t.modifyFilesinZipObject=async function(e,t,r=[]){return(await a(t,r)).forEac
18h((r=>{const n=e(r);t.file(r.file,n)})),Promise.resolve(t)},t.zipObjectToZipFile=u},422985:(e,t,r)=>{"use strict";r.d(t,{M7:()=>p,Mq:()=>m,me:()=>d});var n=r(170209),i=r(738583),s=r(625873),o=r(551753),a=r(213256),c=r(130527),u=r(676432),l=r(417503);const d="/apps/sites",p="home",h={qaext:["da45c26e67764c79840928cd8d05561a"],devext:[],production:["e3db35f7de63451f8243415445694761"],enterprise:[],"enterprise-k8s":[]};class m{constructor(e){this._portalUrl="https://www.arcgis.com",this._featureFlags={},this._userResourceTokens=[],this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,this._serviceStatus=e.serviceStatus,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties),e.trustedOrgIds&&(this._trustedOrgIds=e.trustedOrgIds),e.trustedOrgs&&(this._trustedOrgs=e.trustedOrgs),this._featureFlags=e.featureFlags||{},this._userResourceTokens=e.userResourceTokens||[],this._userHubSettings=e.userHubSettings||{schemaVersion:1}}get session(){return this._authentication}get isAuthenticated(){return!!this._authentication}get featureFlags(){return this._featureFlags}get isAlphaOrg(){var e,t;let r=!1;const n=(null===(e=this._properties)||void 0===e?void 0:e.alphaOrgs)||[],i=null===(t=this._portalSelf)||void 0===t?void 0:t.id;return n.length&&i&&(r=n.includes(i)),r}get isBetaOrg(){var e,t;let r=!1;const n=(null===(e=this._properties)||void 0===e?void 0:e.betaOrgs)||[],i=null===(t=this._portalSelf)||void 0===t?void 0:t.id;return n.length&&i&&(r=n.includes(i)),r}get environment(){return(0,a.G)(this._portalUrl)}get userRequestOptions(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}}get requestOptions(){let e={portal:this.sharingApiUrl};return this.isAuthenticated&&(e={authentication:this._authentication,portal:this.sharingApiUrl}),e}get hubRequestOptions(){return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl,portal:this.sharingApiUrl}}get portalUrl(){return this.isAuthenticated?this.isPortal||!this._portalSelf.urlKey?`https://${this._portalSelf.portalHostname}`:`https://${this._portalSelf.urlKey}.${this._portalSelf.customBaseUrl}`:this._portalUrl}get hubHomeUrl(){if(this.isPortal)return`${this.portalUrl}${d}/#/${p}`;if(this.isAuthenticated){const e=this._hubUrl.replace("https://","");return`https://${this._portalSelf.urlKey}.${e}`}return this._hubUrl}get hubLicense(){return this.isPortal?"enterprise-sites":this.hubEnabled?"hub-premium":"hub-basic"}get serviceStatus(){return this._serviceStatus}get sharingApiUrl(){return`${this.portalUrl}/sharing/rest`}get hubUrl(){return this._hubUrl}get isPortal(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")}get discussionsServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/discussions/v1`}get hubSearchServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/v3/datasets`}get domainServiceUrl(){if(this._hubUrl)return`${this._hubUrl}/api/v3/domains`}get ogcApiUrl(){if(this._hubUrl)return`${this._hubUrl.replace("hub","opendata")}/api/search/v1`}get eventsConfig(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.events")}get hubEnabled(){return(0,o.t)(this._portalSelf,"portalProperties.hub.enabled",!1)}get communityOrgId(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")}get enterpriseOrgId(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.enterpriseOrg.orgId")}get communityOrgHostname(){if(this._portalSelf)return(0,s.W)(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")}get communityOrgUrl(){if(this.communityOrgHostname)return`https://${this.communityOrgHostname}`}get helperServices(){if(this._portalSelf)return this._portalSelf.helperServices}get currentUser(){return this._currentUser}get portal(){return this._portalSelf}get properties(){return this._properties}get trustedOrgIds(){return this._trustedOrgIds}get trustedOrgs(){return this._trustedOrgs}get isCommunityOrg(){let e=!1;return this._portalSelf&&(e="community"===(0,s.W)(this._portalSelf,"portalProperties.hub.settings.orgType")),e}get isOrgAdmin(){const{_currentUser:e}=this;let t=!1;return e&&(t="org_admin"===e.role&&!e.roleId),t}get userResourceTokens(){return this._userResourceTokens}get userHubSettings(){return this._userHubSettings}get orgThumbnailUrl(){var e;return(0,l.S)(this.portal,null===(e=this.session)||void 0===e?void 0:e.token)}get survey123Url(){var e;return`https://survey123${null!==(e={qaext:"qa",devext:"dev"}[this.environment])&&void 0!==e?e:""}.arcgis.com`}tokenFor(e){const t=this._userResourceTokens.find((t=>t.app===e));if(t)return t.token}refreshUser(){const e={authentication:this.session,portal:this.sharingApiUrl,username:this.session.username};return(0,n.PR)(e).then((e=>{this._currentUser=e}))}get history(){return this._userHubSettings.history||{entries:[]}}get resourceGroupIDs(){return h[this.environment]}checkPermission(e,t){return(0,u.P)(e,this,t)}async addToHistory(e){if(!this.isAuthenticated)return;if(!this.checkPermission("hub:feature:history").access)return;const t=(0,i.j)(e,this.history);return this._userHubSettings.history=t,this.updateUserHubSettings(this._userHubSettings)}async clearHistory(){if(this.isAuthenticated&&this.checkPermission("hub:feature:history").access)return this._userHubSettings.history={entries:[]},this.updateUserHubSettings(this._userHubSettings)}async removeFromHistory(e){if(!this.isAuthenticated)return;if(!this.checkPermission("hub:feature:history").access)return;const t=(0,i.g)(e,this.history);return this._userHubSettings.history=t,this.updateUserHubSettings(this._userHubSettings)}async updateUserHubSettings(e){if(!this._authentication)throw new Error("Cannot update user hub settings without an authenticated user");await(0,c.zL)(e,this,!0),this._userHubSettings=e,Object.keys((0,o.t)(e,"features",{}
18)).forEach((t=>{const r=(0,s.W)(e,`features.${t}`);this._featureFlags[`hub:feature:${t}`]=r}))}}},439862:(e,t,r)=>{"use strict";r.d(t,{SF:()=>v,c0:()=>S,kl:()=>E,wO:()=>T});var n=r(170209),i=r(348753),s=r(422985),o=r(696286),a=r(347322),c=r(656252),u=r(329644),l=r(282713),d=r(609205),p=r(130527),h=r(126186),m=r(625873),f=r(551753),g=r(875075);const y=["portalUrl","serviceStatus","featureFlags","properties","resourceConfigs","trustedOrgIds","trustedOrgs"],b=["resourceTokens","portal","currentUser"];class v{constructor(e){this._portalUrl="https://www.arcgis.com",this._properties={},this._featureFlags={},this._trustedOrgIds=[],this._trustedOrgs=[],this._resourceConfigs=[],this._userResourceTokens=[],this.id=(new Date).getTime(),c.Y.debug(`ArcGISContextManager:ctor: Creating ${this.id}`),e.properties&&(this._properties=e.properties),this._properties.alphaOrgs||(this._properties.alphaOrgs=[...T]),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest",""),this._hubUrl=(0,o.G)(this._portalUrl)):e.portalUrl?(this._portalUrl=e.portalUrl,this._hubUrl=(0,o.G)(this._portalUrl)):this._hubUrl=(0,o.G)(this._portalUrl),e.portal&&(this._portal=(0,u.kI)(e.portal)),e.currentUser&&(this._currentUser=(0,u.kI)(e.currentUser)),e.serviceStatus&&(this._serviceStatus=e.serviceStatus),e.featureFlags&&(this._featureFlags=(0,u.kI)(e.featureFlags)),e.trustedOrgIds&&(this._trustedOrgIds=(0,u.kI)(e.trustedOrgIds)),e.trustedOrgs&&(this._trustedOrgs=(0,u.kI)(e.trustedOrgs)),e.resourceConfigs&&(this._resourceConfigs=(0,u.kI)(e.resourceConfigs)),e.resourceTokens&&(this._userResourceTokens=(0,u.kI)(e.resourceTokens)),e.userHubSettings&&(this._userHubSettings=(0,u.kI)(e.userHubSettings))}static async create(e={}){const t=new v(e);return await t.initialize(),t}static async deserialize(e){const t=(0,l.z)(e),r=JSON.parse(t);let n={};if(y.forEach((e=>{n=(0,u.fE)(e,(0,m.W)(r,e),n)})),r.session){const e=i.$l.deserialize(r.session);e.tokenExpires.getTime()>Date.now()&&(b.forEach((e=>{n=(0,u.fE)(e,(0,m.W)(r,e),n)})),n.authentication=e)}return v.create(n)}serialize(){let e={};return y.forEach((t=>{e=(0,u.fE)(t,(0,m.W)(this,`_${t}`),e)})),this._authentication&&(e.session=this._authentication.serialize(),b.forEach((t=>{e=(0,u.fE)(t,(0,m.W)(this,`_${t}`),e)}))),(0,l.J)(JSON.stringify(e))}async setAuthentication(e){this._authentication=e,this._portalUrl=e.portal.replace("/sharing/rest",""),await this.initialize()}setProperties(e){this._properties=e,this._context=new s.Mq(this.contextOpts)}clearAuthentication(){this._context.isPortal||(this._portalUrl=(0,a.D)(this._portalUrl)),this._authentication=null,this._portal=null,this._currentUser=null,this._userResourceTokens=[],this._context=new s.Mq(this.contextOpts)}get context(){return this._context}async updateUserHubSettings(e){if(!this._authentication)throw new Error("Cannot update user hub settings without an authenticated user");await(0,p.zL)(e,this.context,!0),this._userHubSettings=e,Object.keys((0,f.t)(e,"features",{})).forEach((t=>{const r=(0,m.W)(e,`features.${t}`);this._featureFlags[`hub:feature:${t}`]=r})),this._context=new s.Mq(this.contextOpts)}async initialize(){const e=[],t=[];if(this._serviceStatus||(e.push(function(e){let t=S;return-1===e.indexOf("arcgis.com")&&(t=E),Promise.resolve(t)}(this._portalUrl)),t.push("serviceStatus")),this._authentication){const r=await this._authentication.getToken(this._authentication.portal);if(this._portal||(e.push(async function(e){const t=await(0,n.AW)({authentication:e}),r=await w(t.id,e);return t.limits=r,t}(this._authentication)),t.push("portal")),this._portal&&!this._portal.limits&&(e.push(w(this._portal.id,this._authentication)),t.push("portalLimits")),!this._currentUser){const r=this._authentication.username;e.push((0,n.PR)({username:r,authentication:this._authentication})),t.push("user")}this._trustedOrgs.length||(e.push(async function(e,t){const r=(0,d.D)(i.WY,{trustedOrgs:[]});return(await r(`${e}/sharing/rest/portals/self/trustedOrgs?f=json`,{params:{token:t.token}})).trustedOrgs}(this._portalUrl,this._authentication)),t.push("trustedOrgs")),!this._userResourceTokens.length&&this._resourceConfigs.length&&(e.push(async function(e,t,r){const n=(0,d.D)(i.Ov,null),s=e.map((e=>n(t,e.clientId,r).then((t=>{if(t)return Object.assign(Object.assign({},e),{token:t})}))));return(await Promise.all(s)).filter((e=>!!e))}(this._resourceConfigs,r,this._portalUrl+"/sharing/rest")),t.push("tokens")),this._userResourceTokens.push({app:"self",token:r,clientId:this._authentication.clientId||"self"})}let r;try{r=await Promise.all(e)}catch(e){const t=`ArcGISContextManager failed while initializing for "${this._authentication.username}" using ${this._authentication.portal}.`;throw c.Y.error(t),console.error(t),e}t.forEach(((e,t)=>{const n=r[t];switch(e){case"portal":this._portal=n;break;case"portalLimits":this._portal.limits=n;break;case"user":this._currentUser=n;break;case"trustedOrgs":this._trustedOrgs=n,this._trustedOrgIds=this._trustedOrgs.map((e=>e.to.orgId));break;case"tokens":this._userResourceTokens=[...this._userResourceTokens,...n];break;case"serviceStatus":this._serviceStatus=n}}));const o=this._userResourceTokens.find((e=>"hubforarcgis"===e.app));this._authentication&&o&&(this._userHubSettings=await(0,h.Z)(this._authentication.username,this._portalUrl,o.token),Object.keys((0,
19f.t)(this._userHubSettings,"features",{}
19)).forEach((e=>{const t=(0,m.W)(this._userHubSettings,`features.${e}`);this._featureFlags[`hub:feature:${e}`]=t}))),c.Y.debug(`ArcGISContextManager-${this.id}: updating context`),this._context=new s.Mq(this.contextOpts)}get contextOpts(){const e=["hubUrl",...y];let t={id:this.id,portalUrl:this._portalUrl};return e.forEach((e=>{t=(0,u.fE)(e,(0,m.W)(this,`_${e}`),t)})),this._authentication&&(["currentUser","userResourceTokens","userHubSettings"].forEach((e=>{t=(0,u.fE)(e,(0,m.W)(this,`_${e}`),t)})),t.authentication=this._authentication),t.portalSelf=this._portal,t}}async function w(e,t){return(await Promise.all([{type:"Groups",name:"MaxNumUserGroups",fallback:512}].map((async r=>{try{return await(0,g.w)(e,r.type,r.name,{authentication:t,portal:t.portal})}catch(e){return{type:r.type,name:r.name,limitValue:r.fallback}}})))).reduce(((e,t)=>(e[t.name]=t.limitValue,e)),{})}const S={portal:"online",discussions:"online",events:"online",metrics:"online",notifications:"online","hub-search":"online",domains:"online","hub-downloads":"online"},E={portal:"online",discussions:"not-available",events:"not-available",metrics:"not-available",notifications:"not-available","hub-search":"not-available",domains:"not-available","hub-downloads":"not-available"},T=["CrA5hYOKgL3Vwan8","zj227gjeSqEyG4HF","bkrWlSKcjUDFDtgw","vIu5NCxQFilhVymO","97KLIFOSt5CxbiRI","MiFBHFxEZWumnKCx","8HRYeOqprj872mxP","Xj56SBi2udA78cC9","uFEMdY4VMonzH8sG","LjjARY1mkhxulWPq","q2ikdtW0bkt5EgtQ","yHYVvboBBOdmcKci"]},826899:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(551753),i=r(276242);class s extends i.Z{constructor(e,t,r){super(e,t=t||"UNKNOWN_ERROR",r=(0,n.t)(r,"rootCause",r)),this.name="HubError",this.stack=(0,n.t)(r,"stack",(new Error).stack)}}},276242:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(551753);class i extends Error{constructor(e,t,r){t=t||"UNKNOWN_ERROR",r=(0,n.t)(r,"rootCause",r),super(t),this.operation=e,this.name="OperationError",this.rootCause=r,Object.setPrototypeOf(this,i.prototype),this.stack=(0,n.t)(r,"stack",(new Error).stack)}}},597633:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(329644),i=r(551753);class s{constructor(){this.operations=[]}startOperation(e){const t=(0,n.kI)(e);t.startedAt=(new Date).getTime(),t.state="working",this.operations.push(t)}start(e,t){const r={type:e,id:(0,i.t)(t,"id",(0,n.Mc)(`${e}_`)),inputs:(0,i.t)(t,"inputs",{}),cleanup:(0,i.t)(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(r),r.id}getOperation(e){return this.operations.find((t=>t.id===e))}getOperations(){return this.operations}finish(e,t){const 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=(0,n.kI)(t))}merge(e){this.operations=[...this.operations,...e.operations]}getCompleted(){return(0,n.kI)(this.operations.filter((e=>"completed"===e.state)))}getWorking(){return(0,n.kI)(this.operations.filter((e=>"working"===e.state)))}toString(){return this.operations.sort(((e,t)=>e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0)).map(o).join("\n")}serialize(){return{operations:(0,n.kI)(this.getOperations())}}}function o(e){let t=`${e.startedAt} : Operation ${e.id} started with inputs ${JSON.stringify(e.inputs)} but was not completed`;return"completed"===e.state&&(t=`${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}},181055:(e,t,r)=>{"use strict";r.d(t,{ol:()=>l,F5:()=>a,J2:()=>u,hZ:()=>p,Af:()=>d,Lb:()=>o});var n=r(625873),i=r(329644),s=r(620450);function o(e){const{privileges:t=[]}=e;return(0,s.q)(t,"portal:user:createItem")}function a(e,t){let r=!1;if(o(t)){const s=e.initiative?(0,n.W)(e,"initiative.item.properties.collaborationGroupId"):(0,n.W)(e,"site.properties.collaborationGroupId"),{groups:o=[]}=t;r=!!s&&!!(0,i.zP)(o,"id",s)}return r}var c=r(252628);function u(e,t){let r=!1;const{itemControl:i,owner:a,orgId:u}=e,{roleId:l,role:d,username:p,groups:h,orgId:m}=t,f=(0,s.q)(["admin","update"],i)||!!a&&a===p||!(!u||u!==m)&&!l&&"org_admin"===d,g=o(t);if(g&&f)r=!0;else if(g){const t=[...(0,n.W)(e,"groupIds")||[],(0,n.W)(e,"properties.collaborationGroupId")],i=e=>(0,c.A)(e)&&(0,s.q)(t,e.id);r=h.some(i)}return r}const l=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function d(e,t){let r=!1;const i=(0,n.W)(e,"properties.isDefaultHubHome"),a=o(t);if(!i&&a)r=u(e,t);else if(a){const n=t.orgId,i=e.orgId;if(n&&n===i){const e=t.privileges||[];r=l.every((t=>(0,s.q)(e,t)))}}return r}function p(e,t){let r=!1;return!(0,n.W)(e,"properties.isDefaultHubHome")&&o(t)&&(r=u(e,t)),r}},67869:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(16933),i=r(756035);function s(e){return e&&e.hubApiUrl||(0,i.k)((0,n.i)(e))}},709470:(e,t,r)=>{"use strict";r.d(t,{g:()=>h,ZH:()=>j,Cq:()=>p,QF:()=>S,Z0:()=>_,G4:()=>U,cO:()=>D,cT:()=>A,h9:()=>P,Ts:()=>O,Um:()=>R,UQ:()=>j,$c:()=>N});var n=r(170209),i=r(625873),s=r(710755),o=r(54430),a=r(680062);const c={children:[],parents:["initiative"]},u={children:["project"],parents:[]},l=e=>{let t={children:[],parents:[]};switch(e){case"initiative":t=u;break;case"project":t=c;break;default:throw new Error(`getAssociationHierarchy: Invalid type for associations: ${e}.`)}return t},d=(e,t)=>{try{const r=l(e),n=l(t);return r.children.includes(t)?n.parents.includes(e):!!r.parents.includes(t)&&n.children.includes(e)}catch(e){return!1}},p=async(e,t,r,c)=>{const u=(0,o.Q)(e);if(!d(u,t))throw new Error(`breakAssociation: Association between ${u} and ${t} is not supported.`);if(l(u).children.includes(t)){const o=(0,i.W)(e,"associations.groupId"),{owner:a}=await(0,s.z)(t,r,c);try{await(0,n.lF)({id:r,groupId:o,authentication:c.session,owner:a})}catch(e){throw new Error(`breakAssociation: there was an error unsharing ${r} from ${o}: ${e}`)}}else e.typeKeywords=function(e,t,r){const n=`ref|${t}|${r}`;return e.filter((e=>e!==n))}(e.typeKeywords,t,r),await(0,a.T)(u,e,c)},h=50;var m=r(166206),f=r(881914),g=r(550124),y=r(561037);function b(e,t){return{targetEntity:"string"==typeof e?(0,y.x)(e):(0,y.x)(e[0]),filters:[Object.assign(Object.assign({},t.length&&{operation:"AND"}),{predicates:[Object.assign({type:e},t.length&&{id:t})]})]}}const v=(e,t)=>
19(0,i.W)(e,"typeKeywords").reduce(((e,r)=>{const n=t?`ref|${t}|`:"ref|";if(r.startsWith(n)){const t=r.split("|")[2];e.push(t)}return e}),[]),w=(e,t)=>e.reduce(((e,r)=>{const n=r.typeKeywords.find((e=>e.startsWith(`${t}|`)));if(n){const t=n.split("|")[1];e.push(t)}return e}),[]),S=async(e,t,r)=>{const s=(0,o.Q)(e);if(!d(s,t))throw new Error(`getAssociatedEntitiesQuery: Association between ${s} and ${t} is not supported.`);const a=l(s).children.includes(t),c=await(async(e,t,r,s)=>{if(r){if(!(0,i.W)(e,"associations"))return null;const r=(0,o.Q)(e),n=(0,g.o)((0,m.g)(t),`ref|${r}|${e.id}`),s=(0,i.W)(e,"associations.rules.query");return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t),l=c.filter((e=>u.includes(e))),d=(0,m.g)(t);return l.length?b(d,l):null}})(e,t,a,r);return c};var E=r(583872),T=r(677425);const I=async(e,t,r,s)=>{if(r){const r=(0,o.Q)(e),n=(0,g.o)((0,m.g)(t),`ref|${r}|${e.id}`),s=(0,T.O)((0,i.W)(e,"associations.rules.query"));return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t).filter((e=>!c.includes(e))),l=(0,m.g)(t);return u.length?b(l,u):null}},C=async(e,t,r,s)=>{if(r){const r=(0,o.Q)(e),n=(a=(0,m.g)(t),c=`ref|${r}|${e.id}`,{targetEntity:"string"==typeof a?(0,y.x)(a):(0,y.x)(a[0]),filters:[{operation:"AND",predicates:[{type:a,typekeywords:{not:[c]}}]}]}),s=(0,i.W)(e,"associations.rules.query");return(0,f.W)([n,s])}{const{admin:r,member:i,other:o}=await(0,n.tX)(e.id,s.requestOptions),a=[...r,...i,...o],c=w(a,t),u=v(e,t),l=c.filter((e=>!u.includes(e))),d=(0,m.g)(t);return l.length?b(d,l):null}var a,c},A=async(e,t,r)=>{const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getPendingEntitiesQuery: Association between ${n} and ${t} is not supported.`);const i=l(n).children.includes(t);return i?await C(e,t,i,r):await I(e,t,i,r)},O=async(e,t,r)=>{const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getRequestingEntitiesQuery: Association between ${n} and ${t} is not supported.`);const i=l(n).children.includes(t);return i?await I(e,t,i,r):await C(e,t,i,r)},_=async(e,t,r)=>{let n;const i=(0,o.Q)(e);if(!d(i,t))throw new Error(`getAssociationStats: Association between ${i} and ${t} is not supported.`);const s=l(i).children.includes(t);n=Object.assign({associated:0,pending:0,requesting:0},s?{included:0}:{referenced:0});try{const i=await Promise.all([S(e,t,r),A(e,t,r),O(e,t,r)]),[{total:o},{total:a},{total:c}]=await Promise.all(i.map((async e=>{try{return await(0,E.B)(e,{requestOptions:r.hubRequestOptions})}catch(e){return{total:0}}})));n=Object.assign({associated:o,pending:a,requesting:c},s?{included:o+a}:{referenced:o+a})}catch(e){return n}return n},D=(e,t)=>{let r;const n=(0,o.Q)(e);if(!d(n,t))throw new Error(`getAvailableToRequestEntitiesQuery: Association between ${n} and ${t} is not supported.`);if(l(n).children.includes(t)){const n=b((0,m.g)(t),[]),s=(0,T.O)((0,i.W)(e,"associations.rules.query"));r=(0,f.W)([s,n])}else{const n=v(e,t);r=function(e,t){return{targetEntity:"string"==typeof e?(0,y.x)(e):(0,y.x)(e[0]),filters:[Object.assign(Object.assign({},t.length&&{operation:"AND"}),{predicates:[Object.assign({type:e},t.length&&{id:{not:t}})]})]}}((0,m.g)(t),n)}return r},P=(e,t)=>v(e,t);var k=r(736261),x=r(20084);async function R(e,t,r,n,i){let s;const a=(0,o.Q)(r);if(!d(a,n))throw new Error(`getWellKnownAssociationsCatalog: Association between ${a} and ${n} is not supported.`);e=(0,x.YM)(e);const c=(0,y.x)(r.type),u=[(0,x.sd)(e,c,n)];let l;switch(t){case"associated":l=await S(r,n,i);break;case"pending":l=await A(r,n,i);break;case"requesting":l=await O(r,n,i);break;case"availableToRequest":l=D(r,n)}const p=(null==l?void 0:l.filters)?l.filters:[{predicates:[{type:["Code Attachment"]}]}];return s=(0,k.Y)(e,t,p,u,c),s}const U=(e,t,r,n,i)=>{var s;const a=(0,o.Q)(t);if(!d(a,r))throw new Error(`getAvailableToRequestAssociationCatalogs: Association between ${a} and ${r} is not supported.`);e=(0,x.YM)(e);const c=null===(s=D(t,r))||void 0===s?void 0:s.filters;return(i||["myContent","favorites","organization","world"]).map((t=>{const i={user:n.currentUser,filters:c,collectionNames:[r],context:n};return(0,x.Sj)(e,t,"item",i)}
19)).filter(Boolean)};var M=r(466674);async function N(e,t,r){const n=(0,o.Q)(e),i=`${n}|${e.id}`;t.typeKeywords.includes(i)||(t.typeKeywords=[...t.typeKeywords,`${n}|${e.id}`]),await(0,a.T)("group",t,r);const s={groupId:t.id,rules:{schemaVersion:1,query:{targetEntity:"item",filters:[{predicates:[{group:t.id}]}]}}};return(0,M.t)("associations",s,e),await(0,a.T)(n,e,r)}const j=async(e,t,r,c)=>{const u=(0,o.Q)(e);if(!d(u,t))throw new Error(`requestAssociation: Association between ${u} and ${t} is not supported.`);if(l(u).children.includes(t)){const o=(0,i.W)(e,"associations.groupId"),{owner:a}=await(0,s.z)(t,r,c);try{await(0,n.Ju)({id:r,owner:a,groupId:o,authentication:c.session})}catch(e){const t=e;throw new Error(`requestAssociation: there was an error sharing ${r} to ${String(o)}: ${t}`)}}else e.typeKeywords=function(e,t,r){const n=`ref|${t}|${r}`;return e.includes(n)||(e=[...e,n]),e}(e.typeKeywords,t,r),await(0,a.T)(u,e,c)}},550124:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(561037);function i(e,t){return{targetEntity:"string"==typeof e?(0,n.x)(e):(0,n.x)(e[0]),filters:[{operation:"AND",predicates:[{type:e,typekeywords:[t]}]}]}}},316875:(e,t,r)=>{"use strict";r.d(t,{b:()=>f,f:()=>g});var n=r(75975);const{app:i,dataset:s,document:o,event:a,feedback:c,initiative:u,map:l,other:d,site:p}=n.collections,h=["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"],m=["Data"],f={app:i.concat(c),dataset:s,document:o,event:a,initiative:u,map:l,other:d,site:p,downloadableTypes:h,downloadableTypeKeywords:m,apiTypes:["Feature Service","Map Service","Image Service"]};function g(e){return-1!==h.indexOf(e.type)||e.typeKeywords&&m.some((t=>e.typeKeywords.some((e=>e===t))))}},647137:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(329644),i=r(376826),s=r(940687);class o{constructor(e,t){this.isDestroyed=!1,this.context=t,this.entity=e}static fromJson(e,t){const r=this.applyDefaults(e,t);return new o(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=o.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const{fetchHubChannel:n}=await Promise.resolve().then(r.bind(r,300337)),i=await n(e,t);return o.fromJson(i,t)}catch(e){throw new Error("Channel not found.")}}static applyDefaults(e,t){var r;return Object.assign(Object.assign({},(r=t.currentUser.orgId,{name:"",blockWords:[],allowAsAnonymous:!1,canEdit:!0,canDelete:!0,permissions:[(0,s.L)({category:i.RI.ORG,subCategory:i.B8.ADMIN,role:i.uU.OWNER,key:r})]})),e)}get canEdit(){return this.entity.canEdit}get canDelete(){return this.entity.canDelete}get orgId(){return this.entity.orgId}toJson(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");return(0,n.kI)(this.entity)}update(e){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");if(this.entity.id){const{updateHubChannel:e}=await Promise.resolve().then(r.bind(r,336163));this.entity=await e(this.entity,this.context)}else{const{createHubChannel:e}=await Promise.resolve().then(r.bind(r,336163));this.entity=await e(this.entity,this.context)}}async delete(){if(this.isDestroyed)throw new Error("HubChannel is already destroyed.");const{deleteHubChannel:e}=await Promise.resolve().then(r.bind(r,336163));this.isDestroyed=!0,await e(this.entity.id,this.context)}convertToCardModel(e){throw new Error("not implemented")}async getEditorConfig(e,t){const{getEditorConfig:n}=await Promise.resolve().then(r.bind(r,934647));return n(e,t,this.entity,this.context)}async toEditor(e,t){const{transformEntityToEditor:n}=await r.e(74929).then(r.bind(r,574929));return n(this.entity,this.context)}async fromEditor(e){const{transformEditorToEntity:t}=await r.e(852).then(r.bind(r,852));return this.entity=Object.assign(Object.assign({},this.entity),t(e)),await this.save(),this.entity}}},840724:(e,t,r)=>{"use strict";r.d(t,{$G:()=>n,VM:()=>s,bE:()=>i});
19const n=["hub:channel","hub:channel:create","hub:channel:delete","hub:channel:edit","hub:channel:view","hub:channel:owner","hub:channel:manage","hub:channel:read","hub:channel:write","hub:channel:readWrite","hub:channel:moderate"],i="hub:channel:none",s={channelRoot:"hub:channel",channelCreate:"hub:channel:create",channelDelete:"hub:channel:delete",channelEdit:"hub:channel:edit",channelView:"hub:channel:view",channelOwner:"hub:channel:owner",channelManage:"hub:channel:manage",channelRead:"hub:channel:read",channelWrite:"hub:channel:write",channelReadWrite:"hub:channel:readWrite",channelModerate:"hub:channel:moderate"}},596923:(e,t,r)=>{"use strict";r.d(t,{ChannelSchema:()=>s,J:()=>i});var n=r(840724);const i=["hub:channel:create","hub:channel:edit"],s={type:"object",properties:{name:{type:"string"},blockWords:{type:"string",format:"blockWords"},publicConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{anonymous:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead],default:n.bE},id:{type:"string"}}},authenticated:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}}}}}}},orgConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[n.VM.channelOwner],default:n.VM.channelOwner},id:{type:"string"}}}}}}}},groupConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite,n.VM.channelManage],default:n.bE},id:{type:"string"}}}}}}}},userConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{user:{type:"object",properties:{value:{type:"string",enum:[n.bE,n.VM.channelRead,n.VM.channelReadWrite],default:n.bE},id:{type:"string"}}}}}}}},allowAsAnonymous:{type:"boolean",default:!1}},required:["name"]}},940687:(e,t,r)=>{"use strict";r.d(t,{L:()=>a});var n=r(485358),i=r(840724),s=r(376826);const o={[s.uU.READ]:i.VM.channelRead,[s.uU.WRITE]:i.VM.channelWrite,[s.uU.READWRITE]:i.VM.channelReadWrite,[s.uU.MODERATE]:i.VM.channelModerate,[s.uU.MANAGE]:i.VM.channelManage,[s.uU.OWNER]:i.VM.channelOwner},a=e=>{const t=o[e.role];let r;return r=e.category===s.RI.ANONYMOUS_USER?n.C.anonymous:e.category===s.RI.AUTHENTICATED_USER?n.C.authenticated:e.category===s.RI.GROUP?e.subCategory===s.B8.ADMIN?n.C.groupAdmin:n.C.group:e.category===s.RI.ORG?e.subCategory===s.B8.ADMIN?n.C.orgAdmin:n.C.org:n.C.user,{permission:t,collaborationId:e.key||null,collaborationType:r,id:e.id||null}}},606728:(e,t,r)=>{"use strict";r.d(t,{M:()=>o});var n=r(871649),i=r(832919),s=r(940687);function o(e,t){return{access:e.access,id:e.id,name:e.name,createdDate:new Date(e.createdAt),createdDateSource:"channel.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"channel.updatedAt",type:"Channel",source:e.creator,links:{thumbnail:null,self:null,siteRelative:null,siteRelativeEntityType:null,workspaceRelative:null,layoutRelative:null},blockWords:e.blockWords,permissions:e.channelAcl.map((e=>(0,s.L)(e))),allowAsAnonymous:e.allowAsAnonymous,canEdit:(0,n.x)(e,t,e),canDelete:(0,i.T)(e,t),orgId:e.orgId,owner:e.creator,channel:e,typeKeywords:[],thumbnail:void 0,view:void 0,description:void 0,location:void 0,tags:[]}}},336163:(e,t,r)=>{"use strict";r.d(t,{createHubChannel:()=>d,deleteHubChannel:()=>h,updateHubChannel:()=>p});var n=r(972335),i=r(606728),s=r(376826),o=r(485358),a=r(840724);const c={[a.VM.channelRead]:s.uU.READ,[a.VM.channelWrite]:s.uU.WRITE,[a.VM.channelReadWrite]:s.uU.READWRITE,[a.VM.channelManage]:s.uU.MANAGE,[a.VM.channelModerate]:s.uU.MODERATE,[a.VM.channelOwner]:s.uU.OWNER},u={[o.C.anonymous]:{category:s.RI.ANONYMOUS_USER,subCategory:null},[o.C.authenticated]:{category:s.RI.AUTHENTICATED_USER,subCategory:null},[o.C.group]:{category:s.RI.GROUP,subCategory:s.B8.MEMBER},[o.C.groupAdmin]:{category:s.RI.GROUP,subCategory:s.B8.ADMIN},[o.C.org]:{category:s.RI.ORG,subCategory:s.B8.MEMBER},[o.C.orgAdmin]:{category:s.RI.ORG,subCategory:s.B8.ADMIN},[o.C.owner]:{category:s.RI.USER,subCategory:null},[o.C.user]:{category:s.RI.USER,subCategory:null}};function l(e){return{name:e.name,blockWords:e.blockWords,allowAsAnonymous:e.allowAsAnonymous,channelAclDefinition:e.permissions.reduce((function(e,t){const r=u[t.collaborationType];return r?[...e,Object.assign(Object.assign({},r),{key:t.collaborationId||null,role:c[t.permission]})]:e}),[])}}async function d(e,t){const r=l(e),s=await(0,n.Ww)(Object.assign({data:r},t.hubRequestOptions));return(0,i.M)(s,t.currentUser)}async function p(e,t){const r=l(e),s=await(0,n.BP)(Object.assign({channelId:e.id,data:r},t.hubRequestOptions));return(0,i.M)(s,t.currentUser)}async function h(e,t){await(0,n.sD)(Object.assign({channelId:e},t.hubRequestOptions))}},300337:(e,t,r)=>{"use strict";r.d(t,{fetchHubChannel:()=>o});var n=r(376826),i=r(972335),s=r(606728);async function o(e,t){const r=await(0,i.fA)(Object.assign({channelId:e,data:{relations:[n.Uz.CHANNEL_ACL]}},t.hubRequestOptions));return(0,s.M)(r,t.currentUser)}},943190:(e,t,r)=>{"use strict";r.d(t,{Pw:()=>i.createHubChannel,Uq:()=>i.deleteHubChannel,cy:()=>s.fetchHubChannel,lM:()=>n.l,vL:()=>i.updateHubChannel});var n=r(647137),i=r(336163),s=r(300337)},75975:(e,t,r)=>{"use strict";r.d(t,{_:()=>n,collections:()=>s,o:()=>i});const n=e=>{if(!e)return;const t=e.toLocaleLowerCase();return Object.keys(s).find((e=>s[e].some((e=>e.toLocaleLowerCase()===t))))},i=e=>{if(!e)return;const t=e.toLocaleLowerCase();return s[t]},s={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","3DTiles Package","3DTiles Service","API Key","Activity","Addin Package","Administrative Report","AllSource Project","Analysis Model","Apache Parquet","App Bundle","AppBuilder Extension","AppBuilder Widget Package","Application Configuration","Application SDK","ArcGIS Pro Add In","ArcGIS Pro Configuration","ArcPad Package","Arcade Module","Basemap Package","Big Data Analytic","Big Data File Share","Code Attachment","Code Sample","Color Set","Compact Tile Package","Content Category Set","Data Package Collection","Data Pipeline","Data Store","Deep Learning Package","Deep Learning Studio Project","Desktop Add In","Desktop Application","Desktop Application Template","Desktop Style","Earth Configuration","Esri Classification Schema","Esri Classifier Definition","Excalibur Imagery Project","Experience Builder Widget","Experience Builder Widget Package","Explorer Add In","Explorer Layer","
19Explorer Map","Export Package","Featured Items","Feed","GML","GeoBIM Application","GeoBIM Project","GeoPackage","Geocoding Service","Geodata Service","Geoenrichment Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Globe Document","Globe Service","Group Layer","IPS Configuration","Indoors Map Configuration","Insights Data Engineering Model","Insights Data Engineering Workbook","Insights Model","Insights Script","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Knowledge Graph","Knowledge Graph Layer","Knowledge Graph Web Investigation","Knowledge Studio Project","Layer","Layer File","Layer Package","Layer Template","Layout","Legend","Living Atlas Export Package","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Media Layer","Mission","Mission Report","Mission Template","Mobile Application","Mobile Basemap Package","Mobile Map Package","Mobile Scene Package","Native Application","Native Application Installer","Native Application Template","Network Analysis Service","Notebook Code Snippet Library","Notebook Code Snippets","OGCFeatureServer","Operations Dashboard Add In","Operations Dashboard Extension","Oriented Imagery Catalog","Ortho Mapping Project","Ortho Mapping Template","Pro Presentation","Pro Project","Pro Report","Pro Report Template","Project Package","Project Template","Published Map","QuickCapture Project","Raster Function Template","Real Time Analytic","Reality Mapping Project","Reality Studio Project","Relational Database Connection","Replication Package","Rule Package","SMX Item","SMX Map","SMX Theme","SQLite Geodatabase","Scene Document","Scene Package","Scene Package Part","Server","Service Definition","Statistical Data Collection","StoryMap Theme","Style","Suitability Model","Survey123 Add In","Symbol Service","Symbol Set","Task File","Tile Package","Urban Project","User License Type Extension","Vector Tile Package","Video Service","Viewer Configuration","Visio Document","WCS","Web AppBuilder Widget","Web Experience Template","Web Link Chart","Windows Mobile Package","Windows Viewer Add In","Workflow","Workflow Manager Package","Workflow Manager Service","Workforce Project","netCDF"],site:["Hub Site Application","Site Application"]}},14987:(e,t,r)=>{"use strict";r.d(t,{Q:()=>f});
19var n=r(656110),i=r(934647),s=r(329644),o=r(114443),a=r(50950),c=r(77270),u=r(599045),l=r(625873),d=r(928906),p=r(279436),h=r(616355),m=r(792280);class f extends n.x{constructor(e,t){super(e,t)}static fromJson(e,t){return new f(e,t)}async save(){this._checkDestroyed();const{createContent:e,updateContent:t}=await Promise.resolve().then(r.bind(r,114443));this.entity.id?this.entity=await t(this.entity,this.context.userRequestOptions):this.entity=await e(this.entity,this.context.userRequestOptions),await super.afterSave()}update(e){this._checkDestroyed(),this.entity=Object.assign(Object.assign({},this.entity),e)}async delete(){this._checkDestroyed(),this.isDestroyed=!0;const{deleteContent:e}=await Promise.resolve().then(r.bind(r,114443));await e(this.entity.id,this.context.userRequestOptions)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,a.t)((0,s.kI)(this.entity),t,this.context.hubRequestOptions):(0,s.kI)(this.entity);return(0,c.k)(this.entity)&&(r.downloadFormats=function(e){const t=(0,d.g)(e),r=t.flowType;let n=t.formats;!r&&["Feature Service","Map Service"].includes(e.type)&&(n=(0,h.i)().map((e=>({key:e.format,hidden:!1})))),(0,u.E8)(e)&&"createReplica"!==r&&(n=(0,p.z)(e).map((e=>({key:e.format,hidden:!1}))));const i=(0,l.W)(e,"extendedProps.additionalResources")||[];return n.map((e=>{return(0,m.B)(e)?function(e,t){const r=(0,m.X)(e),{name:n,isDataSource:i}=t[r];let s;return s=n?`{{shared.fields.download.additionalResource|resourceName=${encodeURIComponent(n)}:translate}}`:i?"{{shared.fields.download.dataSourceResource:translate}}":"{{shared.fields.download.noTitleResource:translate}}",Object.assign({label:s},e)}(e,i):(t=e,Object.assign({label:`{{shared.fields.download.format.${t.key}:translate}}`},t));var t}))}(this.entity)),r}async fromEditor(e){var t,r;const n=!e.id;if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const i=(0,o.B)(e,this.context.portal);if(i.extent=null!==(r=null===(t=e.location)||void 0===t?void 0:t.extent)&&void 0!==r?r:[],n)throw new Error("Cannot create content using the Editor.");return this.entity=i,await this.save(),this.entity}_checkDestroyed(){if(this.isDestroyed)throw new Error("HubContent is already destroyed.")}}},52765:(e,t,r)=>{"use strict";r.d(t,{CB:()=>n,aB:()=>i});const n=["hub:content:create","hub:content:delete","hub:content:edit","hub:content:view","hub:content:view:related","hub:content:view:connected","hub:content:canChangeAccess","hub:content:workspace","hub:content:workspace:overview","hub:content:workspace:dashboard","hub:content:workspace:details","hub:content:workspace:discussion","hub:content:workspace:settings","hub:content:workspace:settings:schedule","hub:content:workspace:collaborators","hub:content:manage","hub:content:canRecordDownloadErrors","hub:content:downloads:displayErrors","hub:content:document:create"],i=[{permission:"hub:content",services:["portal"]},{permission:"hub:content:create",services:["portal"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:content:view",services:["portal"],authenticated:!1},{permission:"hub:content:view:related",dependencies:["hub:content:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:content:view:connected",dependencies:["hub:content:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"},{property:"entity:type",type:"included-in",value:["Feature Service","Map Service"]}]},{permission:"hub:content:edit",authenticated:!0,services:["portal"],entityEdit:!0},{permission:"hub:content:delete",authenticated:!0,services:["portal"],entityDelete:!0},{permission:"hub:content:canChangeAccess",dependencies:["hub:content"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]}
19,{permission:"hub:content:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:content:workspace:overview",availability:["alpha"],dependencies:["hub:content:workspace","hub:content:view"]},{permission:"hub:content:workspace:dashboard",dependencies:["hub:content:workspace","hub:content:view"]},{permission:"hub:content:workspace:details",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:workspace:discussion",services:["discussions"],licenses:["hub-premium"],dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:workspace:settings",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:workspace:settings:schedule",dependencies:["hub:content:workspace:settings"],environments:["devext","qaext","production"],services:["hub-downloads"]},{permission:"hub:content:workspace:collaborators",dependencies:["hub:content:workspace","hub:content:edit"]},{permission:"hub:content:manage",dependencies:["hub:content:edit"]},{permission:"hub:content:canRecordDownloadErrors",environments:["qaext","devext"]},{permission:"hub:content:downloads:displayErrors",availability:["alpha"],environments:["qaext","devext"]},{permission:"hub:content:document:create",dependencies:["hub:content:create"]}]},156739:(e,t,r)=>{"use strict";r.d(t,{ContentSchema:()=>s,E:()=>i});var n=r(434164);const i=["hub:content:edit","hub:content:settings","hub:content:discussions"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{licenseInfo:{type:"string"},serverExtractCapability:{type:"boolean",enum:[!0,!1]},schedule:{type:"object"},_forceUpdate:{type:"array",items:{type:"boolean",enum:[!0]}},downloadFormats:{type:"array",items:{type:"object"}}})})},778060:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"licenseInfo",storeKey:"item.licenseInfo"}),e.push({entityKey:"size",storeKey:"item.size"}),e}},653609:(e,t,r)=>{"use strict";r.d(t,{Fs:()=>I,HH:()=>b,OA:()=>F,P7:()=>_,RN:()=>O,Ux:()=>C,VQ:()=>A,ZY:()=>v,bC:()=>w,bV:()=>N,eI:()=>j,iP:()=>f,jA:()=>g,kd:()=>$,oR:()=>Y,pv:()=>J,r9:()=>S,rL:()=>D,u9:()=>U});var n=r(958328),i=r(440630),s=r(231566),o=r(610924),a=r(625873),c=r(881554),u=r(163044),l=r(213256),d=r(197928),p=r(67869),h=r(803754);const m={devext:"dev",qaext:"qa",production:""},f=e=>{var t;const r=e.extent,n=(0,s.pi)(r),i=(null===(t=e.properties)||void 0===t?void 0:t.boundary)||(n?"item":void 0),o={geometry:null,provenance:i};if("item"===i&&n){const e=(0,s.Vu)(r),t=(0,s.Dz)(e);o.center=[t.x,t.y],o.geometry=Object.assign(Object.assign({},(0,s.vP)(e)),{type:"polygon"}),o.spatialReference=o.geometry.spatialReference}return o},g=e=>{const{properties:t,extent:r}=e,n=null==t?void 0:t.location;if(n)return n;if("none"===(null==t?void 0:t.boundary))return{type:"none"};const i=(e=>(0,s.pi)(e)?Object.assign(Object.assign({},(0,s.Vu)(e)),{type:"extent"}):void 0)(r);if(i)return{type:(0,h.Z6)(e.type)?"org":"custom",extent:r,geometries:[i],spatialReference:i.spatialReference};try{const t=(0,s.Uf)(r),n={wkid:4326},i=Object.assign(Object.assign({type:"polygon"},(0,d.O)(r)),{spatialReference:(0,s.nc)(t)?n:_(e)||n});return{type:"custom",extent:t,geometries:[i],spatialReference:i.spatialReference}}catch(e){return{type:"none"}}},y=e=>e&&e.isPortal,b=(e,t)=>!!e&&"public"===e.access&&!y(t),v=(e,t)=>!y(t)&&"public"===e.access&&"CSV"===e.type&&e.size<=5e6,w=(e,t,r)=>{let n=E(e,t,r)||T(e,t,r);const i=(0,o._)(e);if(!n){const s=["app","dataset","document","map","template","project","initiative","discussion","event"];let o="/content";"feedback"===i?o=t?"/feedback/surveys":"":S(e,r)?o="/pages":s.indexOf(i)>-1&&(o=`/${i}s`),n=t?`${o}/${t}`:`${o}`}return t||["initiative","project"].includes(i)||(n=""),n},S=(e,t=[])=>["Hub Page","Site Page"].includes(e)||t.includes("hubPage"),E=(e,t,r)=>{let n;return"Solution"===e?n=(null==r?void 0:r.indexOf("Deployed"))>-1?`/content/${t}/about`:`/templates/${t}/about`:"Web Mapping Application"===e&&(null==r?void 0:r.indexOf("hubSolutionTemplate"))>-1&&(n=`/templates/${t}/about`),n},T=(e,t,r)=>{if("Hub Initiative"===e&&(null==r?void 0:r.indexOf("hubInitiativeTemplate"))>-1||"Hub Initiative Template"===e)return`/initiatives/templates/${t}/about`};function I(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 C(e,t){const r=I(t);return r&&(0,a.W)(e,r)}var A;function O(e){let t,r;if(/^\d{4}$/.test(e=`${e}`))t=new Date(+e,0,1),r=A.Year;else if(/^\d{4}-\d{1,2}$/.test(e)){const n=e.split("-");t=new Date(+n[0],+n[1]-1,1),r=A.Month}else if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)){const n=e.split("-");t=new Date(+n[0],+n[1]-1,+n[2]),r=A.Day}else Number.isNaN(Date.parse(e))||(t=new Date(e),r=e.includes("T")?A.Time:A.Day);return t&&r&&{date:t,precision:r}}!function(e){e.Year="year",e.Month="month",e.Day="day",e.Time="time"}(A||(A={}));const _=e=>{const t=e.spatialReference;if(!t||"object"==typeof t)return t;const r=parseInt(t+"",10);return isNaN(r)?null:{wkid:r}},D=(e,t,r)=>{const n=P(t);return n&&n.map((t=>({name:t.orName,url:R(t,e,r),isDataSource:x(t,e)})))},P=e=>{const t=[];
19return k((0,a.W)(e,"metadata.distInfo")||[]).forEach((e=>{k(e.distTranOps||[]).forEach((e=>{k(e.onLineSrc||[]).forEach((e=>{t.push(e)}))}))})),t.length?t:null},k=e=>Array.isArray(e)?e:[e],x=(e,t)=>{const r=t.url&&(0,n.pW)(t.url);return r&&e.linkage&&e.linkage.includes(r)},R=(e,t,r)=>{let n=e.linkage;const i=(0,a.W)(r,"authentication.token");if(i&&x(e,t)){const t=new URL(e.linkage),r=new URLSearchParams(t.search);r.set("token",i),t.search=r.toString(),n=t.toString()}return n},U=(e,t,r)=>{const n=(0,s.pi)(e.extent)?e.extent:void 0,i=(0,s.pi)(null==t?void 0:t.coordinates)?t.coordinates:void 0,o=4326===(0,a.W)(r,"extent.spatialReference.wkid")?(0,s.c5)(r.extent):void 0;return n||i||o},M=(e,t)=>{const r=(0,a.W)(e,t)||{},{rpIndName:n,rpOrgName:i}=Array.isArray(r)?r[0]:r;return{individualName:n,organizationName:i}},N=(e,t)=>e.orgId||(null==t?void 0:t.orgId),j=(e,t,r,n)=>{const s={nameSource:i.y.None,organizationSource:i.y.None},o=M(t,"metadata.dataIdInfo.idCitation.citRespParty"),c=M(t,"metadata.dataIdInfo.idPoC"),u=M(t,"metadata.mdContact"),l=(0,a.W)(n,"fullName");o.individualName?(s.name=o.individualName,s.nameSource=i.y.CitationContact):c.individualName?(s.name=c.individualName,s.nameSource=i.y.ResourceContact):u.individualName?(s.name=u.individualName,s.nameSource=i.y.MetadataContact):l&&(s.name=l,s.username=n.username,s.nameSource=i.y.ItemOwner);const d=(0,a.W)(r,"name");return o.organizationName?(s.organization=o.organizationName,s.organizationSource=i.y.CitationContact):c.organizationName?(s.organization=c.organizationName,s.organizationSource=i.y.ResourceContact):u.organizationName?(s.organization=u.organizationName,s.organizationSource=i.y.MetadataContact):d&&(s.organization=d,s.orgId=N(e,n),s.organizationSource=i.y.ItemOwner),s.isExternal=s.organizationSource===i.y.None&&"public"!==e.access,s},$=e=>e.reduce(((e,t)=>{const r=t.split("/"),n=r[r.length-1];return n&&e.push(n),e}),[]),F=(e,t)=>{let r;switch(G(e)){case"Dashboard":r=B(e,t);break;case"Insights Workbook":r=V(e,t);break;case"Experience":r=H(e,t);break;case"Web AppBuilder":r=W(e,t);break;case"Form":r=q(e,t);break;case"StoryMap":r=L(e,t);break;case"Urban Model":r=K(e,t);break;default:r=(0,c.$)(e.id,t)}return r},G=e=>{const t=e.typeKeywords||[];let r=e.type;return"StoryMap"===e.type||"Web Mapping Application"===e.type&&t.includes("Story Map")?r="StoryMap":"Insights Page"===e.type?r="Insights Page":"Insights Workbook"===e.type?r="Insights Workbook":e.type&&e.type.includes("Insights")?r="Insights":"Web Experience"===e.type||"Web Mapping Experience"===e.type&&t.includes("EXB Experience")?r="Experience":t.includes("Web AppBuilder")&&(r="Web AppBuilder"),r},L=(e,t)=>{const r=(0,u.a)(t);return`https://${{devext:"storymapsdev",qaext:"storymapsqa",production:"storymaps"}[(0,l.G)(r)]}.arcgis.com/stories/${e.id}/edit`},H=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r);return`https://experience${m[n]}.arcgis.com/builder/?id=${e.id}`},B=(e,t)=>{const r=(0,u.a)(t);let n=`${r}/apps/opsdashboard/index.html#/${e.id}?mode=edit`;return e.typeKeywords&&e.typeKeywords.includes("ArcGIS Dashboards")&&(n=`${r}/apps/dashboards/${e.id}#mode=edit`),n},W=(e,t)=>`${(0,u.a)(t)}/apps/webappbuilder/index.html?id=${e.id}`,q=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://survey123${m[n]}.arcgis.com`;let s;return s=e.typeKeywords.includes("Survey123 Connect")?(0,c.$)(e.id,r):`${i}/surveys/${e.id}/design?portalUrl=${r}`,s},V=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://insights${m[n]}.arcgis.com`,s=(0,c.$)(e.id,r);return z(r)?s:`${i}/#/edit/${e.id}`},K=(e,t)=>{const r=(0,u.a)(t),n=(0,l.G)(r),i=`https://urban${m[n]}.arcgis.com`,s=(0,c.$)(e.id,r);return z(r)?s:`${i}/?id=${e.id}`},z=e=>-1===e.indexOf("arcgis.com");function Y(e,t){const r=function(e){return(0,p.g)(e).replace(/\/api\/v3$/,"")}(t);return`${r}/api/download/v1/items/${e}/schedule?token=${t.authentication.token}`}const J=async(e,t)=>{const r=`${(0,p.g)(t)}/api/v3/jobs/item/${e}/forceUpdate`,n={method:"POST",headers:{"content-type":"application/json",authorization:t.authentication.token}};return(await fetch(r,n)).ok}},77270:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(212384),i=r(625873);function s(e){const t=["Feature Service","Map Service"].includes(e.type)&&/\/\d+$/.test(e.url),r=1===(0,i.W)(e,"extendedProps.server.layers.length"),s=(0,n.X)(e);return t||r||s}},803754:(e,t,r)=>{"use strict";r.d(t,{F4:()=>R,Hk:()=>U,KF:()=>_,N:()=>A,O1:()=>P,Oi:()=>D,Tf:()=>C,UY:()=>k,Z6:()=>O,b7:()=>I,l$:()=>x,oB:()=>E,v9:()=>y,ve:()=>T});var n=r(958328),i=r(67869),s=r(316875),o=r(79438),a=r(625873),c=r(902815),u=r(881554),l=r(825190),d=r(717423),p=r(329644),h=r(620450),m=r(653609),f=r(610924);const g=(e,t,r,n)=>!(0,m.ZY)(e,n)&&t&&r&&r.length>1&&!C(e.url);var y;
19!function(e){e.Continual="continual",e.Daily="daily",e.Weekly="weekly",e.Fortnightly="fortnightly",e.Monthly="monthly",e.Quarterly="quarterly",e.Biannually="biannually",e.Annually="annually",e.AsNeeded="as-needed",e.Irregular="irregular",e.NotPlanned="not-planned",e.Unknown="unknown",e.Semimonthly="semimonthly"}(y||(y={}));const b=(e,t)=>({"001":y.Continual,"002":y.Daily,"003":y.Weekly,"004":y.Fortnightly,"005":y.Monthly,"006":y.Quarterly,"007":y.Biannually,"008":y.Annually,"009":y.AsNeeded,"010":y.Irregular,"011":y.NotPlanned,"012":y.Unknown,"013":y.Semimonthly}[(0,m.Ux)(e,t||"updateFrequency")]),v=(e,t)=>{const r=(0,m.RN)((0,m.Ux)(e,t));return r&&Object.assign(Object.assign({},r),{source:`metadata.${(0,m.Fs)(t)}`})},w=(e,t)=>{const r=`${t}.editingInfo.lastEditDate`,n=(0,a.W)(e,r);return n&&{date:new Date(n),source:r,precision:m.VQ.Day}},S=(e,t)=>({date:new Date(e[t]),precision:m.VQ.Day,source:`item.${t}`}),E=e=>{var t;return null!==(t={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",csvCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",discussion:"speech-bubbles",documentLink:"link",event:"event",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",group:"users",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"maximize",hubProject:"projects",hubSiteApplication:"browser",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",wms:"map",wmts:"map",workflowManagerService:"file",workforceProject:"list-check"}[(0,p._A)(e)])&&void 0!==t?t:"file"},T=(e,t)=>{const r=t.authentication,n=r&&r.token;return{portalHome:(0,u.$)(e.id,t),portalApi:(0,l.p)(e,t,n),portalData:(0,d.m)(e,t,n),thumbnail:(0,c.S)(e,t,{token:n})}},I=(e,t)=>{let r;return(0,m.ZY)(e,t)&&(r=`${(0,i.g)(t).replace("/api/v3","")}/datasets/${e.id}_0/FeatureServer/0`),r},C=e=>{const t=e&&/\/\d+$/.exec(e);return t&&t[0].slice(1)},A=e=>e&&"feature service"===e.toLowerCase();function O(e,t=[]){return"Site Application"===e||"Hub Site Application"===e||"Web Mapping Application"===e&&t.includes("hubSite")}function _(e={}){let t=e.type;const r=e.typeKeywords||[];return O(e.type,r)&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&(0,h.q)(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&(0,h.q)(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),"Web Mapping Application"===e.type&&(0,h.q)(r,"hubSolutionTemplate")&&(t="Solution"),t}const D=e=>C(e.url)||A(e.type)&&e.typeKeywords&&(0,h.q)(e.typeKeywords,"Singlelayer")&&"0",P=e=>{if("public"!==e.access)return;const t=e.id,r=D(e);return r?`${t}_${r}`:t};function k(e){if(!e)return e;const t=["categories",""];return e.map((e=>e.split("/"))).reduce(((e,t,r)=>[...e,...t]),[]).filter((e=>!(0,h.q)(t,e.toLowerCase())))}const x=(e,t,r)=>{const n=C(e.url),i=n?parseInt(n,10):r;return t&&((0,p.kK)(i)?A(e.type)&&(e=>{const t=e&&1===e.length?e[0]:void 0;return t&&t.capabilities.includes("Query")?t:void 0})(t):t.find((e=>e.id===i)))},R=e=>e.isView,U=(e,t)=>{const{slug:r,requestOptions:i,data:a,metadata:c,groupIds:u,ownerUser:l,org:d,errors:p,server:h,layers:y,recordCount:C,boundary:A,extent:O,searchDescription:D,statistics:U}=t||{},M=x(e,y,null==t?void 0:t.layerId),N=((e,t,r)=>
19(0,m.ZY)(e,r)?e.id:(0,m.HH)(e,r)?t?`${e.id}_${t.id}`:P(e):void 0)(e,M,i),j=r||N||e.id,$=((e,t,r,n)=>((g(e,t,r,n)?t.name:e.title||e.name)||"").replace(/_/g," "))(e,M,y,i),F=g(e,M,y,i)&&M.description,G=M?M.type:_(e),L=Object.assign({relative:(0,m.bC)(G,j,e.typeKeywords)},i&&T(e,i)),H=I(e,i),B=((e,t)=>v(t.metadata,"reviseDate")||w(t,"layer")||w(t,"server")||S(e,"modified"))(e,{metadata:c,layer:M,server:h}),W=((e,t)=>v(t,"pubDate")||v(t,"createDate")||S(e,"created"))(e,c),q=((e,t)=>v(t,"metadataUpdatedDate")||S(e,"modified"))(e,c),V="update"===e.itemControl||"admin"===e.itemControl,K="admin"===e.itemControl;return Object.assign(Object.assign({item:e},e),{slug:r,data:a,metadata:c,groupIds:u,ownerUser:l,org:d,errors:p||[],server:h,layers:y,recordCount:C,statistics:U,hubId:N,identifier:j,get isProxied(){return!!H},layer:M,name:$,get canEdit(){return V},get canDelete(){return K},get title(){return $},get description(){return F||e.description},type:G,get family(){return(0,f._)(G)},get url(){return H||(M?`${(0,n.pW)(e.url)}/${M.id}`:e.url)},get categories(){return k(e.categories)},get actionLinks(){return e.properties&&e.properties.links},get hubActions(){return e.properties&&e.properties.actions},get isDownloadable(){return(0,s.f)(e)},get structuredLicense(){return(0,o.D)(e.licenseInfo)},get permissions(){return{visibility:e.access,control:e.itemControl||"view"}},get extent(){return(0,m.u9)(e,O,M)},get boundary(){return"automatic"===(null==A?void 0:A.provenance)?A:(0,m.iP)(e)},get summary(){return D||e.snippet||e.description},urls:L,get portalHomeUrl(){return L.portalHome},get portalDataUrl(){return L.portalData},get portalApiUrl(){return L.portalApi},get thumbnailUrl(){return L.thumbnail},get createdDate(){return new Date(e.created)},createdDateSource:"item.created",get updatedDate(){return B.date},get updatedDateSource(){return B.source},get updatedDatePrecision(){return B.precision},get modified(){return B.date.getTime()},get publishedDate(){return W.date},get publishedDateSource(){return W.source},get publishedDatePrecision(){return W.precision},get metadataUpdatedDate(){return q.date},get metadataUpdatedDateSource(){return q.source},get metadataUpdatedDatePrecision(){return q.precision},get updateFrequency(){return b(c)},get metadataUpdateFrequency(){return b(c,"metadataUpdateFrequency")},get publisher(){return(0,m.eI)(e,c,d,l)},get metrics(){return e.properties&&e.properties.metrics},get spatialReference(){var t;return(null===(t=null==M?void 0:M.extent)||void 0===t?void 0:t.spatialReference)||(0,m.P7)(e)},get viewDefinition(){const e=M&&R(M)&&a&&Array.isArray(a.layers)&&a.layers.find((e=>e.id===M.id));return e?e.layerDefinition:void 0},get orgId(){return d?d.id:(0,m.bV)(e,l)},get contentTypeIcon(){return E(G)},get additionalResources(){return(0,m.rL)(e,c)},get itemControl(){return e.itemControl||"view"}})}},114443:(e,t,r)=>{"use strict";r.d(t,{B:()=>I,createContent:()=>S,deleteContent:()=>T,updateContent:()=>E});var n=r(170209),i=r(404091),s=r(178749),o=r(778060),a=r(329644),c=r(85738),u=r(210220),l=r(958328),d=r(599045),p=r(563467),h=r(653609),m=r(625873),f=r(466674),g=r(910968),y=r(994764),b=r(928906),v=r(77270);const w={item:{title:"No Title Provided",description:"",snippet:"",tags:[],typeKeywords:[]},data:null};async function S(e,t){const r=Object.assign({},e);r.typeKeywords=(0,c.Wb)(r.typeKeywords,r.isDiscussable);const n=new s.c7((0,o.s)());let u=n.entityToStore(r,(0,a.kI)(w));return u=await(0,i.NY)(u,t),n.storeToEntity(u,{})}async function E(e,t){const r=await(0,n.rV)(e.id,t),b={item:r};e.typeKeywords=(0,c.Wb)(e.typeKeywords,e.isDiscussable);const w=new s.c7((0,o.s)()).entityToStore(e,b),S=(0,y.H)(e),E=(0,m.W)(e,"extendedProps.downloads.formats"),T=(0,d.E8)(e)&&"createReplica"!==S;if((0,v.k)(e)&&S&&E&&!T){const t=(0,a.kI)(e.extendedProps.downloads);(0,f.t)("item.properties.downloads",t,w,!0)}const I=await(0,i.QB)(w,t),C={};if((0,d.E8)(e)){const r=await(0,l.ko)(Object.assign(Object.assign({},t),{url:e.url}));if((0,d.bI)(d.GY.EXTRACT,r)!==e.serverExtractCapability){const n=(0,d.F7)(d.GY.EXTRACT,r),i={capabilities:n.capabilities};await(0,l.iD)((0,l.pW)(e.url),{authentication:t.authentication,updateDefinition:i}),C.server=n}else C.server=r}return(0,p.zJ)(t,e.access)&&((0,g.v)(e._forceUpdate,[!0])&&await(0,h.pv)(r.id,t),delete e._forceUpdate,await(0,p.xV)(e,t)),(0,u.l)(I,t,C)}async function T(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,n.cl)(r)}function I(e,t){var r;const n=(0,a.kI)(e)
20;delete n.downloadFormats;const i=(0,a.kI)(n);if((0,y.H)(i)&&e.downloadFormats){const t=(0,b.g)(i),r=e.downloadFormats.map((e=>{const t=(0,a.kI)(e);return delete t.label,t}));t.formats=r,(0,f.t)("extendedProps.downloads",t,i,!0)}return i.extent=(null===(r=e.location)||void 0===r?void 0:r.extent)||[],i}},465903:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(282526),i=r(958328),s=r(170209),o=r(815985),a=r(329644),c=r(570900),u=r(769759),l=r(636137),d=r(634250),p=r(620450),h=r(803754),m=r(610924);const f=(e,t)=>{const r=(0,a.kI)(e);return r.params=Object.assign(Object.assign({},r.params),{"fields[datasets]":"slug,boundary,extent,recordCount,searchDescription,statistics"}),t&&(r.params["filter[slug]"]=t),r},g=e=>{const{itemId:t,layerId:r}=(0,u.tS)(e.id),n=r&&parseInt(r,10),{slug:i,boundary:s,extent:o,recordCount:a,searchDescription:c,statistics:l}=e.attributes;return{itemId:t,layerId:n,slug:i,boundary:s,extent:o,recordCount:a,searchDescription:c,statistics:l}},y=async(e,t)=>{try{const r=await(0,l.$)(`/datasets/${e}`,f(t));return g(r.data)}catch(e){return{errors:(0,o.g)(e)}}};var b=r(653609);const v=async(e,t)=>{const r=await(0,s.rV)(e,t);r.url=(0,h.b7)(r,t)||r.url;
20const n=(null==t?void 0:t.enrichments)||(e=>{const t=["groupIds","metadata","ownerUser","org"];return(e=>{const t=(0,h.KF)(e),r=(0,m._)(t);return(0,p.q)(["template","solution"],r)||(0,p.q)(["Web Map","Web Scene","Feature Service"],t)})(e)&&t.push("data"),(0,d.TD)(e.url)?t.concat("server","layers"):t})(r),a=await(0,o.Z)(r,n,t);return(async(e,t)=>{const{item:r}=e;let{layers:n}=e,s=n&&(0,h.l$)(r,n,t&&t.layerId);if(s&&!s.type){const e=(0,i.pW)(r.url)+"/"+s.id,o=Object.assign({url:e},t);s=await(0,i.Hs)(o),n=n.map((e=>e.id===s.id?s:e))}return Object.assign(Object.assign({},e),{layers:n})})(Object.assign(Object.assign({},a),{item:r}),t)},w=async(e,t)=>{const r=(0,u.hb)(e)?await(async(e,t)=>{let r=await(async(e,t)=>{const r=await(0,l.$)("/datasets",f(t,e));return g(r.data[0])})(e,t);const{itemId:i}=r;let{layerId:s}=r;const o=await v(i,t),{item:u}=o,d=(0,n._T)(o,["item"]),p=t&&t.layerId;return(0,a.kK)(p)||p===s||(s=p,r=Object.assign(Object.assign({},r),await y(`${i}_${s}`,t))),(0,h.Hk)(u,Object.assign(Object.assign(Object.assign({requestOptions:t},d),r),{layerId:s,slug:e,errors:(0,c.q)([d.errors,r.errors])}))})((0,u.tl)(e,null==t?void 0:t.siteOrgKey),t):await(async(e,t)=>{const{itemId:r}=(0,u.tS)(e),i=await v(r,t),{item:s}=i,o=(0,n._T)(i,["item"]),l=t&&t.layerId,d=(0,b.HH)(s,t)?await y(e,t):{},p=d.layerId;return(0,h.Hk)(s,Object.assign(Object.assign(Object.assign({requestOptions:t},o),d),{layerId:(0,a.kK)(l)?p:l,errors:(0,c.q)([o.errors,d.errors])}))})(e,t),{layer:s,type:o}=r,d=!!s&&["Feature Layer","Table"].includes(o);return r.recordCount=d&&((0,a.kK)(r.recordCount)||r.viewDefinition)?await(async(e,t)=>{const{url:r,viewDefinition:n}=e,s=null==n?void 0:n.definitionExpression;try{return(await(0,i.QH)(Object.assign(Object.assign({},t),{url:r,where:s,returnCountOnly:!0}))).count}catch(e){return 1/0}})(r,t):r.recordCount,r}},301146:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var n=r(465903),i=r(815985),s=r(888213),o=r(563467),a=r(803754),c=r(466674),u=r(210220);const l=async(e,t,r)=>{const l=Object.assign(Object.assign({},t),{enrichments:[]}),{item:d}=await(0,n.Z)(e,l),p=await async function(e,t,r){const n={};r||(r=function(e){const t=["metadata","schedule"];return(0,s.c)(e.url)&&t.push("server"),t}(e));const a=["schedule"],c=r.filter((e=>!a.includes(e)));if(c.length){const r=await(0,i.Z)(e,c,t);c.forEach((e=>{n[e]=r[e]}))}return r.includes("schedule")&&(n.schedule=await async function(e,t){let r;if((0,o.zJ)(t,e.access))try{const{schedule:n}=await(0,o.MP)(e.id,t);r=n||{mode:"automatic"}}catch(t){console.warn("Failed to fetch schedule for item",e.id,t)}return r}(e,t)),n}(d,t,r),h=(0,a.KF)(d);return(0,c.t)("type",h,d),(0,u.l)({item:d},t,p)}},610924:(e,t,r)=>{"use strict";r.d(t,{P:()=>s,_:()=>i});var n=r(75975);function i(e){let t;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;case"hub project":t="project";break;case"discussion":t="discussion";break;case"event":t="event";break;case"hub initiative":t="initiative";break;case"organization":t="organization";break;default:t={other:"content",solution:"template"}[r=(0,n._)(e)]||r}var r;return t}function s(e){let t;switch(e.toLowerCase()){case"content":t=(0,n.o)("other"),t=t.concat(["CAD Drawing","Feature Collection Template","Report Template"]);break;case"template":t=[...(0,n.o)("template"),...(0,n.o)("solution")];break;case"dataset":t=(0,n.o)(e.toLowerCase()).filter((e=>"Feature Collection Template"!==e&&"Raster Layer"!==e&&"Microsoft Excel"!==e)),t=t.concat("Image Service");break;case"map":t=(0,n.o)(e.toLowerCase()).filter((e=>"Image Service"!==e)),t=t.concat(["Raster Layer"]);break;case"document":t=(0,n.o)(e.toLowerCase()).filter((e=>"CAD Drawing"!==e&&"Report Template"!==e)),t=t.concat("Microsoft Excel");break;case"project":t=["Hub Project"];break;case"discussion":t=["Discussion"];break;case"initiative":t=["Hub Initiative"];break;default:t=(0,n.o)(e.toLowerCase())}return t}},599045:(e,t,r)=>{"use strict";function n(e){return s(e.type,e.typeKeywords)}function i(e){return s(e.type,e.typeKeywords)}function s(e,t=[]){return"Feature Service"===e&&t.includes("Hosted Service")}function o(e){return!!e&&e.includes("arcgis.com")&&/(feature)server(\/|\/(\d+))?$/i.test(e)&&!a(e)}function a(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}var c;function u(e,t){return(t.capabilities||"").split(",").includes(e)}function l(e,t){const r=u(e,t)?function(e,t){const r=t.capabilities.split(",").filter((t=>t!==e)).join(",");return Object.assign(Object.assign({},t),{capabilities:r})}(e,t):function(e,t){const r=(t.capabilities||"").split(",").filter((e=>!!e)).concat(e).join(",");return Object.assign(Object.assign({},t),{capabilities:r})}(e,t);return r}r.d(t,{E8:()=>i,Et:()=>o,F7:()=>l,GY:()=>c,ZM:()=>n,bI:()=>u,wx:()=>a}),function(e){e.EXTRACT="Extract",e.QUERY="Query"}(c||(c={}))},906213:(e,t,r)=>{"use strict";r.d(t,{QA:()=>$.Q,cq:()=>j,sw:()=>N,GY:()=>G.GY,v9:()=>n.v9,tl:()=>m.tl,Hk:()=>n.Hk,Te:()=>M,K1:()=>P.createContent,J4:()=>E,IZ:()=>T,yd:()=>P.deleteContent,Bp:()=>P.B,vl:()=>F.v,Z$:()=>k.Z,Jn:()=>x.J,SE:()=>H,n3:()=>y,WZ:()=>w,oB:()=>n.oB,iN:()=>C,_A:()=>i._,Pp:()=>i.P,O1:()=>n.O1,l$:()=>n.l$,Oi:()=>n.Oi,Tf:()=>n.Tf,ve:()=>n.ve,b7:()=>n.b7,_8:()=>D,r$:()=>v,yu:()=>b,bI:()=>G.bI,Et:()=>G.Et,N:()=>n.N,E8:()=>G.E8,ZM:()=>G.ZM,F4:()=>n.F4,wx:()=>G.wx,Z6:()=>n.Z6,hb:()=>m.hb,iV:()=>S,lF:()=>U.l,KF:()=>n.KF,tS:()=>
20m.tS,UY:()=>n.UY,d5:()=>m.d5,OG:()=>I,F7:()=>G.F7,x0:()=>P.updateContent});var n=r(803754),i=r(610924),s=r(282526),o=r(75975),a=r(316875),c=r(620450),u=r(279671),l=r(625873),d=r(634250),p=r(653609),h=r(329644),m=r(769759),f=r(958328),g=r(888213);function y(e=""){console.warn("DEPRECATED: Use getFamily() instead. getCategory will be removed at the next breaking version");const t=(0,o._)(e);return"feedback"===t?"app":t}function b(e=""){return a.b[e.toLowerCase()]}function v(e={}){console.warn("DEPRECATED: getTypeCategories will be removed at the next breaking version");const t=y((0,n.KF)(e));if(t){const e=Array.from(t);return e[0]=e[0].toUpperCase(),[e.join("")]}return["Other"]}function w(e,t){if((0,c.q)(["template","feedback"],e.family))return e.id;if((0,p.r9)(e.type,e.typeKeywords)){const r=((0,l.W)(t,"data.values.pages")||[]).find((t=>t.id===e.id));return r?r.slug:e.id}if(e.slug){let r;const n=(0,l.W)(t,"domainInfo.orgKey");return r=(0,l.W)(t,"data.values.isUmbrella")?e.slug:(0,m.d5)(e.slug,n),r}return e.hubId||e.id}function S(e){return(0,n.Hk)(e)}function E(e){const t=T(e),{errors:r,boundary:i,metadata:s,slug:o,groupIds:a,orgId:c,orgName:u,organization:l,orgExtent:d,server:p,layers:h,layer:m,recordCount:f,statistics:g,extent:y,searchDescription:b}=e.attributes,v=m&&m.id,w=c&&{id:c,name:u||l,extent:d};return(0,n.Hk)(t,{layerId:v,slug:o,errors:r,metadata:s||null,groupIds:a,org:w,server:p,layers:h,recordCount:f,boundary:i,extent:y,searchDescription:b,statistics:g})}function T(e){if(!e)return;const{id:t,attributes:r}=e;if(!r)return;const{itemId:n}=(0,m.tS)(t),{owner:i,orgId:s,created:o,modified:a,name:c,title:u,type:l,typeKeywords:p,description:h,snippet:f,tags:g,thumbnail:y,categories:b,contentStatus:v,spatialReference:w,accessInformation:S,licenseInfo:E,culture:T,url:I,access:C,proxyFilter:A,properties:O,appCategories:_,industries:D,languages:P,largeThumbnail:k,banner:x,screenshots:R,listed:U,ownerFolder:M,size:N,protected:j,commentsEnabled:$,numComments:F,numRatings:G,avgRating:L,numViews:H,itemControl:B,scoreCompleteness:W,itemExtent:q,itemModified:V,modifiedProvenance:K,serviceSpatialReference:z}=r;return{id:n,owner:i,orgId:s,created:o,modified:V||"item.modified"===K&&a,title:u||c,type:I&&(0,d.Gb)(I)||l,typeKeywords:p,description:h,tags:g,snippet:f,thumbnail:y,extent:q||[],categories:b,contentStatus:v,spatialReference:w||z,accessInformation:S,licenseInfo:E,culture:T,url:I,access:C,size:N,protected:j,proxyFilter:A,properties:O,appCategories:_,industries:D,languages:P,largeThumbnail:k,banner:x,screenshots:R,listed:U,ownerFolder:M,commentsEnabled:$,numComments:F,numRatings:G,avgRating:L,numViews:H,itemControl:B,scoreCompleteness:W}}const I=(e,t)=>{const r=(0,n.KF)(Object.assign(Object.assign({},e.item),{type:t})),s=(0,i._)(r),o=(0,n.oB)(r),a=C(r,e.isProxied),c=Object.assign(Object.assign({},e),{type:r,family:s,contentTypeIcon:o,contentTypeLabel:a});return A(c,{relative:O(c)})},C=(e,t)=>t?"CSV":(0,h._A)(e||""),A=(e,t)=>
20{const r=Object.assign(Object.assign({},e.urls),t);return Object.assign(Object.assign({},e),{urls:r})},O=(e,t)=>(0,p.bC)(e.type,t||e.identifier,e.typeKeywords),_=e=>({kind:"service",service:{availability:e}});async function D(e,t){const{timeout:r=3e3}=t,n=(0,s._T)(t,["timeout"]),{url:i}=e;if(!i)return _("available");const o=i.includes("?");if((0,g.c)(o?i.split("?")[0]:i)){const e=(0,f.ko)(Object.assign({url:i},n)).then((()=>_("available"))).catch((e=>{if(e.response){const t=e.response.error.code,r=[401,403,499].includes(t);return _(r?"auth-required":"unavailable")}return _("auth-required")}));return Promise.race([e,await(0,u.D)(r)]).then((e=>e||_("slow")))}return _("available")}var P=r(114443),k=r(465903),x=r(301146),R=r(466674),U=r(210220);const M=(e,t,r)=>{const i=(0,h.kI)(e),s=(0,n.KF)(e);return(0,R.t)("type",s,i),(0,U.l)({item:i},t,r)};var N,j,$=r(14987),F=r(770519);!function(e){e.DOWNLOAD="download",e.UPDATE="update"}(N||(N={})),function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info"}(j||(j={}));var G=r(599045),L=r(826899);async function H(e,t){const r=["types","statuses"];if(r.some((e=>t[e])))throw new L.Z("fetchItemJobRecords",`The following options are not yet implemented: ${r.join(", ")}`);const{context:n}=t,i=`${n.hubUrl}/api/download/v1/items/${e}/errors${function(e){const t=new URLSearchParams;e.from&&t.append("fromDate",e.from),e.to&&t.append("toDate",e.to),e.limit&&t.append("limit",e.limit.toString());const r=t.toString();return r&&`?${r}`}(t)}`,{errors:s}=await fetch(i).then((e=>e.json()));return s.map(B)}function B(e){return{type:N.DOWNLOAD,message:e.message,created:new Date(e.timestamp).getTime(),layerId:e.layerId,id:null,status:null,messageId:null,modified:null}}},563467:(e,t,r)=>{"use strict";r.d(t,{MP:()=>o,xV:()=>a,zJ:()=>c});var n=r(329644),i=r(910968),s=r(653609);const o=async(e,t)=>{const r=await fetch((0,s.oR)(e,t)),n=await r.json();if(!r.ok||404===n.statusCode)return{message:`Download schedule not found for item ${e}`,statusCode:404,schedule:null};if("manual"===n.mode)return{schedule:{mode:"manual"},message:`Download schedule found for item ${e}`,statusCode:200};switch(delete n.itemId,n.cadence){case"daily":case"weekly":case"monthly":case"yearly":return{schedule:Object.assign(Object.assign({},n),{mode:"scheduled"}),message:`Download schedule found for item ${e}`,statusCode:200}}},a=async(e,t)=>{const r=await o(e.id,t);return"automatic"===e.schedule.mode&&404===r.statusCode?{message:"No schedule set, and incoming schedule is automatic.",statusCode:404}:(0,i.v)(e.schedule,r.schedule)?{message:"No action needed as schedules deepEqual each other."}:"automatic"===e.schedule.mode?await(async(e,t)=>{const r=(0,s.oR)(e,t),n=await fetch(r,{method:"DELETE",headers:{accept:"application/json"}});return Object.assign(Object.assign({},await n.json()),{statusCode:n.status})})(e.id,t):await(async(e,t,r)=>{const i=(0,n.kI)(t);"manual"!==i.mode&&delete i.mode;const o=(0,s.oR)(e,r),a={method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify(Object.assign(Object.assign({},i),{itemId:e}))},c=await fetch(o,a);return Object.assign(Object.assign({},await c.json()),{statusCode:c.status})})(e.id,e.schedule,t)},c=(e,t)=>{var r,n;const i=null===(r=e.authentication)||void 0===r?void 0:r.token;return(null===(n=e.portal)||void 0===n?void 0:n.includes("arcgis.com"))&&"public"===t&&!!i}},210220:(e,t,r)=>{"use strict";r.d(t,{l:()=>m});var n=r(178749),i=r(778060),s=r(902815),o=r(881554),a=r(653609),c=r(952567),u=r(599045),l=r(578506),d=r(625873),p=r(888213);function h(e,t,r){return{kind:null,metadata:t.metadata,additionalResources:(0,a.rL)(e,t.metadata,r),downloads:(0,d.W)(e,"properties.downloads")}}function m(e,t,r){return function(e,t,r,n={}){let i;r.authentication&&(i=r.authentication.token),t=(0,l.k)(e.item,t);const m=(0,s.S)(e.item,r,i);if(t.thumbnailUrl=m,t.links={self:(0,o.$)(t.id,r),siteRelative:(0,a.bC)(t.type,t.slug||t.id,t.typeKeywords),siteRelativeEntityType:(0,a.bC)(t.type),workspaceRelative:(0,c.C)("content",t.id),thumbnail:m,contentEditUrl:(0,a.OA)(e.item,r)},t.licenseInfo=e.item.licenseInfo||"",t.schedule=n.schedule,t.extendedProps=(0,p.c)(t.url)?function(e,t,r){const n=h(e,t,r),i=Object.assign(Object.assign({},n),{kind:"service"});if(t.server){i.server=t.server,i.serverQueryCapability=(0,u.bI)(u.GY.QUERY,t.server),i.serverExtractCapability=(0,u.bI)(u.GY.EXTRACT,t.server);const e=(0,d.W)(t,"server.supportedExportFormats");i.serverExtractFormats=e&&e.split(",")}return i}(e.item,n,r):function(e,t,r){const n=h(e,t,r);return Object.assign(Object.assign({},n),{kind:"content"})}(e.item,n,r),n.server){t.serverQueryCapability=(0,u.bI)(u.GY.QUERY,n.server),t.serverExtractCapability=(0,u.bI)(u.GY.EXTRACT,n.server);const e=(0,d.W)(n,"server.supportedExportFormats");t.serverExtractFormats=e&&e.split(",")}return n.metadata&&(t.additionalResources=(0,a.rL)(e.item,n.metadata,r)),t}(e,new n.c7((0,i.s)()).storeToEntity(e,{}),t,r)}},770519:(e,t,r)=>{"use strict";r.d(t,{v:()=>h});var n=r(815985),i=r(625873),s=r(902815),o=r(295426),a=r(881554),c=r(329644),u=r(76309),l=r(610924),d=r(653609),p=r(952567);async function h(e,t,r){const h={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,tags:e.tags,typeKeywords:e.typeKeywords,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,l._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,d.jA)(e),rawResult:e},m=(t=[...t].filter(c.Tw)).map(o.u),f=(0,u.e)("enrichment",m).filter(c.Tw);let g={};return f.length&&(g=await(0,n.Z)(e,f,r)),m.forEach((e=>{h[e.prop]=(0,i.W)(g,e.path)})),h.links.thumbnail=(0,s.S)(e,r),h.links.self=(0,a.$)(h.id,r),h.links.siteRelative=(0,d.bC)(h.type,h.id,e.typeKeywords),h.links.workspaceRelative=(0,p.C)(h.type,h.id),h}},769759:(e,t,r)=>{"use strict";r.d(t,{d5:()=>a,hb:()=>s,tS:()=>i,tl:()=>o});var n=r(869787);function i(e){const[t,r]=e?e.split("_"):[];return{itemId:t,layerId:r}}function s(e){const{itemId:t}=i(e);return!(!t||(0,n.k)(t))}function o(e,t){return/.+::.+/.test(e)?e:`${t}::${e}`}function a(e,t){return t&&e.match(`^${t}::`)?e.split(`${t}::`)[1]:e}},954554:(e,t,r)=>{"use strict";r.d(t,{c:()=>E});var n=r(14987),i=r(369802),s=r(272498),o=r(494401),a=r(508435),c=r(806050),u=r(254471),l=r(684243),d=r(481133),p=r(515084),h=r(54430),m=r(832132),f=r(934647),g=r(50950),y=r(329644);const b={};var v=r(348753);class w{constructor(e,t){this.isDestroyed=!1,this.entity=e,this.context=t}static fromJson(e,t){const r=this.applyDefaults(e);return new w(r,t)}static applyDefaults(e){return Object.assign(Object.assign({},b),e)}toJson(){return(0,y.kI)(this.entity)}async save(){if(this.isDestroyed)throw new Error("HubUser is already destroyed.");if(await this.context.updateUserHubSettings(this.entity.settings),this.context.
20isCommunityOrg&&this.context.isOrgAdmin&&this.entity.hubOrgSettings){const{hubOrgSettings:e}=this.entity,t={signupText:e.enableSignupText&&e.signupText?e.signupText:"",termsAndConditions:e.enableTermsAndConditions&&e.termsAndConditions?e.termsAndConditions:""};await async function(e,t){if(!t.currentUser)throw new Error("User is not authenticated");if(!t.isCommunityOrg||!t.isOrgAdmin)throw new Error("User is not an org admin in the current community org");const{termsAndConditions:r,signupText:n}=e,i=`${t.portalUrl}/sharing/rest/portals/self/setSigninSettings?f=json`,s=!n||!r;return(0,v.WY)(i,{httpMethod:"POST",params:{termsAndConditions:r,signupText:n,clearEmptyFields:s,token:t.hubRequestOptions.authentication.token}})}(t,this.context)}this.context.isOrgAdmin&&this.entity.hubOrgSettings&&Object.prototype.hasOwnProperty.call(this.entity.hubOrgSettings,"showInformationalBanner")&&await async function(e,t){if(!t.currentUser)throw new Error("User is not authenticated");if(!t.isOrgAdmin)throw new Error("User is not an org admin in the current org");const r=(0,y.kI)(t.portal.portalProperties),{showInformationalBanner:n}=e;r.hub.settings.informationalBanner=n;const i=`${t.portalUrl}/sharing/rest/portals/self/update?f=json`;return(0,v.WY)(i,{httpMethod:"POST",params:{portalProperties:JSON.stringify(r),token:t.hubRequestOptions.authentication.token}})}(this.entity.hubOrgSettings,this.context)}async delete(){if(this.isDestroyed)throw new Error("HubUser is already destroyed.");this.isDestroyed=!0}async getEditorConfig(e,t){return(0,f.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,g.t)((0,y.kI)(this.entity),t,this.context.hubRequestOptions):(0,y.kI)(this.entity)}async fromEditor(e){const t=(0,y.kI)(e);return this.entity=t,await this.save(),this.entity}}var S=r(647137);class E{constructor(e){this.instance=e}static fromEntity(e,t){const r=(0,h.Q)(e);let f;if("project"===r&&(f=u.M.fromJson(e,t)),"initiative"===r&&(f=o.M.fromJson(e,t)),"content"===r&&(f=n.Q.fromJson(e,t)),"site"===r&&(f=l.g.fromJson(e,t)),"page"===r&&(f=c.T.fromJson(e,t)),"discussion"===r&&(f=i.G.fromJson(e,t)),"template"===r&&(f=d.P.fromJson(e,t)),"channel"===r&&(f=S.l.fromJson(e,t)),"survey"===r&&(f=p.V.fromJson(e,t)),"event"===r&&(f=m.q.fromJson(e,t)),"group"===r&&(f=s.w.fromJson(e,t)),"initiativeTemplate"===r&&(f=a.f.fromJson(e,t)),"user"===r&&(f=w.fromJson(e,t)),f)return new E(f);throw new Error(`Unsupported entity type: ${e.type}`)}async getConfig(e,t){return this.instance.getEditorConfig(e,t)}toEditor(e={},t=[]){return this.instance.toEditor(e,t)}async save(e,t){return this.instance.fromEditor(e,t)}}},656110:(e,t,r)=>{"use strict";r.d(t,{x:()=>y});var n=r(170209),i=r(826899),s=r(225198),o=r(540702),a=r(932818),c=r(535794),u=r(745260),l=r(676432),d=r(252934),p=r(902815),h=r(329644),m=r(258552),f=r(85738);const g="featuredImage.png";class y{constructor(e,t){this.isDestroyed=!1,this.thumbnailCache=null,this.context=t,this.entity=e}checkPermission(e){return(0,l.P)(e,this.context,this.entity)}getPermissionPolicies(e){return(this.entity.permissions||[]).filter((t=>t.permission===e))}addPermissionPolicy(e){this.entity.permissions=(0,d.a)(this.entity.permissions,e)}removePermissionPolicy(e,t){this.entity.permissions=(0,d.T)(this.entity.permissions,e,t)}get id(){return this.entity.id}get owner(){return this.entity.owner}toJson(){if(this.isDestroyed)throw new Error("Entity is already destroyed.");return(0,h.kI)(this.entity)}get canEdit(){return this.entity.canEdit}get canDelete(){return this.entity.canDelete}get orgId(){return this.entity.orgId}async shareWithGroup(e){if(!this.context.currentUser)throw new i.Z("Share Item With Group","Cannot share item with group when no user is logged in.");await(0,a.L)(this.entity.id,[e],this.context.requestOptions,this.entity.owner)}async shareWithGroups(e){await(0,a.L)(this.entity.id,e,this.context.requestOptions,this.entity.owner)}async unshareWithGroup(e){await(0,o.z)(this.entity.id,[e],this.context.requestOptions,this.entity.owner)}async unshareWithGroups(e){await(0,o.z)(this.entity.id,e,this.context.requestOptions,this.entity.owner)}async setAccess(e){await(0,n.zT)({id:this.entity.id,access:e,owner:this.entity.owner,authentication:this.context.session}),this.entity.access=e}async getFollowersGroup(){let e;try{this.entity.followersGroupId&&(e=await(0,n.ex)(this.entity.followersGroupId,this.context.userRequestOptions))}catch(t){e=null}return e}async setFollowersGroupAccess(e){await(0,n.mD)({group:{id:this.entity.followersGroupId,access:e},authentication:this.context.session})}async setFollowersGroupIsDiscussable(e){const t=await this.getFollowersGroup(),r=(0,f.Wb)(t.typeKeywords,e);await(0,n.mD)({group:{id:t.id,typeKeywords:r},authentication:this.context.session})}async sharedWith(){return(0,m.x)(this.entity.id,this.context.requestOptions)}async afterSave(){this.thumbnailCache&&(this.thumbnailCache.clear?(await(0,c.f)(this.entity.id,this.entity.owner,this.context.userRequestOptions),this.thumbnailCache=null,this.entity.thumbnail=null,this.entity.thumbnailUrl=null):(await(0,u._)(this.entity.id,this.thumbnailCache.file,this.thumbnailCache.filename,this.context.userRequestOptions,this.entity.owner),this.entity.thumbnail=`thumbnail/${this.thumbnailCache.filename}`,this.entity.thumbnailUrl=this.getThumbnailUrl(),this.thumbnailCache=null))}setThumbnail(e,t){this.thumbnailCache={file:e,filename:t}}
20clearThumbnail(){this.thumbnailCache={clear:!0}}getThumbnailUrl(e=200){const t={id:this.entity.id,access:this.entity.access,thumbnail:this.entity.thumbnail},r={token:this.context.session.token,width:e};return(0,p.S)(t,this.context.requestOptions,r)}async setFeaturedImage(e,t=!1){var r;try{((null===(r=this.entity.view)||void 0===r?void 0:r.featuredImageUrl)||t)&&await this.clearFeaturedImage();const n=await(0,s.Z)(this.entity.id,this.entity.owner,e,g,this.context.userRequestOptions);this.entity.view=Object.assign(Object.assign({},this.entity.view),{featuredImageUrl:n}),await this.save()}catch(t){if(t instanceof Error&&"CONT_00942: Resource already present"===t.message)return this.setFeaturedImage(e,!0);throw t}}async clearFeaturedImage(){try{const e=await(0,n.ug)(Object.assign({id:this.entity.id,owner:this.entity.owner,resource:g},this.context.userRequestOptions));if(e&&!e.success)throw new i.Z("Clear Item Featured Image","Unknown error clearing featured image.");this.entity.view.featuredImageUrl=null,await this.save()}catch(e){throw e instanceof Error?new i.Z("Clear Item Featured Image",e.message,e):new i.Z("Clear Item Featured Image","Unknown error clearing featured image.")}}updateIsDiscussable(e){const t=(0,f.Wb)(this.entity.typeKeywords,e);this.update({typeKeywords:t,isDiscussable:e})}}},178749:(e,t,r)=>{"use strict";r.d(t,{Bl:()=>l,c7:()=>u,nc:()=>d});var n=r(664879),i=r(85738),s=r(625873),o=r(466674),a=r(422897),c=r(329644);class u{constructor(e){this.mappings=e}storeToEntity(e,t){const r=d(e,t,this.mappings);if((0,s.W)(e,"item")){const t=(0,s.W)(e,"item");(0,o.t)("canEdit",["admin","update"].includes(t.itemControl),r),(0,o.t)("canDelete","admin"===t.itemControl,r),(0,o.t)("canRecycle",t.canRecycle||!1,r),(0,o.t)("protected",t.protected,r)}return r}entityToStore(e,t){return l(e,t,this.mappings)}}function l(e,t,r){if((0,s.W)(t,"item")){const r=(0,s.W)(t,"item");r.typeKeywords&&(r.typeKeywords=(0,s.W)(e,"isDiscussable")?r.typeKeywords.filter((e=>e!==n.f)):[...r.typeKeywords,n.f],(0,o.t)("item.typeKeywords",r.typeKeywords,t))}return p(e,"entityKey",t,"storeKey",r)}function d(e,t,r){if((0,s.W)(e,"item")){const r=(0,s.W)(e,"item");(0,o.t)("isDiscussable",(0,i.BV)(r),t)}return p(e,"storeKey",t,"entityKey",r)}function p(e,t,r,n,i){const o=(0,c.kI)(r);return i.forEach((r=>{const i=(0,s.W)(r,t),c=(0,s.W)(r,n),u=(0,s.W)(e,i);null!=u&&(0,a.q)(o,c,u,!0)})),o}},389094:(e,t,r)=>{"use strict";r.d(t,{g:()=>c});var n=r(881554),i=r(879605),s=r(952567),o=r(902815),a=r(653609);function c(e,t){let r;return t.authentication&&(r=t.authentication.token),{self:(0,n.$)(e.id,t),siteRelative:(0,a.bC)(e.type,(0,i.v)(e),e.typeKeywords),siteRelativeEntityType:(0,a.bC)(e.type),workspaceRelative:(0,s.C)(e.type,e.id),thumbnail:(0,o.S)(e,t,r)}}},578506:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(653609),i=r(85738);function s(e,t){return t.createdDate=new Date(e.created),t.createdDateSource="item.created",t.updatedDate=new Date(e.modified),t.updatedDateSource="item.modified",t.location=t.location||(0,n.jA)(e),t.isDiscussable=(0,i.BV)(e),t}},247576:(e,t,r)=>{"use strict";r.d(t,{_:()=>c,h:()=>u});var n=r(561037),i=r(61285),s=r(407070),o=r(40805),a=r(130192);function c(e){const t=(0,o._2)(e);if(!t.valid)throw new Error(t.reason);const r=[];for(let e=0;e<t.parts.length;e+=2){const n=(0,o.Zb)(t.parts[e]);r.push({hubEntityType:n,id:t.parts[e+1]})}return r.reverse()}async function u(e,t,r,o){const c=Date.now(),u={identifier:e,isContained:!1,catalogInfo:{},duration:0};if(!r||0===r.length)return Promise.resolve(u);u.isContained=!0;const l=r.map(((r,i,s)=>{const o=0===i,c={id:r.id,hubEntityType:r.hubEntityType,idToFind:o?e:s[i-1].id,entityType:o?(0,n.x)(t):(0,a.w)(s[i-1].hubEntityType)};return r.catalog&&(c.catalog=r.catalog),c}));await(0,s.M)(l,(async e=>{let t;if(e.catalog)t=i.g.fromJson(e.catalog,o);else{const r={hubEntityType:e.hubEntityType,prop:"catalog"};t=await i.g.init(e.id,o,r)}u.catalogInfo[e.id]={id:e.id,hubEntityType:e.hubEntityType,catalog:t.toJson()};const r=await t.contains(e.idToFind,{entityType:e.entityType});r.isContained||(u.isContained=r.isContained,u.reason=`Entity ${e.idToFind} not contained in catalog ${e.id}`)}));const d=(new Date).getTime();return u.duration=d-c,u}},551076:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(194849);function i(){const e=Object.keys(n.P),t=[];return["access","created","culture","description","extent","id","itemControl","modified","owner","tags","categories","type","typeKeywords","thumbnail","url","orgId"].forEach((e=>{t.push({entityKey:e,storeKey:`item.${e}`})})),["display","geometry","view","associations","catalogs","assistant"].forEach((e=>{t.push({entityKey:e,storeKey:`data.${e}`})})),e.forEach((e=>{t.push({entityKey:e,storeKey:`resources.${e}`})})),t.push({entityKey:"slug",storeKey:"item.properties.slug"}),t.push({entityKey:"summary",storeKey:"item.snippet"}),t.push({entityKey:"schemaVersion",storeKey:"item.properties.schemaVersion"}),t.push({entityKey:"orgUrlKey",storeKey:"item.properties.orgUrlKey"}),t.push({entityKey:"name",storeKey:"item.title"}),t.push({entityKey:"boundary",storeKey:"item.properties.boundary"}),t.push({entityKey:"discussionSettings",storeKey:"entitySettings.settings.discussions"}),t.push({entityKey:"entitySettingsId",storeKey:"entitySettings.id"}),t}},144219:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});const n=e=>{const{slug:t="",orgUrlKey:r}=e;return r?t.replace(`${r}|`,""):t}},258552:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(170209);async function i(e,t){const r=await(0,n.tX)(e,t);return[...r.admin,...r.member,...r.other]}},821699:()=>{},894583:()=>{},670130:()=>{},883399:()=>{},397002:()=>{},421281:()=>{},437910:()=>{},382237:()=>{},928006:(e,t,r)=>{"use strict";r.r(t);var n=r(397002),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(894583);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(437910);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(421281);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);
20var c=r(670130);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(883399);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i);var l=r(382237);i={};for(const e in l)"default"!==e&&(i[e]=()=>l[e]);r.d(t,i);var d=r(821699);i={};for(const e in d)"default"!==e&&(i[e]=()=>d[e]);r.d(t,i)},563292:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(769418),i=r(869787),s=r(583872);async function o(e,t,r,o={}){const a={identifier:e,isContained:!1},c={};(0,i.k)(e)||(0,n.l)(e)?c.id=e:c.typekeywords=`slug|${e}`;const u=[];if(o.entityType)if(t.scopes&&t.scopes[o.entityType])u.push({targetEntity:o.entityType,filters:[{predicates:[c]}]});else{const e=(t.collections||[]).filter((e=>e.targetEntity===o.entityType));if(!e.length)return Promise.resolve(a);e.forEach((e=>{u.push({targetEntity:e.targetEntity,filters:[{predicates:[c]},...e.scope.filters]})}))}else Object.keys(t.scopes).forEach((e=>{u.push({targetEntity:e,filters:[{predicates:[c]}]})}));const l=await Promise.all(u.map((e=>(t.scopes[e.targetEntity]&&(e.filters=[...e.filters,...t.scopes[e.targetEntity].filters]),(0,s.B)(e,{targetEntity:e.targetEntity,num:10,requestOptions:r.hubRequestOptions})))));return a.isContained=l.reduce(((e,t)=>(t.results.length&&(e=!!c.id||t.results.reduce(((e,t)=>(t.typeKeywords.includes(c.typekeywords)&&(e=!0),e)),!1)),e)),!1),a}},873247:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(625873),i=r(247576);async function s(e,t,r,s,o){let a=[];try{a=(0,i._)(r)}catch(t){return{identifier:e,isContained:!1,catalogInfo:{},duration:0,reason:(0,n.W)(t,"message")||"An error occurred while parsing path."}}return o&&(a=[...a,{id:"root",hubEntityType:"site",catalog:o}]),(0,i.h)(e,t,a,s)}},50950:(e,t,r)=>{"use strict";r.d(t,{t:()=>u});var n=r(76309),i=r(466674),s=r(625873),o=r(170209),a=r(295426),c=r(329644);const u=async(e,t,r)=>{const o=t.map(a.u),u=(0,n.e)("enrichment",o).filter(c.Tw);let d={};return u.length&&(d=await l(e,u,r)),o.forEach((t=>{(0,i.t)(t.prop,(0,s.W)(d,t.path),e)})),e},l=async(e,t,r)=>{const n=t.reduce(((e,t)=>{const r={followersGroup:d}[t];return r&&e.push({enrichment:t,operation:r}),e}),[]),i=n.map((({operation:t})=>t(e,r)));return(await Promise.all(i)).reduce(((e,t,r)=>(e[n[r].enrichment]=t,e)),{})},d=async(e,t)=>{let r={};try{const n=(0,s.W)(e,"followersGroupId");n&&(r=await(0,o.ex)(n,t))}catch(e){return{}}return r}},710755:(e,t,r)=>{"use strict";r.d(t,{z:()=>y});var n=r(434939),i=r(301146),s=r(664218),o=r(579032),a=r(3406),c=r(615555),u=r(713907),l=r(241926),d=r(887381),p=r(442730),h=r(98866),m=r(447694),f=r(351873),g=r(300337);async function y(e,t,r){let y;switch(e){case"project":y=await(0,a.GG)(t,r.requestOptions);break;case"site":y=await(0,c.IN)(t,r.hubRequestOptions);break;case"initiative":y=await(0,s.AM)(t,r.requestOptions);break;case"discussion":y=await(0,n.d)(t,r.hubRequestOptions);break;case"channel":y=await(0,g.fetchHubChannel)(t,r);break;case"page":y=await(0,o.H6)(t,r.hubRequestOptions);break;case"content":y=await(0,i.J)(t,r.requestOptions);break;case"template":y=await(0,u.Dv)(t,r.requestOptions);break;case"group":y=await(0,l.F)(t,r.hubRequestOptions);break;case"survey":y=await(0,p.g)(t,r.hubRequestOptions);break;case"event":y=await(0,h.d)(t,r.hubRequestOptions);break;case"organization":y=await(0,f.Ak)(t,r.requestOptions);break;case"initiativeTemplate":y=await(0,d.cw)(t,r.requestOptions);break;case"user":y=await(0,m.W6)(t,r)}return y}},513149:(e,t,r)=>{"use strict";r.d(t,{q:()=>o});var n=r(989610),i=r(258552),s=r(54430);async function o(e,t){let r;return r="event"===(0,s.Q)(e)?await(0,n.g)(e.id,t):await(0,i.x)(e.id,t.requestOptions),r}},875454:(e,t,r)=>{"use strict";r.d(t,{h:()=>n});const n=e=>{var t;return(null===(t=e.links)||void 0===t?void 0:t.thumbnail)||e.thumbnailUrl}},130192:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(561037);function i(e){return(0,n.x)(e)}},364282:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(54430);function i(e){const t={type:e};return(0,n.Q)(t)}},952567:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(54430),i=r(550499);const s=(e,t,r)=>{let s="/";const o=(0,n.Q)({type:e});if((0,i.C)(o)){let e=o;"content"!==e&&(e=`${e}s`),s=`/workspace/${e}/${t}`,r&&(s+=`/${r}`)}return s}},54430:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});var n=r(610924);function i(e){let t;switch(e.type){case"Hub Site Application":case"Site Application":t="site";break;case"Hub Page":case"Site Page":t="page";break;case"Hub Project":t="project";break;case"Hub Initiative":t="initiative";break;case"Discussion":t="discussion";break;case"Solution":t="template";break;case"Channel":t="channel";break;case"Group":t="group";break;case"Form":t="survey";break;case"Hub Initiative Template":t="initiativeTemplate";break;case"Event":t="event";break;case"User":t="user";break;default:["app","content","dataset","document","map"].includes((0,n._)(e.type||""))&&(t="content")}return t}},166206:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});const n=e=>{let t=[];switch(e){case"site":t=["Hub Site Application","Site Application"];break;case"page":t=["Hub Page","Site Page"];break;case"project":t=["Hub Project"];break;case"initiative":t=["Hub Initiative"];break;
20case"discussion":t=["Discussion"];break;case"template":t=["Solution"];break;case"group":t=["Group"];break;case"initiativeTemplate":t=["Hub Initiative Template"]}return t}},738583:(e,t,r)=>{"use strict";r.d(t,{g:()=>s,j:()=>i});var n=r(329644);function i(e,t){const r="site"===e.type?"sites":"entities";let i=(0,n.kI)(t.entries);const s=i.filter((e=>"site"===e.type)),o=i.filter((e=>"site"!==e.type));return i="site"===e.type?s:o,i=i.filter((t=>t.id!==e.id)),i.length<{sites:10,entities:50}[r]||i.pop(),i.unshift(e),"site"===e.type?t.entries=[...i,...o]:t.entries=[...s,...i],t}function s(e,t){const r=(0,n.kI)(t);return r.entries=r.entries.filter((t=>t.id!==e.id)),r}},563056:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CatalogSchema:()=>a.rv,CollectionSchema:()=>a.Ok,ENTITY_ACCESS_SCHEMA:()=>a.Ri,ENTITY_CATEGORIES_SCHEMA:()=>a.Zh,ENTITY_FEATURED_CONTENT_SCHEMA:()=>a.CR,ENTITY_IMAGE_SCHEMA:()=>a.W6,ENTITY_IS_DISCUSSABLE_SCHEMA:()=>a.PH,ENTITY_LOCATION_SCHEMA:()=>a.JK,ENTITY_MAP_SCHEMA:()=>a.xs,ENTITY_NAME_SCHEMA:()=>a.oG,ENTITY_SUMMARY_SCHEMA:()=>a.Z3,ENTITY_TAGS_SCHEMA:()=>a.Ld,ENTITY_TIMELINE_SCHEMA:()=>a.RF,FilterSchema:()=>a.eq,GalleryDisplayConfigSchema:()=>a.hM,PRIVACY_CONFIG_SCHEMA:()=>a.Vh,PredicateSchema:()=>a.tV,QuerySchema:()=>a.Cm,SITE_ENTITY_NAME_SCHEMA:()=>a.De,SLUG_SCHEMA:()=>a.g0,UiSchemaElementTypes:()=>a.JA,UiSchemaMessageTypes:()=>a.sz,UiSchemaRuleEffects:()=>a.pA,UiSchemaSectionTypes:()=>a.CK,fetchHubEntity:()=>c.z,getEditorConfig:()=>a.M2,getEntityGroups:()=>y.q,getEntityThumbnailUrl:()=>b.h,getEntityTypeFromHubEntityType:()=>w.w,getHubTypeFromItemType:()=>v.T,getRelativeWorkspaceUrl:()=>d.C,getTagItems:()=>a.x3,getTypeFromEntity:()=>u.Q,getTypesFromEntityType:()=>l.g,isValidEntityType:()=>p.C,processActionLink:()=>h.Q,processActionLinks:()=>h.i,setEntityAccess:()=>m.Z,shareEntityWithGroups:()=>f.z,unshareEntityWithGroups:()=>g._,validCardEditorTypes:()=>a.N4,validEditorTypes:()=>a._o,validEntityEditorTypes:()=>a.AH,validEventGalleryCardEditorTypes:()=>a.BX,validFollowCardEditorTypes:()=>a.fV,validStatCardEditorTypes:()=>a.EB});var n=r(189353),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(889558);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(928006);i={};for(const e in o)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService","ExpressionRelationships","MAX_ENTITY_METRICS_ALLOWED","MAX_FEATURED_METRICS_ALLOWED","MetricVisibility","EntityResourceMap","EmbedKind"].indexOf(e)<0&&(i[e]=()=>o[e]);r.d(t,i);var a=r(328811),c=r(710755),u=r(54430),l=r(166206),d=r(952567),p=r(550499),h=r(943224),m=r(4795),f=r(99279),g=r(970402),y=r(513149),b=r(875454),v=r(364282),w=r(130192)},550499:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(874623);const i=e=>n.d.includes(e)},40805:(e,t,r)=>{"use strict";r.d(t,{Jc:()=>i,Zb:()=>s,_2:()=>o,hn:()=>n});const n={initiatives:"initiative",projects:"project",content:"content",events:"event",discussions:"discussion",sites:"site",apps:"content",surveys:"content",maps:"content",datasets:"content",pages:"page"};function i(e){return Object.keys(n).find((t=>n[t]===e))||""}function s(e){return n[e]}function o(e){e&&e.startsWith("/")&&(e=e.slice(1));const t=e.split("/"),r={valid:!0,reason:"",parts:t};if(t.length%2!=0&&(r.valid=!1,r.reason="Path does not contain an even number of parts."),t.length>10&&(r.valid=!1,r.reason="Path is > 5 entities deep."),r.valid){const e=Object.keys(n);for(let n=0;n<t.length;n+=2)e.includes(t[n])||(r.valid=!1,r.reason=`Path contains invalid segment: ${t[n]}.`)}return r}},943224:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,i:()=>i});var n=r(583872);async function i(e,t){return await Promise.all(e.map((async e=>s(e,t))))}async function s(e,t){if("section"===e.kind&&(e.children=await i(e.children,t)),"content"!==e.kind)return e;try{const r={targetEntity:"item",filters:[{predicates:[{id:e.contentId}]}]},{results:i}=await(0,n.B)(r,{requestOptions:t});return delete e.contentId,Object.assign(Object.assign({},e),{kind:"external",href:i[0].links.siteRelative})}catch(t){throw new Error(`Unable to fetch entity: ${e.contentId}`)}}},934647:(e,t,r)=>{"use strict";r.d(t,{getEditorConfig:()=>u});var n=r(329644),i=r(584253);function s(e,t){const r=(0,n.kI)(e);return r.required&&(r.required=[...r.required].filter((e=>
20t.includes(e)))),r.properties&&Object.keys(r.properties).forEach((e=>{-1===t.indexOf(e)&&delete r.properties[e]})),r.allOf&&(r.allOf=r.allOf.map((e=>s(e,t)))),r.if&&(r.if=s(r.if,t)),r.then&&(r.then=s(r.then,t)),r.else&&(r.else=s(r.else,t)),r}function o(e,t){return s(e,function(e){return function(e,t){const r=[];return(0,i.c)(e,((e,t)=>("scope"===t.split(".").pop()&&r.push(e),e))),r.filter(n.Tw)}(e).map((e=>e.split("/")[2])).filter(n.Tw)}(t))}var a=r(611370);const c=(e,t)=>{var r;const i=(0,n.kI)(null===(r=e.properties)||void 0===r?void 0:r._slug);if(!i)return e;let{orgUrlKey:s}=t;s||(s=""),i.maxLength=(0,a.C5)(s);const o=(0,n.kI)(e.allOf)||[],{pattern:c}=i;delete i.pattern;const{id:u}=t;o.push({if:{properties:{_slug:{minLength:1}}},then:{properties:{_slug:{pattern:c}}}},{if:{properties:{_slug:{pattern:c}}},then:{properties:{_slug:{isUniqueSlug:{id:u,orgUrlKey:s}}}}});const l=(0,n.kI)(e);return l.properties._slug=i,l.allOf=o,l};async function u(e,t,i,s){return async function(e,t,i,s){let a,u,l;switch(t.split(":")[1]){case"site":const{getSiteSchema:c}=await Promise.resolve().then(r.bind(r,810938));a=c(i.id);const d=await{"hub:site:edit":()=>r.e(37013).then(r.bind(r,537013)),"hub:site:create":()=>r.e(82357).then(r.bind(r,382357)),"hub:site:followers":()=>r.e(31658).then(r.bind(r,631658)),"hub:site:discussions":()=>r.e(72697).then(r.bind(r,272697)),"hub:site:settings":()=>r.e(11445).then(r.bind(r,511445))}[t]();u=await d.buildUiSchema(e,i,s),d.buildDefaults&&(l=await d.buildDefaults(e,i,s));break;case"discussion":const{DiscussionSchema:p}=await Promise.resolve().then(r.bind(r,586973));a=(0,n.kI)(p);const h=await{"hub:discussion:edit":()=>r.e(98111).then(r.bind(r,98111)),"hub:discussion:create":()=>r.e(59505).then(r.bind(r,459505)),"hub:discussion:settings":()=>r.e(38118).then(r.bind(r,838118)),"hub:discussion:settings:discussions":()=>r.e(89866).then(r.bind(r,589866))}[t]();u=await h.buildUiSchema(e,i,s),h.buildDefaults&&(l=await h.buildDefaults(e,i,s));break;case"channel":const{ChannelSchema:m}=await Promise.resolve().then(r.bind(r,596923));a=(0,n.kI)(m);const f=await{"hub:channel:edit":()=>r.e(47569).then(r.bind(r,847569)),"hub:channel:create":()=>r.e(80213).then(r.bind(r,780213))}[t]();u=await f.buildUiSchema(e,i,s),f.buildDefaults&&(l=await f.buildDefaults(e,i,s));break;case"project":const{ProjectSchema:g}=await Promise.resolve().then(r.bind(r,306560));a=(0,n.kI)(g);const y=await{"hub:project:edit":()=>r.e(26915).then(r.bind(r,904302)),"hub:project:create":()=>r.e(59906).then(r.bind(r,959906)),"hub:project:create2":()=>r.e(92017).then(r.bind(r,692017)),"hub:project:metrics":()=>r.e(24588).then(r.bind(r,724588)),"hub:project:settings":()=>r.e(75117).then(r.bind(r,575117))}[t]();u=await y.buildUiSchema(e,i,s),y.buildDefaults&&(l=await y.buildDefaults(e,i,s));break;case"initiative":const{InitiativeSchema:b}=await Promise.resolve().then(r.bind(r,538774));a=(0,n.kI)(b);const v=await{"hub:initiative:edit":()=>r.e(33773).then(r.bind(r,333773)),"hub:initiative:create":()=>r.e(73126).then(r.bind(r,73126)),"hub:initiative:create2":()=>r.e(67110).then(r.bind(r,867110)),"hub:initiative:metrics":()=>r.e(74139).then(r.bind(r,210250)),"hub:initiative:associations":()=>r.e(73365).then(r.bind(r,673365)),"hub:initiative:settings":()=>r.e(46576).then(r.bind(r,746576))}[t]();u=await v.buildUiSchema(e,i,s),v.buildDefaults&&(l=await v.buildDefaults(e,i,s));break;case"page":const{PageSchema:w}=await Promise.resolve().then(r.bind(r,451003));a=(0,n.kI)(w);const S=await{"hub:page:edit":()=>r.e(82669).then(r.bind(r,82669)),"hub:page:create":()=>r.e(61626).then(r.bind(r,161626))}[t]();u=await S.buildUiSchema(e,i,s),S.buildDefaults&&(l=await S.buildDefaults(e,i,s));break;case"content":const{ContentSchema:E}=await Promise.resolve().then(r.bind(r,156739));a=(0,n.kI)(E);const T=await{"hub:content:edit":()=>r.e(27858).then(r.bind(r,927858)),"hub:content:discussions":()=>r.e(57825).then(r.bind(r,757825)),"hub:content:settings":()=>r.e(75229).then(r.bind(r,975229))}[t]();u=await T.buildUiSchema(e,i,s),T.buildDefaults&&(l=await T.buildDefaults(e,i,s));break;case"template":const{TemplateSchema:I}=await Promise.resolve().then(r.bind(r,394379));a=(0,n.kI)(I);const C=await{"hub:template:edit":()=>r.e(83255).then(r.bind(r,483255))}[t]();u=await C.buildUiSchema(e,i,s),C.buildDefaults&&(l=await C.buildDefaults(e,i,s));break;case"group":const{GroupSchema:A}=await Promise.resolve().then(r.bind(r,667902));a=(0,n.kI)(A);const O=await{"hub:group:create:followers":()=>r.e(17761).then(r.bind(r,117761)),"hub:group:create:association":()=>r.e(14570).then(r.bind(r,614570)),"hub:group:create:view":()=>r.e(81775).then(r.bind(r,481775)),"hub:group:create:edit":()=>r.e(59159).then(r.bind(r,59159)),"hub:group:create":()=>r.e(65543).then(r.bind(r,665543)),"hub:group:edit":()=>r.e(77963).then(r.bind(r,877963)),"hub:group:settings":()=>
20r.e(54538).then(r.bind(r,554538)),"hub:group:discussions":()=>r.e(17996).then(r.bind(r,617996))}[t]();u=await O.buildUiSchema(e,i,s),O.buildDefaults&&(l=await O.buildDefaults(e,i,s));break;case"survey":const{SurveySchema:_}=await Promise.resolve().then(r.bind(r,820824));a=(0,n.kI)(_);const D=await{"hub:survey:edit":()=>r.e(43227).then(r.bind(r,943227)),"hub:survey:settings":()=>r.e(99460).then(r.bind(r,799460))}[t]();u=await D.buildUiSchema(e,i,s);break;case"event":const P=await{"hub:event:create":()=>Promise.resolve().then(r.bind(r,661956)),"hub:event:edit":()=>r.e(67425).then(r.bind(r,267425)),"hub:event:registrants":()=>r.e(19718).then(r.bind(r,419718))}[t](),k=await{"hub:event:create":()=>r.e(72659).then(r.bind(r,672659)),"hub:event:edit":()=>r.e(33839).then(r.bind(r,33839)),"hub:event:registrants":()=>r.e(84932).then(r.bind(r,84932))}[t]();a=P.buildSchema(),u=await k.buildUiSchema(e,i,s);break;case"initiativeTemplate":const{InitiativeTemplateSchema:x}=await Promise.resolve().then(r.bind(r,741808));a=(0,n.kI)(x);const R=await{"hub:initiativeTemplate:edit":()=>r.e(4690).then(r.bind(r,804690))}[t]();u=await R.buildUiSchema(e,i,s),R.buildDefaults&&(l=await R.buildDefaults(e,i,s));break;case"user":const{UserSchema:U}=await Promise.resolve().then(r.bind(r,296796));a=(0,n.kI)(U);const M=await{"hub:user:settings":()=>r.e(22426).then(r.bind(r,322426))}[t]();u=await M.buildUiSchema(e,i,s),M.buildDefaults&&(l=await M.buildDefaults(e,i,s));break;case"card":const N=await async function(e,t,i,s){const a=function(e){return e&&e.split(":")[2]}(t);let c,u,l,d,p;switch(a){case"stat":l=Promise.resolve().then(r.bind(r,255861)),d={"hub:card:stat":()=>r.e(28018).then(r.bind(r,828018))}[t],await Promise.all([l,d()]).then((async([t,r])=>{const{MetricSchema:o}=t;c=(0,n.kI)(o),u=await r.buildUiSchema(e,i,s),r.buildDefaults&&(p=r.buildDefaults(e,i,s))}));break;case"follow":l=r.e(66919).then(r.bind(r,166919)),d={"hub:card:follow":()=>r.e(13414).then(r.bind(r,513414))}[t],await Promise.all([l,d()]).then((([t,r])=>{const{FollowSchema:o}=t;c=(0,n.kI)(o),u=r.buildUiSchema(e,i,s)}));break;case"eventGallery":l=r.e(6657).then(r.bind(r,206657)),d=r.e(41194).then(r.bind(r,941194));const[{EventGalleryCardSchema:o},{buildUiSchema:a}]=await Promise.all([l,d]);c=(0,n.kI)(o),u=await a(e,i,s)}return c=o(c,u),Promise.resolve({schema:c,uiSchema:u})}(e,t,i,s);a=N.schema,u=N.uiSchema,l=N.defaults}return a=o(a,u),a=c(a,i),Promise.resolve({schema:a,uiSchema:u,defaults:l})}(e,t,i,s)}},328811:(e,t,r)=>{"use strict";r.d(t,{rv:()=>h,Ok:()=>p,Ri:()=>s.Ri,Zh:()=>s.Zh,CR:()=>s.CR,W6:()=>s.W6,PH:()=>s.PH,JK:()=>s.JK,xs:()=>s.xs,oG:()=>s.oG,Z3:()=>s.Z3,Ld:()=>s.Ld,RF:()=>s.RF,eq:()=>l,hM:()=>c,Vh:()=>s.Vh,tV:()=>u,Cm:()=>d,De:()=>s.De,g0:()=>s.g0,JA:()=>n.JA,sz:()=>n.sz,pA:()=>n.pA,CK:()=>n.CK,M2:()=>i.getEditorConfig,x3:()=>m.x,N4:()=>n.N4,_o:()=>n._o,AH:()=>n.AH,BX:()=>n.BX,fV:()=>n.fV,EB:()=>n.EB});var n=r(426016),i=r(934647),s=r(255582),o=r(322965),a=r(646897);const c={type:"object",properties:{hidden:{type:"boolean",default:!1},layout:{type:"string",enum:["grid","list","map","compact","table","calendar"],default:"list"},layouts:{type:"array",items:{type:"string",enum:["grid","list","map","compact","table","calendar"]},default:[]},cardTitleTag:{type:"string",enum:Object.keys(a.dN),default:a.dN.h3},imageType:{type:"string",enum:["thumbnail","icon"],default:"thumbnail"},showThumbnail:{type:"string",enum:["show","hide","grid"],default:"show"},corners:{type:"string",enum:Object.keys(a.Ne),default:a.Ne.square},shadow:{type:"string",enum:Object.keys(a.SB),default:a.SB.none},showLinkButton:{type:"boolean",default:!1},linkButtonStyle:{type:"string",enum:["outline","outline-filled"],default:"outline-filled"},linkButtonText:{type:"string",default:"Explore"},sort:{type:"string",enum:["relevance","title","created","modified"],default:"relevance"},filters:{type:"array",items:{type:"object",properties:{key:{type:"string",enum:["location","type","source","event-occurrence","event-from","event-attendance","tags","categories","license","modified","access","group-role","group-type","group-access","event-access","event-date"]},hidden:{type:"boolean"},label:{type:"string"}}}}}},u={type:"object",minProperties:1},l={type:"object",minProperties:1,properties:{operation:{type:"string",enum:["AND","OR"]},predicates:{type:"array",items:u,minItems:1}}},d={type:"object",required:["targetEntity"],properties:{targetEntity:{type:"string",enum:[...o.g]},filters:{type:"array",items:l,minItems:1}}},p={type:"object",required:["label"],properties:{label:{type:"string",format:"isNotWhitespace"},scope:d,displayConfig:c}},h={type:"object",properties:{title:{type:"string"},scopes:{type:"object",properties:o.g.reduce(((e,t)=>(e[t]=d,e)),{})},collections:{type:"array",items:p},displayConfig:{type:"object",properties:o.g.reduce(((e,t)=>(e[t]=c,e)),{})}}};var m=r(289380)},289380:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(170209);async function i(e,t,r){try{const i={q:`orgid:${t}`,countFields:"tags",countSize:200,authentication:r.authentication},s=await(0,n.KT)(i),[o]=s.aggregations.counts.map((e=>({mode:"terms",field:e.fieldName,values:e.fieldValues}))),a=e||[];return[...new Set([...o.values.map((e=>e.value)),...a])].filter((e=>e)).map((e=>({value:e})))}catch(e){return[]}}},255861:(e,t,r)=>{"use strict";r.r(t),r.d(t,{MetricSchema:()=>s});var n=r(618604),i=r(646897);const s={type:"object",required:[],properties:{type:{type:"string",enum:Object.keys(n.Hx),default:n.Hx.dynamic},cardTitle:{type:"string"},value:{},valueType:{type:"string",default:"string",enum:["string","number","date"]},dynamicMetric:{type:"object"},allowUnitFormatting:{type:"boolean",default:!1},unit:{type:"string"},unitPosition:{type:"string",default:n.le.after,enum:Object.keys(n.le)},serverTimeout:{type:"number",maximum:95,minimum:5,default:10},subtitle:{type:"string"},trailingText:{type:"string"},textAlign:{type:"string",default:i.Eu.start},allowLink:{type:"boolean",default:!1},allowDynamicLink:{type:"boolean",default:!0},sourceLink:{type:"string"},sourceTitle:{type:"string"},valueColor:{type:"string"},layout:{type:"string",default:n.Cs.simple,enum:Object.keys(n.Cs)},dropShadow:{type:"string",default:i.SB.none,enum:Object.keys(i.SB)},icon:{type:"string",default:n.UZ.caretUp,enum:Object.values(n.UZ)},visualInterest:{type:"string",default:n.i5.none,enum:Object.keys(n.i5)},shareable:{type:"boolean",default:!1},shareableByValue:{type:"boolean",default:!1},shareableOnHover:{type:"boolean",default:!0},popoverText:{type:"string"},publisherText:{type:"string"}},allOf:[{$ref:"#/definitions/if-source-title-then-source-link"},{$ref:"#/definitions/value-type-value-mapping"},{$ref:"#/definitions/if-static-then-url-format"}],definitions:{"if-source-title-then-source-link":{if:{type:"object",properties:{sourceTitle:{not:{const:""}}},required:["sourceTitle"]},then:{required:["sourceLink"]}},"value-type-value-mapping":{if:{type:"object",properties:{valueType:{enum:["string","date"]}}},then:{type:"object",properties:{value:{type:"string"}}},else:{type:"object",properties:{value:{type:"number"}}}},"if-static-then-url-format":{if:{type:"object",properties:{type:{const:n.Hx.static}}},then:{type:"object",properties:{sourceLink:{format:"url"}}}}}}},565305:(e,t,r)=>{"use strict";r.d(t,{Jw:()=>o,No:()=>i,dM:()=>s,eS:()=>a});var n=r(618604);const i={if:{type:"object",properties:{_metric:{type:"object",properties:{type:{const:"static"}}}}},then:{type:"object",properties:{_metric:{type:"object",required:["value"]}}}},s={if:{type:"object",properties:{
21_metric:{type:"object",properties:{sourceTitle:{not:{const:""}}},required:["sourceTitle"]}}},then:{type:"object",properties:{_metric:{type:"object",required:["sourceLink"]}}}},o={if:{type:"object",properties:{_metric:{type:"object",properties:{valueType:{enum:["string","date"]}}}}},then:{type:"object",properties:{_metric:{type:"object",properties:{value:{type:"string"}}}}},else:{type:"object",properties:{_metric:{type:"object",properties:{value:{type:"number"}}}}}},a={if:{type:"object",properties:{_metric:{properties:{type:{const:n.Hx.static}}}}},then:{type:"object",properties:{_metric:{properties:{sourceLink:{format:"url"}}}}}}},741619:(e,t,r)=>{"use strict";r.d(t,{i:()=>s});var n=r(329644),i=r(611370);function s(e,t){var r;const s=e._slug;delete e._slug;const o=(0,n.kI)(e);return o.orgUrlKey=e.orgUrlKey?e.orgUrlKey:t.urlKey||"",o.extent=null===(r=e.location)||void 0===r?void 0:r.extent,o.slug=s?(0,i.Wl)(s,o.orgUrlKey):"",o}},618604:(e,t,r)=>{"use strict";var n,i,s,o,a,c;r.d(t,{Cs:()=>n,Hx:()=>c,UZ:()=>a,i5:()=>o,le:()=>s}),function(e){e.simple="simple",e.informational="informational"}(n||(n={})),function(e){e.small="s",e.medium="m",e.large="l"}(i||(i={})),function(e){e.before="before",e.after="after",e.below="below"}(s||(s={})),function(e){e.none="none",e.icon="icon"}(o||(o={})),function(e){e.caretUp="caret-up",e.caretDown="caret-down",e.caretDouble="caret-double-horizontal"}(a||(a={})),function(e){e.dynamic="dynamic",e.static="static",e.itemQuery="itemQuery"}(c||(c={}))},750713:(e,t,r)=>{"use strict";r.d(t,{I:()=>s});var n=r(551753),i=r(329644);function s(e,t,r){const s=(0,i.kI)(e),o=t.id,a=(0,n.t)(s,"metrics",[]),c=a.findIndex((e=>e.id===o)),u=(0,n.t)(s,"view.metricDisplays",[]),l=u.findIndex((e=>e.metricId===o));return c>-1?a[c]=t:a.push(t),l>-1?u[l]=r:u.push(r),s.view.metricDisplays=u,s.metrics=a,s}},434164:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var n=r(88036),i=r(255582);const s={$async:!0,type:"object",required:["name"],properties:{name:i.oG,summary:i.Z3,description:{type:"string"},access:i.Ri,location:i.JK,tags:i.Ld,categories:i.Zh,isDiscussable:i.PH,_thumbnail:i.W6,_followers:{type:"object",properties:{groupAccess:Object.assign(Object.assign({},i.Ri),{enum:["private","org","public"]}),showFollowAction:{type:"boolean",default:!0},isDiscussable:i.PH}},_associations:{type:"object",properties:{groupAccess:Object.assign(Object.assign({},i.Ri),{enum:["private","org","public"],default:"private"}),membershipAccess:{type:"string",enum:["organization","collaborators","anyone"],default:"organization"}}},view:{type:"object",properties:{embeds:{type:"array"},featuredContentIds:i.CR,featuredImage:i.W6,featuredImageAltText:{type:"string"},featuredImageName:{type:"string"},mapSettings:i.xs,timeline:i.RF,hero:{type:"string",default:n.if.map,enum:Object.keys(n.if)},heroActions:{type:"array"}}},_slug:i.g0}}},646897:(e,t,r)=>{"use strict";var n,i,s,o;r.d(t,{Eu:()=>n,Ne:()=>i,SB:()=>s,dN:()=>o}),function(e){e.start="start",e.center="center",e.end="end"}(n||(n={}
21)),function(e){e.square="square",e.round="round"}(i||(i={})),function(e){e.none="none",e.low="low",e.medium="medium",e.heavy="heavy"}(s||(s={})),function(e){e.h1="h1",e.h2="h2",e.h3="h3",e.h4="h4",e.h5="h5",e.h6="h6"}(o||(o={}))},255582:(e,t,r)=>{"use strict";r.d(t,{CR:()=>l,De:()=>i,JK:()=>d,Ld:()=>a,PH:()=>u,RF:()=>m,Ri:()=>o,Vh:()=>f,W6:()=>h,Z3:()=>s,Zh:()=>c,g0:()=>g,oG:()=>n,xs:()=>p});const n={type:"string",minLength:1,maxLength:250,format:"entityTitleValidator"},i={type:"string",minLength:1,maxLength:250,format:"siteEntityTitleValidator"},s={type:"string",maxLength:2048},o={type:"string",enum:["public","org","private"],default:"private"},a={type:"array",items:{type:"string"}},c={type:"array",items:{type:"string"},maxItems:20},u={type:"boolean",enum:[!0,!1],default:!0},l={type:"array",maxItems:4,items:{type:"string"}},d={type:"object",default:{type:"none"},properties:{type:{type:"string",enum:["none","org","custom"],default:"none"},name:{type:"string"}}},p={type:"object",properties:{baseViewItemId:{type:"array",items:{type:"string"},maxItems:1}}},h={type:"object",properties:{base64:{type:"string"},format:{type:"string"},fileName:{type:"string"},blob:{type:"object",properties:{type:{type:"string"},size:{type:"number"}}},url:{type:"string"}}},m={type:"object",properties:{title:{type:"string"},description:{type:"string"},canCollapse:{type:"boolean"},stages:{type:"array",items:{type:"object",properties:{title:{type:"string"},timeframe:{type:"string"},stageDescription:{type:"string"},status:{type:"string"},link:{type:"object",properties:{href:{type:"string"},title:{type:"string"}}}}}}}},f={type:"object",properties:{consentNotice:{type:"object",properties:{allowPrivacyConfig:{type:"boolean",default:!1},blocking:{type:"boolean",default:!1},disclaimer:{type:"array",items:[{type:"object",properties:{text:{type:"string"},lang:{type:"string"},default:{type:"boolean"}}}]},policyURL:{type:"string",pattern:"^(https?:\\/\\/)?([\\da-z.-]+)\\.([a-z.]{2,6})([\\/\\w.-]*)*\\/?$|^$"}}}}},g={type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},426016:(e,t,r)=>{"use strict";r.d(t,{AH:()=>g,BX:()=>v,CK:()=>I,EB:()=>y,JA:()=>T,N4:()=>w,_o:()=>S,fV:()=>b,pA:()=>E,sz:()=>C});var n=r(306560),i=r(538774),s=r(810938),o=r(586973),a=r(451003),c=r(156739),u=r(394379),l=r(667902),d=r(741808),p=r(820824),h=r(661956),m=r(296796),f=r(596923);const g=[...n.A,...c.E,...i.s,...s.r,...o.S,...a.X,...u.I,...l.v,...d.g,...p.M,...h.EventEditorTypes,...m.q,...f.J],y=["hub:card:stat"],b=["hub:card:follow"],v=["hub:card:eventGallery"],w=[...y,...b,...v],S=[...g,...w];var E,T,I,C;!function(e){e.SHOW="SHOW",e.HIDE="HIDE",e.DISABLE="DISABLE",e.ENABLE="ENABLE",e.NONE="",e.RESET="RESET"}(E||(E={})),function(e){e.section="Section",e.control="Control",e.layout="Layout",e.slot="Slot",e.notice="Notice",e.text="Text"}(T||(T={})),function(e){e.accordion="accordion",e.accordionItem="accordionItem",e.block="block",e.stepper="stepper",e.step="step",e.subblock="subblock",e.card="card"}(I||(I={})),function(e){e.error="ERROR",e.success="SUCCESS",e.custom="CUSTOM"}(C||(C={}))},4795:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(170209),i=r(54430),s=r(805959);async function o(e,t,r){switch((0,i.Q)(e)){case"event":await(0,s.eJ)(Object.assign({eventId:e.id,data:{access:t.toUpperCase()}},r.hubRequestOptions));break;case"group":await(0,n.mD)({group:{id:e.id,access:t},authentication:r.session});break;default:await(0,n.zT)({id:e.id,access:t,owner:e.owner,authentication:r.session})}}},99279:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(702397),i=r(54430),s=r(932818);async function o(e,t,r){let o;return"event"===(0,i.Q)(e)?o=await(0,n.g)(t,e,r):(o=e,await(0,s.L)(e.id,t,r.requestOptions,e.owner)),o}},688060:()=>{},611516:()=>{},71502:()=>{},30467:()=>{},524413:()=>{},375081:()=>{},852444:()=>{},828067:()=>{},674894:()=>{},291532:()=>{},189353:(e,t,r)=>{"use strict";r.r(t);var n=r(611516),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(71502);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(852444);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(674894);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(828067);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(30467);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i);var l=r(291532);i={};for(const e in l)"default"!==e&&(i[e]=()=>l[e]);r.d(t,i);var d=r(524413);i={};for(const e in d)"default"!==e&&(i[e]=()=>d[e]);r.d(t,i);var p=r(688060);i={};for(const e in p)"default"!==e&&(i[e]=()=>p[e]);r.d(t,i);var h=r(375081);i={};for(const e in h)"default"!==e&&(i[e]=()=>h[e]);r.d(t,i)},104300:()=>{},563727:()=>{},995537:(e,t,r)=>{"use strict";var n;r.d(t,{W:()=>n}),function(e){e.app="app",e.map="map",e.feedback="feedback",e.external="external"}(n||(n={}))},204082:()=>{},532467:()=>{},874623:(e,t,r)=>{"use strict";r.d(t,{T:()=>n,d:()=>i});
21const n=["content","initiative","initiativeTemplate","page","project","site","survey","template"],i=[...n,"discussion","event","group","org","organization","user","channel"]},308520:()=>{},109670:()=>{},246546:()=>{},440630:(e,t,r)=>{"use strict";var n;r.d(t,{y:()=>n}),function(e){e.CitationContact="metadata.resource.citation.contact",e.ResourceContact="metadata.resource.contact",e.MetadataContact="metadata.contact",e.ItemOwner="item.owner",e.None="none"}(n||(n={}))},323200:()=>{},817794:()=>{},481684:()=>{},536387:()=>{},926574:()=>{},852336:()=>{},346228:()=>{},467593:()=>{},345005:()=>{},483119:()=>{},416609:()=>{},504077:()=>{},323428:()=>{},620532:()=>{},118279:()=>{},436097:()=>{},189582:()=>{},713521:()=>{},852562:()=>{},82820:()=>{},31577:()=>{},822420:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>n}),function(e){e.notStarted="notStarted",e.inProgress="inProgress",e.skipped="skipped",e.onHold="onHold",e.complete="complete"}(n||(n={}))},204418:()=>{},973889:()=>{},484641:()=>{},344525:()=>{},191189:()=>{},531323:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});const n=["portal","discussions","events","metrics","notifications","hub-search","domains","hub-downloads"];function i(e){return n.includes(e)}},107343:()=>{},946534:(e,t,r)=>{"use strict";var n,i;r.d(t,{A_:()=>o,NX:()=>s,Q$:()=>i,TS:()=>n}),function(e){e.BETWEEN="between",e.IS_EXACTLY="isExactly",e.LIKE="like"}(n||(n={})),function(e){e.visible="visible",e.hidden="hidden",e.featured="featured"}(i||(i={}));const s=24,o=4},889558:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EmbedKind:()=>W.W,EntityResourceMap:()=>H.P,ExpressionRelationships:()=>L.TS,HUB_ENTITY_TYPES:()=>c.d,HUB_ITEM_ENTITY_TYPES:()=>c.T,MAX_ENTITY_METRICS_ALLOWED:()=>L.NX,MAX_FEATURED_METRICS_ALLOWED:()=>L.A_,MetricVisibility:()=>L.Q$,PublisherSource:()=>l.y,TIMELINE_STAGE_STATUSES:()=>x.Z,isHubService:()=>$.S});var n=r(104300),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(563727);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(204082);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(532467);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(874623),u=r(308520);i={};for(const e in u)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES"].indexOf(e)<0&&(i[e]=()=>u[e]);r.d(t,i);var l=r(440630),d=r(323200);i={};for(const e in d)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>d[e]);r.d(t,i);var p=r(817794);i={};for(const e in p)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>p[e]);r.d(t,i);var h=r(481684);i={};for(const e in h)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>h[e]);r.d(t,i);var m=r(536387);i={};for(const e in m)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>m[e]);r.d(t,i);var f=r(926574);i={};for(const e in f)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>f[e]);r.d(t,i);var g=r(246546);i={};for(const e in g)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>g[e]);r.d(t,i);var y=r(82820);i={};for(const e in y)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>y[e]);r.d(t,i);var b=r(852336);i={};for(const e in b)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>b[e]);r.d(t,i);var v=r(346228);i={};for(const e in v)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>v[e]);r.d(t,i);var w=r(467593);i={};for(const e in w)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>w[e]);r.d(t,i);var S=r(345005);i={};for(const e in S)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>S[e]);r.d(t,i);var E=r(483119);i={};for(const e in E)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>E[e]);r.d(t,i);var T=r(416609);i={};for(const e in T)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>T[e]);r.d(t,i);var I=r(504077);i={};for(const e in I)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>I[e]);r.d(t,i);var C=r(323428);i={};for(const e in C)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>C[e]);r.d(t,i);var A=r(620532);i={};for(const e in A)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>A[e]);r.d(t,i);var O=r(118279);i={};for(const e in O)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>O[e]);r.d(t,i);var _=r(436097);i={};for(const e in _)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>_[e]);r.d(t,i);var D=r(31577);i={};for(const e in D)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>D[e]);r.d(t,i);var P=r(713521);i={};for(const e in P)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>P[e]);r.d(t,i);var k=r(852562);i={};for(const e in k)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource"].indexOf(e)<0&&(i[e]=()=>k[e]);r.d(t,i);var x=r(822420),R=r(189582);i={};for(const e in R)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>R[e]);r.d(t,i);var U=r(973889);i={};
21for(const e in U)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>U[e]);r.d(t,i);var M=r(484641);i={};for(const e in M)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>M[e]);r.d(t,i);var N=r(344525);i={};for(const e in N)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>N[e]);r.d(t,i);var j=r(191189);i={};for(const e in j)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES"].indexOf(e)<0&&(i[e]=()=>j[e]);r.d(t,i);var $=r(531323),F=r(107343);i={};for(const e in F)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService"].indexOf(e)<0&&(i[e]=()=>F[e]);r.d(t,i);var G=r(109670);i={};for(const e in G)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService"].indexOf(e)<0&&(i[e]=()=>G[e]);r.d(t,i);var L=r(946534),H=r(194849),B=r(204418);i={};for(const e in B)["default","HUB_ENTITY_TYPES","HUB_ITEM_ENTITY_TYPES","PublisherSource","TIMELINE_STAGE_STATUSES","isHubService","ExpressionRelationships","MAX_ENTITY_METRICS_ALLOWED","MAX_FEATURED_METRICS_ALLOWED","MetricVisibility","EntityResourceMap"].indexOf(e)<0&&(i[e]=()=>B[e]);r.d(t,i);var W=r(995537)},194849:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n={location:"location.json"}},970402:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var n=r(382377),i=r(54430),s=r(540702);async function o(e,t,r){let o;return"event"===(0,i.Q)(e)?o=await(0,n.c)(t,e,r):(o=e,await(0,s.z)(e.id,t,r.requestOptions,e.owner)),o}},680062:(e,t,r)=>{"use strict";r.d(t,{T:()=>m});var n=r(114443),i=r(342571),s=r(664218),o=r(848880),a=r(615555),c=r(579032),u=r(446762),l=r(444411),d=r(593977),p=r(681167),h=r(241926);const m=async(e,t,r)=>{let m;switch(e){case"project":m=await(0,o.ty)(t,r.userRequestOptions);break;case"site":m=await(0,a.L3)(t,r.hubRequestOptions);break;case"initiative":m=await(0,s.xy)(t,r.userRequestOptions);break;case"discussion":m=await(0,i.updateDiscussion)(t,r.hubRequestOptions);break;case"content":m=await(0,n.updateContent)(t,r.userRequestOptions);break;case"page":m=await(0,c.T$)(t,r.userRequestOptions);break;case"template":m=await(0,l.QB)(t,r.userRequestOptions);break;case"initiativeTemplate":m=await(0,u.w4)(t,r.userRequestOptions);break;case"group":m=await(0,h.q7)(t,r.requestOptions);break;case"survey":m=await(0,p.e)(t,r.userRequestOptions);break;case"event":m=await(0,d.updateHubEvent)(t,r.hubRequestOptions)}return m}},369802:(e,t,r)=>{"use strict";r.d(t,{G:()=>d});var n=r(502623),i=r(656110),s=r(434939),o=r(934647),a=r(329644),c=r(50950),u=r(144219),l=r(741619);class d extends i.x{static fromJson(e,t){const r=this.applyDefaults(e,t);return new d(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=d.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,s.d)(e,t.hubRequestOptions);return d.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Discussion not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},n.O8),e)}update(e){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");if(this.entity.id){const{updateDiscussion:e}=await Promise.resolve().then(r.bind(r,342571));this.entity=await e(this.entity,this.context.hubRequestOptions)}else{const{createDiscussion:e}=await Promise.resolve().then(r.bind(r,342571));this.entity=await e(this.entity,this.context.hubRequestOptions)}await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubDiscussion is already destroyed.");const{deleteDiscussion:e}=await Promise.resolve().then(r.bind(r,342571));this.isDestroyed=!0,await e(this.entity.id,this.context.hubRequestOptions)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,c.t)((0,a.kI)(this.entity),t,this.context.hubRequestOptions):(0,a.kI)(this.entity);return r._slug=(0,u.y)(this.entity),r}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}return delete e._thumbnail,this.entity=(0,l.i)(e,this.context.portal),await this.save(),this.entity}}}
21,945068:(e,t,r)=>{"use strict";r.d(t,{$:()=>i,p:()=>n});const n=["hub:discussion","hub:discussion:create","hub:discussion:delete","hub:discussion:edit","hub:discussion:view","hub:discussion:owner","hub:discussion:canChangeAccess","hub:discussion:workspace:overview","hub:discussion:workspace:dashboard","hub:discussion:workspace:details","hub:discussion:workspace:settings","hub:discussion:workspace:collaborators","hub:discussion:workspace:discussion","hub:discussion:workspace:metrics","hub:discussion:workspace:settings:discussions","hub:discussion:manage","temp:hub:discussion:create"],i=[{permission:"hub:discussion",services:["discussions"]},{permission:"hub:discussion:create",dependencies:["hub:discussion"],authenticated:!0,privileges:["portal:user:createItem"],licenses:["hub-premium"]},{permission:"hub:discussion:view",dependencies:["hub:discussion"],authenticated:!1,licenses:["hub-basic","hub-premium"]},{permission:"hub:discussion:edit",authenticated:!0,dependencies:["hub:discussion"],entityEdit:!0},{permission:"hub:discussion:delete",authenticated:!0,dependencies:["hub:discussion"],entityDelete:!0},{permission:"hub:discussion:owner",dependencies:["hub:discussion"],authenticated:!0,entityOwner:!0},{permission:"hub:discussion:canChangeAccess",dependencies:["hub:discussion"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:discussion:workspace:overview",dependencies:["hub:discussion:view"]},{permission:"hub:discussion:workspace:dashboard",dependencies:["hub:discussion:view"]},{permission:"hub:discussion:workspace:details",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:settings",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:settings:discussions",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:collaborators",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:discussion",services:["discussions"],dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:workspace:metrics",dependencies:["hub:discussion:edit"]},{permission:"hub:discussion:manage",dependencies:["hub:discussion:edit"]}]},586973:(e,t,r)=>{"use strict";r.d(t,{DiscussionSchema:()=>s,S:()=>i});var n=r(434164);const i=["hub:discussion:edit","hub:discussion:create","hub:discussion:settings","hub:discussion:settings:discussions"],s=Object.assign(Object.assign({},n.N),{required:["name"],properties:Object.assign(Object.assign({},n.N.properties),{prompt:{type:"string",default:"",maxLength:150},discussionSettings:{type:"object",properties:{allowedChannelIds:{type:"array",items:{type:"string"}},allowedLocations:{type:"array",items:{type:"object"}}}}})})},479475:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(902815),i=r(578506);function s(e,t,r){let s;return r.authentication&&(s=r.authentication.token),(t=(0,i.k)(e.item,t)).thumbnailUrl=(0,n.S)(e.item,r,s),t}},358199:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"prompt",storeKey:"data.prompt"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e}},972335:(e,t,r)=>{"use strict";r.d(t,{$6:()=>d,BP:()=>g,KD:()=>w,OG:()=>u,Of:()=>l,Rq:()=>b,Rt:()=>S,TA:()=>h,U4:()=>s,Ww:()=>m,fA:()=>f,fu:()=>p,kI:()=>a,mi:()=>o,pW:()=>c,r6:()=>i,sD:()=>y,y6:()=>v});var n=r(265677);function i(e){return e.httpMethod="GET",(0,n.e)("/channels",e)}function s(e){return e.httpMethod="GET",(0,n.J)("/channels",e)}function o(e){return e.httpMethod="POST",(0,n.e)("/channels",e)}function a(e){return e.httpMethod="GET",(0,n.e)(`/channels/${e.channelId}`,e)}function c(e){return e.httpMethod="PATCH",(0,n.e)(`/channels/${e.channelId}`,e)}function u(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}`,e)}function l(e){return e.httpMethod="GET",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function d(e){return e.httpMethod="POST",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function p(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}/notifications/opt-out`,e)}function h(e){return e.httpMethod="DELETE",(0,n.e)(`/channels/${e.channelId}/activity`,e)}function m(e){return e.httpMethod="POST",(0,n.J)("/channels",e)}function f(e){return e.httpMethod="GET",(0,n.J)(`/channels/${e.channelId}`,e)}function g(e){return e.httpMethod="PATCH",(0,n.J)(`/channels/${e.channelId}`,e)}function y(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}`,e)}function b(e){return e.httpMethod="GET",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function v(e){return e.httpMethod="POST",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function w(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}/notifications/opt-out`,e)}function S(e){return e.httpMethod="DELETE",(0,n.J)(`/channels/${e.channelId}/activity`,e)}},265677:(e,t,r)=>{"use strict";r.d(t,{e:()=>u,J:()=>l});var n=r(260495),i=r(636137),s=r(376826);class o extends i.m{constructor(e,t,r,n){super(e,t,r),this.error=n}}function a(e){const{token:t,authentication:r}=e;let n=()=>Promise.resolve(t);return r&&(n=r.getToken.bind(r,r.portal)),n()}function c(e,t,r,i){var a;let c=e;const u=new Headers(t.headers);u.append("Content-Type","application/json"),i&&u.append("Authorization",`Bearer ${i}`);const l={headers:u,method:t.httpMethod||"GET",mode:t.mode,cache:t.cache,credentials:t.credentials},d=(0,n.Q)({host:t.hubApiUrl||"https://hub.arcgis.com",path:`/api/discussions/${r}`});t.data&&("GET"===t.httpMethod?c+=`?${new URLSearchParams(t.data).toString()}`:l.body=JSON.stringify(t.data));const p=["/posts","/posts/search"].includes(e)&&((null===(a=t.data)||void 0===a?void 0:a.f)===s.Fr.CSV||"text/csv"===u.get("Accept")),h=[d.replace(/\/$/,""),c.replace(/^\//,"")].join("/");return fetch(h,l).then((e=>{if(e.ok)return p?e.text():e.json();{const{statusText:t,status:r}=e;return e.json().then((e=>{throw new o(t,h,r,JSON.stringify(e.message))}))}}))}function u(e,t){return a(t).then((r=>c(e,t,"v1",r)))}function l(e,t){return a(t).then((r=>c(e,t,"v2",r)))}},218147:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});const n={discussion:{type:r(376826).qF.CONTENT,settings:Object.assign({},{discussions:{allowedChannelIds:null,allowedLocations:null}})},site:null,project:null,initiative:null,initiativeTemplate:null,page:null,content:null,organization:null,org:null,group:null,template:null,survey:null,event:null,user:null,channel:null};function i(e){if(!n[e])throw new Error(`no default entity settings defined for ${e}`);return{type:n[e].type,settings:Object.assign({},n[e].settings)}}},913812:(e,t,r)=>{"use strict";r.d(t,{Fn:()=>u,SK:()=>l,Wf:()=>a,fj:()=>i,hk:()=>d,j$:()=>s,m7:()=>o,qH:()=>c});var n=r(265677);function i(e){return e.httpMethod="POST",(0,n.e)("/settings",e)}function s(e){return e.httpMethod="GET",(0,n.e)(`/settings/${e.id}`,e)}function o(e){return e.httpMethod="PATCH",(0,n.e)(`/settings/${e.id}`,e)}function a(e){return e.httpMethod="DELETE",(0,n.e)(`/settings/${e.id}`,e)}function c(e){return e.httpMethod="POST",(0,n.J)("/settings",e)}function u(e){return e.httpMethod="GET",(0,n.J)(`/settings/${e.id}`,e)}function l(e){return e.httpMethod="PATCH",(0,n.J)(`/settings/${e.id}`,e)}function d(e){return e.httpMethod="DELETE",(0,n.J)(`/settings/${e.id}`,e)}},376826:(e,t,r)=>{"use strict";var n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S;r.d(t,{$4:()=>o,As:()=>n,B8:()=>w,Fr:()=>h,H_:()=>f,Iw:()=>s,LY:()=>y,Og:()=>a,RI:()=>v,Uz:()=>b,ZK:()=>u,hQ:()=>g,jF:()=>p,nF:()=>l,p2:()=>c,qF:()=>S,uU:()=>m,ww:()=>d,y4:()=>i}),function(e){e.ASC="ASC",e.DESC="DESC"}(n||(n={})),function(e){e.CLAPPING_HANDS="clapping_hands",e.CONFUSED="confused",e.DOWN_ARROW="down_arrow",e.EYES="eyes",e.FACE_WITH_TEARS_OF_JOY="face_with_tears_of_joy",e.FIRE="fire",e.GRINNING="grinning",e.HEART="heart",e.LAUGH="laugh",e.ONE_HUNDRED="one_hundred",e.PARTYING="partying",e.PARTY_POPPER="party_popper",e.RAISING_HANDS="raising_hands",e.ROCKET="rocket",e.SAD="sad",e.SLIGHTLY_SMILING="slightly_smiling",e.SURPRISED="surprised",e.THINKING="thinking",e.THUMBS_UP="thumbs_up",e.THUMBS_DOWN="thumbs_down",e.TROPHY="trophy",e.UP_ARROW="up_arrow",e.WAVING_HAND="waving_hand",e.WINKING="winking",e.WORLD_MAP="world_map"}(i||(i={})),function(e){e.PUBLIC="public",e.ORG="org",e.PRIVATE="private"}(s||(s={})),function(e){e.PENDING="pending",e.APPROVED="approved",e.REJECTED="rejected",e.DELETED="deleted",e.HIDDEN="hidden",e.BLOCKED="blocked"}(o||(o={})),function(e){e.GROUP="group",e.CONTENT="content",e.BOARD="board"}(a||(a={})),function(e){e.HUB="hub",e.AGO="ago",e.URBAN="urban"}(c||(c={}
21)),function(e){e.REPLIES="replies",e.REACTIONS="reactions",e.PARENT="parent",e.CHANNEL="channel",e.CHANNEL_ACL="channelAcl"}(u||(u={})),function(e){e.POST="post"}(l||(l={})),function(e){e.HAS_USER_POSTS="has_user_posts"}(d||(d={})),function(e){e.CREATED_AT="createdAt",e.CREATOR="creator",e.EDITOR="editor",e.ID="id",e.UPDATED_AT="updatedAt"}(p||(p={})),function(e){e.CSV="csv",e.JSON="json"}(h||(h={})),function(e){e.READ="read",e.WRITE="write",e.READWRITE="readWrite",e.MODERATE="moderate",e.MANAGE="manage",e.OWNER="owner"}(m||(m={})),function(e){e.BODY="body",e.CHANNEL_ID="channelId",e.CREATED_AT="createdAt",e.CREATOR="creator",e.DISCUSSION="discussion",e.EDITOR="editor",e.ID="id",e.PARENT_ID="parentId",e.STATUS="status",e.TITLE="title",e.UPDATED_AT="updatedAt"}(f||(f={})),function(e){e.Text="text",e.Announcement="announcement",e.Poll="poll",e.Question="question"}(g||(g={})),function(e){e.ACCESS="access",e.CREATED_AT="createdAt",e.CREATOR="creator",e.EDITOR="editor",e.ID="id",e.LAST_ACTIVITY="last_activity",e.UPDATED_AT="updatedAt"}(y||(y={})),function(e){e.CHANNEL_ACL="channelAcl"}(b||(b={})),function(e){e.ANONYMOUS_USER="anonymousUser",e.AUTHENTICATED_USER="authenticatedUser",e.GROUP="group",e.ORG="org",e.USER="user"}(v||(v={})),function(e){e.ADMIN="admin",e.MEMBER="member"}(w||(w={})),function(e){e.CONTENT="content"}(S||(S={}))},849994:(e,t,r)=>{"use strict";r.d(t,{G:()=>u});var n,i=r(376826),s=r(889742),o=r(282526),a=r(664879);!function(e){e.READ_POSTS="readPosts",e.WRITE_POSTS="writePosts",e.MODERATE_CHANNEL="moderateChannel",e.DELETE_CHANNEL="deleteChannel",e.IS_MODERATOR="isModerator",e.IS_MANAGER="isManager",e.IS_OWNER="isOwner"}(n||(n={}));const c={UPDATE_OWNERS:[i.uU.OWNER],UPDATE_MANAGERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_MODERATORS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_ORGS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_GROUPS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_AUTHENTICATED_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_ANONYMOUS_USERS:[i.uU.OWNER,i.uU.MANAGE],UPDATE_POST_REPLIES:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_POST_REACTIONS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_POST_AS_ANONYMOUS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_ALLOWED_REACTIONS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_DEFAULT_POST_STATUS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_BLOCKED_WORDS:[i.uU.OWNER,i.uU.MANAGE,i.uU.MODERATE],UPDATE_CHANNEL_NAME:[i.uU.OWNER,i.uU.MANAGE],UPDATE_SOFT_DELETE_SETTING:[i.uU.OWNER,i.uU.MANAGE]};class u{constructor(e){if(this.ALLOWED_GROUP_MEMBER_TYPES=["owner","admin","member"],void 0===e.channelAcl)throw new Error("channel.channelAcl is required for ChannelPermission checks");this.existingChannel=e,this.isChannelAclEmpty=0===e.channelAcl.length,this.permissionsByCategory={},e.channelAcl.forEach((e=>{var t;const{category:r}=e;(null===(t=this.permissionsByCategory[r])||void 0===t?void 0:t.push(e))||(this.permissionsByCategory[r]=[e])}))}canPostToChannel(e){return!!this.canAnyUser(n.WRITE_POSTS)||!this.isUserUnAuthenticated(e)&&(this.canAnyAuthenticatedUser(n.WRITE_POSTS)||this.canSomeUser(n.WRITE_POSTS,e)||this.canSomeUserGroup(n.WRITE_POSTS,e)||this.canSomeUserOrg(n.WRITE_POSTS,e))}canCreateChannel(e){return!this.isUserUnAuthenticated(e)&&!this.isChannelAclEmpty&&this.userCanAddAnonymousToAcl(e)&&this.userCanAddUnauthenticatedToAcl(e)&&this.userCanAddAllGroupsToAcl(e)&&this.userCanAddAllOrgsToAcl(e)&&this.userCanAddUsersToAcl(e)}canModerateChannel(e){return!this.isUserUnAuthenticated(e)&&(this.canSomeUser(n.MODERATE_CHANNEL,e)||this.canSomeUserGroup(n.MODERATE_CHANNEL,e)||this.canSomeUserOrg(n.MODERATE_CHANNEL,e))}canReadChannel(e){return!!this.canAnyUser(n.READ_POSTS)||!this.isUserUnAuthenticated(e)&&(this.canAnyAuthenticatedUser(n.READ_POSTS)||this.canSomeUser(n.READ_POSTS,e)||this.canSomeUserGroup(n.READ_POSTS,e)||this.canSomeUserOrg(n.READ_POSTS,e))}canDeleteChannel(e){return!this.isUserUnAuthenticated(e)&&(this.canSomeUser(n.DELETE_CHANNEL,e)||this.canSomeUserGroup(n.DELETE_CHANNEL,e)||this.canSomeUserOrg(n.DELETE_CHANNEL,e))}canUpdateProperties(e,t={}){if(0===Object.keys(t).length)return!0;const r=this.determineUserRole(e),n=function(e){const{channelAclDefinition:t}=e,r=(0,o._T)(e,["channelAclDefinition"]);return Object.assign(Object.assign({},r),{channelAcl:t})}(t);return!(this.isChanged(n.allowReply,this.existingChannel.allowReply)&&!c.UPDATE_POST_REPLIES.includes(r)||this.isChanged(n.allowReaction,this.existingChannel.allowReaction)&&!c.UPDATE_POST_REACTIONS.includes(r)||this.isChanged(n.allowAsAnonymous,this.existingChannel.allowAsAnonymous)&&!c.UPDATE_POST_AS_ANONYMOUS.includes(r)||this.isStringArrayChanged(n.allowedReactions,this.existingChannel.allowedReactions)&&!c.UPDATE_ALLOWED_REACTIONS.includes(r)||this.isChanged(n.defaultPostStatus,this.existingChannel.defaultPostStatus)&&!c.UPDATE_DEFAULT_POST_STATUS.includes(r)||this.isStringArrayChanged(n.blockWords,this.existingChannel.blockWords)&&!c.UPDATE_BLOCKED_WORDS.includes(r)||this.isChanged(n.name,this.existingChannel.name)&&!c.UPDATE_CHANNEL_NAME.includes(r)||this.isChanged(n.softDelete,this.existingChannel.softDelete)&&!c.UPDATE_SOFT_DELETE_SETTING.includes(r)||this.isRoleChanged(i.uU.OWNER,n.channelAcl)&&!c.UPDATE_OWNERS.includes(r)||this.isRoleChanged(i.uU.MANAGE,n.channelAcl)&&!c.UPDATE_MANAGERS.includes(r)||this.isRoleChanged(i.uU.MODERATE,n.channelAcl)&&!c.UPDATE_MODERATORS.includes(r)||this.isCategoryChanged(i.RI.ORG,n.channelAcl)&&!c.UPDATE_ORGS.includes(r)||this.isCategoryChanged(i.RI.GROUP,n.channelAcl)&&!c.UPDATE_GROUPS.includes(r)||this.isCategoryChanged(i.RI.USER,n.channelAcl)&&!c.UPDATE_USERS.includes(r)||this.isCategoryChanged(i.RI.AUTHENTICATED_USER,n.channelAcl)&&!c.UPDATE_AUTHENTICATED_USERS.includes(r)||this.isCategoryChanged(i.RI.ANONYMOUS_USER,n.channelAcl)&&!c.UPDATE_ANONYMOUS_USERS.includes(r))}isChanged(e,t){return void 0!==e&&e!==t}isStringArrayChanged(e,t){const r=null!=e?e:[],n=null!=t?t:[];return 0!==r.filter((e=>!n.includes(e))).length||0!==n.filter((e=>!r.includes(e))).length}isRoleChanged(e,t){if(!t)return!1;const r=this.existingChannel.channelAcl.filter((t=>t.role===e)).map((t=>`${t.category}_${t.subCategory}_${t.key}_${e}`)),n=t.filter((t=>t.role===e)).map((t=>`${t.category}_${t.subCategory}_${t.key}_${e}`));return this.isStringArrayChanged(r,n)}isCategoryChanged(e,t){var r;if(!t)return!1;const n=(null!==(r=this.permissionsByCategory[e])&&void 0!==r?r:[]).map((t=>`${e}_${t.subCategory}_${t.key}_${t.role}`)),i=t.filter((t=>t.category===e)).map((t=>`${e}_${t.subCategory}_${t.key}_${t.role}`));return this.isStringArrayChanged(n,i)}canAnyUser(e){var t;const r=null===(t=this.permissionsByCategory[i.RI.ANONYMOUS_USER])||void 0===t?void 0:t[0].role;return d(e).includes(r)}canAnyAuthenticatedUser(e){var t;const r=null===(t=this.permissionsByCategory[i.RI.AUTHENTICATED_USER])||void 0===t?void 0:t[0].role;return d(e).includes(r)}canSomeUser(e,t){var r;const n=null!==(r=this.permissionsByCategory[i.RI.USER])&&void 0!==r?r:[],s=t.username;return n.some((t=>{const{role:r,key:n}=t;return n===s&&d(e).includes(r)}))}canSomeUserGroup(e,t){var r;const s=null!==(r=this.permissionsByCategory[i.RI.GROUP])&&void 0!==r?r:[],o=this.mapUserGroupsById(t.groups);return s.some((t=>{const r=o[t.key];if(e===n.READ_POSTS){if(!r)return!1}else if(!r||!l(r))return!1;return function(e,t){return e.category===i.RI.GROUP&&"none"!==t.userMembership.memberType&&("owner"===t.userMembership.memberType||"admin"===t.userMembership.memberType||e.subCategory===i.B8.MEMBER)}(t,r)&&d(e).includes(t.role)}))}canSomeUserOrg(e,t){var r;return(null!==(r=this.permissionsByCategory[i.RI.ORG])&&void 0!==r?r:[]).some((r=>r.key===t.orgId&&function(e,t){return e.category===i.RI.ORG&&(e.subCategory===i.B8.MEMBER||e.subCategory===i.B8.ADMIN&&(0,s.RN)(t))}(r,t)&&d(e).includes(r.role)))}userCanAddAnonymousToAcl(e){return!this.permissionsByCategory[i.RI.ANONYMOUS_USER]||(0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToPublic")||(0,s.am)(e,"portal:user:shareToPublic")}userCanAddUnauthenticatedToAcl(e){return!this.permissionsByCategory[i.RI.AUTHENTICATED_USER]||(0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToPublic")||(0,s.am)(e,"portal:user:shareToPublic")}userCanAddAllGroupsToAcl(e){const t=this.permissionsByCategory[i.RI.GROUP],r=this.mapUserGroupsById(e.groups);return!t||t.every((e=>{const t=r[e.key];return t&&this.isMemberTypeAuthorized(t)&&l(t)}))}userCanAddAllOrgsToAcl(e){const t=this.permissionsByCategory[i.RI.ORG];return!t||((0,s.RN)(e)||(0,s.am)(e,"portal:admin:shareToOrg")||(0,s.am)(e,"portal:user:shareToOrg"))&&this.isEveryPermissionForUserOrg(e.orgId,t)}isEveryPermissionForUserOrg(e,t){return t.every((t=>{const{key:r}=t;return e===r}))}userCanAddUsersToAcl(e){return!this.permissionsByCategory[i.RI.USER]}isUserUnAuthenticated(e){return null===e.username||void 0===e.username}mapUserGroupsById(e){return e.reduce(((e,t)=>(e[t.id]=t,e)),{})}isMemberTypeAuthorized(e){const{userMembership:{memberType:t}}=e;return this.ALLOWED_GROUP_MEMBER_TYPES.includes(t)}determineUserRole(e){return this.isOwner(e)?i.uU.OWNER:this.isManager(e)?i.uU.MANAGE:this.isModerator(e)?i.uU.MODERATE:i.uU.READ}isOwner(e){return this.canSomeUser(n.IS_OWNER,e)||this.canSomeUserGroup(n.IS_OWNER,e)||this.canSomeUserOrg(n.IS_OWNER,e)}isManager(e){return this.canSomeUser(n.IS_MANAGER,e)||this.canSomeUserGroup(n.IS_MANAGER,e)||this.canSomeUserOrg(n.IS_MANAGER,e)}isModerator(e){return this.canSomeUser(n.IS_MODERATOR,e)||this.canSomeUserGroup(n.IS_MODERATOR,e)||this.canSomeUserOrg(n.IS_MODERATOR,e)}}function l(e){const{typeKeywords:t=[]}=e;return!t.includes(a.f)}function d(e){return e===n.WRITE_POSTS?[i.uU.WRITE,i.uU.READWRITE,i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]:e===n.MODERATE_CHANNEL?[i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]:e===n.DELETE_CHANNEL?[i.uU.OWNER]:e===n.IS_MODERATOR?[i.uU.MODERATE]:e===n.IS_MANAGER?[i.uU.MANAGE]:e===n.IS_OWNER?[i.uU.OWNER]:[i.uU.READ,i.uU.READWRITE,i.uU.MODERATE,i.uU.MANAGE,i.uU.OWNER]}},832919:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var n=r(849994),i=r(808496);function s(e,t={}){return!!(0,i.Uj)(t,e.orgId)||new n.G(e).canDeleteChannel(t)}},871649:(e,t,r)=>{"use strict";r.d(t,{x:()=>s});var n=r(849994),i=r(808496);function s(e,t={},r){if((0,i.vP)(t,e.orgId))return!0;const s=new n.G(e);return s.canModerateChannel(t)&&s.canUpdateProperties(t,r)}},889742:(e,t,r)=>{"use strict";function n(e){return function(t,r){return e.indexOf(r.userMembership.memberType)>
21-1&&t.push(r.id),t}}function i(e){return"org_admin"===e.role}function s(e={},t){return e.orgId===t}function o(e,t){return i(e)&&s(e,t)}function a(e={},t){var r;return!!(null===(r=e.privileges)||void 0===r?void 0:r.includes(t))}function c(e={},t){return t.every((t=>a(e,t)))}r.d(t,{PV:()=>c,RN:()=>i,am:()=>a,ho:()=>o,sd:()=>s,v9:()=>n})},808496:(e,t,r)=>{"use strict";r.d(t,{TX:()=>i,Uj:()=>o,vP:()=>s});var n=r(889742);function i(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems"])}function s(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems","portal:admin:updateItems"])}function o(e={},t){return(0,n.ho)(e,t)||(0,n.sd)(e,t)&&(0,n.PV)(e,["portal:admin:viewItems","portal:admin:deleteItems"])}},664879:(e,t,r)=>{"use strict";r.d(t,{_:()=>i,f:()=>n});const n="cannotDiscuss",i="data-mention"},502623:(e,t,r)=>{"use strict";r.d(t,{O8:()=>n,gm:()=>i});const n={name:"",tags:[],typeKeywords:["Hub Discussion"],permissions:[],catalogs:[],schemaVersion:1,isDiscussable:!0},i={item:{type:"Discussion",title:"",description:"",snippet:"",tags:[],typeKeywords:["Hub Discussion"],properties:{slug:"",schemaVersion:1}},data:{catalogs:[],prompt:""}}},342571:(e,t,r)=>{"use strict";r.d(t,{createDiscussion:()=>g,deleteDiscussion:()=>b,updateDiscussion:()=>y});var n=r(170209),i=r(404091),s=r(8238),o=r(923018),a=r(913812),c=r(178749),u=r(358199),l=r(479475),d=r(502623),p=r(218147),h=r(85738),m=r(329644),f=r(197928);async function g(e,t){var r,n;const f=Object.assign(Object.assign({},d.O8),e);f.slug||(f.slug=(0,s.fU)(f.name,f.orgUrlKey)),await(0,o.E)(f,t),f.typeKeywords=(0,h.Wb)(f.typeKeywords,f.isDiscussable);const g=new c.c7((0,u.s)());let y=g.entityToStore(f,(0,m.kI)(d.gm));y=await(0,i.NY)(y,t);const b=(0,p.A)("discussion"),v=Object.assign(Object.assign({},b.settings),{discussions:Object.assign(Object.assign({},b.settings.discussions),f.discussionSettings)});(null===(r=v.discussions.allowedChannelIds)||void 0===r?void 0:r.length)||(v.discussions.allowedChannelIds=null),(null===(n=v.discussions.allowedLocations)||void 0===n?void 0:n.length)||(v.discussions.allowedLocations=null),y.entitySettings=await(0,a.fj)(Object.assign({data:{id:y.item.id,type:b.type,settings:v}},t));let w=g.storeToEntity(y,{});return w=(0,l.F)(y,w,t),w}async function y(e,t){var r,n,s;await(0,o.E)(e,t),e.typeKeywords=(0,h.Wb)(e.typeKeywords,e.isDiscussable);const d=await(0,i.PD)(e.id,t),m=new c.c7((0,u.s)()),g=m.entityToStore(e,d),y=await(0,i.QB)(g,t);let b,v=m.storeToEntity(y,e);v=(0,l.F)(d,v,t);try{b=(null===(r=v.location.geometries)||void 0===r?void 0:r.map((e=>(0,f.Y)(e))))||null}catch(e){b=null,console.warn("Esri JSON conversion failed",e)}const w=(0,p.A)("discussion"),S=Object.assign(Object.assign({},w.settings),{discussions:Object.assign(Object.assign(Object.assign({},w.settings.discussions),v.discussionSettings),{allowedLocations:b})});(null===(n=S.discussions.allowedChannelIds)||void 0===n?void 0:n.length)||(S.discussions.allowedChannelIds=null),(null===(s=S.discussions.allowedLocations)||void 0===s?void 0:s.length)||(S.discussions.allowedLocations=null);const E=v.entitySettingsId?await(0,a.m7)(Object.assign({id:v.entitySettingsId,data:{settings:S}},t)):await(0,a.fj)(Object.assign({data:{id:v.id,type:w.type,settings:S}},t));return v.entitySettingsId=E.id,v.discussionSettings=E.settings.discussions,v}async function b(e,t){const r=Object.assign(Object.assign({},t),{id:e});try{await(0,a.Wf)(Object.assign({id:e},t))}catch(e){}await(0,n.cl)(r)}},434939:(e,t,r)=>{"use strict";r.d(t,{W:()=>h,d:()=>p});var n=r(170209),i=r(404091),s=r(8238),o=r(178749),a=r(358199),c=r(479475),u=r(218147),l=r(869787),d=r(913812);async function p(e,t){let r;return r=(0,l.k)(e)?(0,n.rV)(e,t):(0,s.QR)(e,t),r.then((e=>e?h(e,t):null))}async function h(e,t){const r=await(0,i.UO)(e,t);let n;try{n=await(0,d.j$)(Object.assign({id:e.id},t))}catch(e){const t=(0,u.A)("discussion");n=Object.assign({id:null},t)}r.entitySettings=n;const s=new o.c7((0,a.s)()).storeToEntity(r,{});return(0,c.F)(r,s,t)}},819967:(e,t,r)=>{"use strict";r.d(t,{RI:()=>c.RI,B8:()=>c.B8,fX:()=>o.f,ww:()=>c.ww,Uz:()=>c.Uz,LY:()=>c.LY,jF:()=>c.jF,p2:()=>c.p2,Og:()=>c.Og,qF:()=>c.qF,GY:()=>n.G,fL:()=>o._,y4:()=>c.y4,ZK:()=>c.ZK,H_:()=>c.H_,$4:()=>c.$4,hQ:()=>c.hQ,nF:()=>c.nF,uU:()=>c.uU,Fr:()=>c.Fr,Iw:()=>c.Iw,As:()=>c.As,Sy:()=>j,GJ:()=>Z,sm:()=>ne,i_:()=>we,Mg:()=>Ce,Hp:()=>Ae,jK:()=>se,pG:()=>Se,Ym:()=>B,T2:()=>X.T,Rz:()=>oe,l6:()=>Ee,G6:()=>W,xK:()=>ee.x,CY:()=>pe,G$:()=>ue,_w:()=>Te,FR:()=>Ie,x2:()=>q,$g:()=>de,BP:()=>ce,qU:()=>K,IO:()=>z,LW:()=>te,lX:()=>Y,Ge:()=>a.Ge,WP:()=>s.W,mi:()=>l.mi,$6:()=>l.$6,y6:()=>l.y6,Ww:()=>l.Ww,vv:()=>i.createDiscussion,qb:()=>g,U5:()=>C,wC:()=>x,pR:()=>U,PP:()=>y,PS:()=>A,fj:()=>d.fj,qH:()=>d.qH,lg:()=>i.deleteDiscussion,eR:()=>u.e,JL:()=>u.J,Mv:()=>f,x3:()=>I,kI:()=>
21l.kI,Of:()=>l.Of,Rq:()=>l.Rq,fA:()=>l.fA,dK:()=>s.d,SD:()=>b,mD:()=>O,j$:()=>d.j$,Fn:()=>d.Fn,KX:()=>a.KX,hw:()=>a.hw,dC:()=>a.dC,Wv:()=>a.Ww,AH:()=>p.A,vL:()=>a.vL,BV:()=>a.BV,RN:()=>N.RN,ho:()=>N.ho,t7:()=>a.t7,pi:()=>a.pi,qi:()=>a.qi,sd:()=>N.sd,hv:()=>fe,tt:()=>ve,v9:()=>N.v9,OG:()=>l.OG,TA:()=>l.TA,Rt:()=>l.Rt,fu:()=>l.fu,KD:()=>l.KD,sD:()=>l.sD,M8:()=>v,oW:()=>_,WO:()=>R,Xq:()=>M,Wf:()=>d.Wf,hk:()=>d.hk,r6:()=>l.r6,U4:()=>l.U4,cl:()=>m,yB:()=>T,Wb:()=>a.Wb,pW:()=>l.pW,ip:()=>l.BP,Zt:()=>i.updateDiscussion,CP:()=>w,LC:()=>S,ec:()=>P,z6:()=>D,m7:()=>d.m7,SK:()=>d.SK,am:()=>N.am,PV:()=>N.PV});var n=r(369802),i=r(342571),s=r(434939),o=r(664879),a=r(85738),c=r(376826),u=r(265677),l=r(972335),d=r(913812),p=r(218147),h=r(282526);function m(e){return(0,u.e)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign({},e.data),httpMethod:"POST"}))}function f(e){return(0,u.e)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{f:c.Fr.CSV}),httpMethod:"POST"}))}function g(e){return(0,u.e)("/posts",Object.assign({httpMethod:"POST"},E(e)))}function y(e){const t=`/posts/${e.postId}/reply`;return(0,u.e)(t,Object.assign({httpMethod:"POST"},E(e)))}function b(e){const t=`/posts/${e.postId}`;return e.httpMethod="GET",(0,u.e)(t,e)}function v(e){const t=`/posts/${e.postId}`;return e.httpMethod="DELETE",(0,u.e)(t,e)}function w(e){const t=`/posts/${e.postId}`;return(0,u.e)(t,Object.assign({httpMethod:"PATCH"},E(e)))}function S(e){const t=`/posts/${e.postId}/status`;return e.httpMethod="PATCH",(0,u.e)(t,e)}function E(e){const{mentionUrl:t}=e,r=(0,h._T)(e,["mentionUrl"]);return t&&(r.headers=Object.assign(Object.assign({},r.headers),{"mention-url":t})),r}function T(e){return(0,u.J)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign({},e.data),httpMethod:"POST"}))}function I(e){return(0,u.J)("/posts/search",Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{f:c.Fr.CSV}),httpMethod:"POST"}))}function C(e){return(0,u.J)("/posts",Object.assign({httpMethod:"POST"},k(e)))}function A(e){const t=`/posts/${e.postId}/reply`;return(0,u.J)(t,Object.assign({httpMethod:"POST"},k(e)))}function O(e){const t=`/posts/${e.postId}`;return e.httpMethod="GET",(0,u.J)(t,e)}function _(e){const t=`/posts/${e.postId}`;return e.httpMethod="DELETE",(0,u.J)(t,e)}function D(e){const t=`/posts/${e.postId}`;return(0,u.J)(t,Object.assign({httpMethod:"PATCH"},k(e)))}function P(e){const t=`/posts/${e.postId}/status`;return e.httpMethod="PATCH",(0,u.J)(t,e)}function k(e){const{mentionUrl:t}=e,r=(0,h._T)(e,["mentionUrl"]);return t&&(r.headers=Object.assign(Object.assign({},r.headers),{"mention-url":t})),r}function x(e){return e.httpMethod="POST",(0,u.e)("/reactions",e)}function R(e){const{reactionId:t}=e;return e.httpMethod="DELETE",(0,u.e)(`/reactions/${t}`,e)}function U(e){return e.httpMethod="POST",(0,u.J)("/reactions",e)}function M(e){const{reactionId:t}=e;return e.httpMethod="DELETE",(0,u.J)(`/reactions/${t}`,e)}var N=r(889742);function j(e,t={}){const{access:r,groups:n,orgs:i}=e;return function(e,t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o}=t;return!!r&&(i===c.Iw.PRIVATE?$(n,s):$(n,s)&&function(e,t){return(0,N.RN)(e)&&t.includes(e.orgId)}(e,o))}(t,{access:r,groups:n,orgs:i})}function $(e,t){return t.every((t=>{const r=e.find((e=>e.id===t));return r&&function(e){const{userMembership:{memberType:t}}=e;return["owner","admin","member"].includes(t)}(r)&&function(e){const{typeKeywords:t=[]}=e;return!t.includes(o.f)}(r)}))}const F=Object.freeze(["owner","admin"]);function G(e={},t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o=[],creator:a}=t;return!!r&&(r===a||(i===c.Iw.PRIVATE?L(s,n):L(s,n)||function(e,t){return(0,N.RN)(t)&&e.includes(t.orgId)}(o,e)))}function L(e,t){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n}}=t;return e===r&&F.includes(n)}))))}var H=r(808496);function B(e,t={}){return!!(0,H.Uj)(t,e.orgId)||G(t,e)}function W(e,t={}){return!!(0,H.vP)(t,e.orgId)||G(t,e)}function q(e,t={}){return!!(0,N.ho)(t,e.orgId)||G(t,e)}const V=Object.freeze(["owner","admin","member"]);function K(e,t={}){const{access:r,groups:n,orgs:i,allowAnonymous:s}=e;return!!(0,H.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{allowAnonymous:s,access:a,groups:u,orgs:l}=t;return!0===s||!!r&&(a===c.Iw.PUBLIC||(a===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&V.includes(n)&&!i.includes(o.f)}))))}(u,n):a===c.Iw.ORG&&l.includes(i)))}(t,{access:r,groups:n,orgs:i,allowAnonymous:s})}function z(e,t={}){return!!(0,H.TX)(t,e.orgId)||("private"===e.access?J(["member","owner","admin"])(t,e):"org"!==e.access||J(["member","owner","admin"])(t,e)||function(e,t){return 1===e.orgs.length&&e.orgs.indexOf(t.orgId)>-1}(e,t))}function Y(e,t={}){return z(e,t)}function J(e){return(t,r)=>{const{groups:n=[]}=r,{groups:i=[]}=t,s=i.reduce((0,N.v9)(e),[]);return n.some((e=>s.indexOf(e)>-1))}}var Q=r(849994);function Z(e,t={}){return new Q.G(e).canCreateChannel(t)}var X=r(832919),ee=r(871649);function te(e,t={}){return!!(0,H.TX)(t,e.orgId)||new Q.G(e).canReadChannel(t)}const re=Object.freeze(["owner","admin","member"]);function ne(e,t={}){const{access:r,groups:n,orgs:i}=e;return!!(0,H.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{access:s,groups:a,orgs:u}=t;return!!r&&(s===c.Iw.PUBLIC||(s===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&re.includes(n)&&!i.includes(o.f)}))))}(a,n):s===c.Iw.ORG&&u.includes(i)))}(t,{access:r,groups:n,orgs:i})}const ie=Object.freeze(["owner","admin","member"]);function se(e,t={}){const{access:r,groups:n,orgs:i}=e;return!!(0,H.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n,orgId:i}=e,{access:s,groups:a,orgs:u}=t;return!!r&&(s===c.Iw.PUBLIC||(s===c.Iw.PRIVATE?function(e=[],t=[]){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n},typeKeywords:i}=t;return e===r&&ie.includes(n)&&!i.includes(o.f)}))))}(a,n):s===c.Iw.ORG&&u.includes(i)))}(t,{access:r,groups:n,orgs:i})}function oe(e,t,r={}){return function(e,t){return!!t.username&&e.creator===t.username}(e,r)||function(e,t){return!!(0,H.vP)(t,e.orgId)||!!e.channelAcl&&new Q.G(e).canModerateChannel(t)}(t,r)}const ae=Object.freeze(["owner","admin"]);function ce(e,t={}){return ue(e,t)}function ue(e,t={}){return!!(0,H.vP)(t,e.orgId)||function(e,t){const{username:r,groups:n=[]}=e,{access:i,groups:s=[],orgs:o=[],creator:a}=t;return!!r&&(a===r||(i===c.Iw.PRIVATE?le(s,n):le(s,n)||function(e,t){return(0,N.RN)(t)&&e.includes(t.orgId)}(o,e)))}(t,e)}function le(e,t){return e.some((e=>t.some((t=>{const{id:r,userMembership:{memberType:n}}=t;return e===r&&ae.includes(n)}))))}function de(e,t={},r){return pe(e,t,r)}function pe(e,t={},r){const{access:n,groups:i,orgs:s,allowAnonymous:o}=r;return function(e,t){return!!t.username&&e.creator===t.username}(e,t)&&function(e,t){const{groups:r=[],orgId:n}=e,{access:i,groups:s=[],orgs:o=[]}=t;return i===c.Iw.PUBLIC||(i===c.Iw.ORG?he(s,r)||o.includes(n):he(s,r))}(t,{access:n,groups:i,orgs:s,allowAnonymous:o})}function he(e,t){return e.some((e=>t.some((t=>{const{id:r,typeKeywords:n=[]}=t;return e===r&&!n.includes(o.f)}))))}var me=r(769759);function fe(e){let t;try{t=new URL(e)}catch(t){throw new Error(`Invalid URI: ${e}`)}const r=t.protocol.replace(":",""),[,n]=e.split("://"),[i,s]=n.split("/");let o,a;if(s){const{itemId:e,layerId:t}=(0,me.tS)(s);[o,a]=[e,t]}const c=new URLSearchParams(t.search.replace("?",""));return{source:r,type:i,id:o||null,layer:a||null,
22features:c.has("id")&&c.get("id").split(",")||null,attribute:c.has("attribute")&&c.get("attribute")||null}}const ge=new RegExp(`${o._}=('|")[\\w@\\.-]+('|")`,"g"),ye=new RegExp(`${o._}=`,"g"),be=new RegExp("[^\\w@\\.-]","g");function ve(e=""){const t=(e,t)=>e.replace(t,"");return(e.match(ge)||[]).reduce(((e,r)=>{const n=[ye,be].reduce(t,r);return e.indexOf(n)<0?[...e,n]:e}),[])}function we(e,t={}){return!!(0,H.vP)(t,e.orgId)||!!e.allowPost&&new Q.G(e).canPostToChannel
22(t)}function Se(e,t={}){return!!(0,H.vP)(t,e.orgId)||!!e.allowReply&&new Q.G(e).canPostToChannel(t)}function Ee(e,t,r={}){return function(e,t){return!!t.username&&e.creator===t.username}(e,r)||function(e,t){return!!(0,H.vP)(t,e.orgId)||new Q.G(e).canModerateChannel(t)}(t,r)}function Te(e,t={}){return!!(0,H.vP)(t,e.orgId)||new Q.G(e).canModerateChannel(t)}function Ie(e,t={},r){const n=e.parentId?r.allowReply:r.allowPost,i=new Q.G(r);return function(e,t){return!!t.username&&e.creator===t.username}(e,t)&&n&&i.canPostToChannel(t)}function Ce(e,t,r={}){return!!function(e,t){const{allowReaction:r,allowedReactions:n}=e;return!!r&&(!n||n.includes(t))}(e,t)&&z(e,r)}function Ae(e,t,r={}){return!!function(e,t){const{allowReaction:r,allowedReactions:n}=e;return!!r&&(!n||n.includes(t))}(e,t)&&te(e,r)}},85738:(e,t,r)=>{"use strict";r.d(t,{BV:()=>s,Ge:()=>m,KX:()=>l,Wb:()=>o,Ww:()=>h,dC:()=>d,hw:()=>p,pi:()=>u,qi:()=>a,t7:()=>c,vL:()=>f});var n=r(664879),i=r(376826);function s(e){let t=!1;return e&&(t=!(e.typeKeywords||[]).includes(n.f)),t}function o(e,t){const r=(e||[]).filter((e=>e!==n.f));return t||r.push(n.f),r}function a(e){return e.channelAcl?e.channelAcl.some((({category:e})=>[i.RI.AUTHENTICATED_USER,i.RI.ANONYMOUS_USER].includes(e))):e.access===i.Iw.PUBLIC}function c(e){return e.channelAcl?!a(e)&&e.channelAcl.some((({category:e,subCategory:t})=>e===i.RI.ORG&&t===i.B8.MEMBER)):e.access===i.Iw.ORG}function u(e){return!a(e)&&!c(e)}function l(e){let t=i.Iw.PRIVATE;return a(e)?t=i.Iw.PUBLIC:c(e)&&(t=i.Iw.ORG),t}function d(e){return e.channelAcl?e.channelAcl.reduce(((e,t)=>t.category===i.RI.ORG&&t.subCategory===i.B8.MEMBER?[...e,t.key]:e),[]):e.orgs}function p(e){return e.channelAcl?e.channelAcl.reduce(((e,t)=>t.category!==i.RI.GROUP||e.includes(t.key)?e:[...e,t.key]),[]):e.groups}function h(e,t,r){const n=p(t),i=d(t),s={group:n};let o;return o=a(t)?[{operation:"OR",predicates:[{orgid:{from:"0",to:"{"}}]}]:c(t)?[{operation:"OR",predicates:[{orgid:i},...n.length?[s]:[]]}]:[{operation:"AND",predicates:[s]}],r&&o.push({operation:"AND",predicates:[{username:{not:r}}]}),{targetEntity:"communityUser",filters:[{operation:"OR",predicates:e.reduce(((e,t)=>[...e,{username:t},{fullname:t}]),[])},...o]}}const m=(e,t)=>Object.assign(Object.assign({},e),{id:e.id,name:e.name,createdDate:new Date(e.createdAt),createdDateSource:"channel",updatedDate:new Date(e.updatedAt),updatedDateSource:"channel",type:"channel",access:l(e),family:"channel",owner:e.creator,links:{thumbnail:null,self:null,siteRelative:null},includes:{groups:t},rawResult:e});function f(e){const t=e,r=`_${new Date(Date.now()).toISOString().replace(/[^a-z0-9]/gi,"-")}.csv`;return[t.toLowerCase().replace(/[^a-z0-9]/g,"-").replace(/-{2,}/g,"-").replace(/^-/,"").substring(0,250-r.length).replace(/-$/,""),r].join("")}},933973:(e,t,r)=>{"use strict";r.d(t,{FK:()=>s,UA:()=>i,WL:()=>a,dI:()=>o});var n=r(616967);const i=[n.YH.JPG,n.YH.PNG,n.YH.PNG8,n.YH.PNG24,n.YH.PNG32],s=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML],o=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML,n.YH.FILE_GDB],a=[n.YH.CSV,n.YH.SHAPEFILE,n.YH.GEOJSON,n.YH.KML,n.YH.FILE_GDB,n.YH.FEATURE_COLLECTION,n.YH.EXCEL,n.YH.GEO_PACKAGE,n.YH.SQLITE,n.YH.JSON]},792280:(e,t,r)=>{"use strict";function n(e){return e.key.startsWith("additionalResource::")}function i(e){return parseInt(e.key.split("::")[1],10)}r.d(t,{B:()=>n,X:()=>i})},212384:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(88036);function i(e){const{type:t,typeKeywords:r=[]}=e;return t===n.qG["Image Service"]&&!r.includes("Tiled Imagery")}},279436:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(933973);function i(e){const t=e.serverExtractFormats||[];return[...n.WL.filter((e=>t.includes(e))),...t.filter((e=>!n.WL.includes(e)))].map((e=>({type:"dynamic",format:e})))}},546721:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(625873),i=r(616967),s=r(933973);function o(e){return(((0,n.W)(e,"extendedProps.server.currentVersion")||0)<10.2?s.UA.filter((e=>e!==i.YH.PNG32)):s.UA).map((e=>({type:"dynamic",format:e})))}},491958:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(933973);function i(){return n.dI.map((e=>({type:"dynamic",format:e})))}},616355:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(933973);function i(){return n.FK.map((e=>({type:"dynamic",format:e})))}},994764:(e,t,r)=>{"use strict";r.d(t,{H:()=>a});var n=r(625873),i=r(784900),s=r(50863),o=r(212384);function a(e,t){let r=null;return(0,i.K)(e)?r="createReplica":(0,s.r)(e)&&!t?r=(0,n.W)(e,"extendedProps.serverExtractCapability")?"fgdb":"paging":(0,o.X)(e)&&(r="exportImage"),r}},784900:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(599045);function i(e){return(0,n.Et)(e.url)&&!!e.serverExtractCapability}},50863:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(634250);function i(e){const t=(0,n.TD)(e.url),r="public"===e.access,i=e.serverQueryCapability;return t&&r&&i}},928906:(e,t,r)=>{"use strict";r.d(t,{g:()=>u});var n=r(625873),i=r(994764),s=r(279436),o=r(546721),a=r(616355),c=r(491958);function u(e){const t=(0,i.H)(e),r=function(e,t){let r=[];const n={createReplica:()=>{r=(0,s.z)(t)},paging:()=>{r=(0,a.i)()},fgdb:()=>{r=(0,c.h)()},exportImage:()=>{r=(0,o.v)(t)}};return n[e]&&n[e](),r}(t,e),u=(0,n.W)(e,"extendedProps.additionalResources")||[],l=(0,n.W)(e,"extendedProps.downloads"),d=r.map((e=>({key:e.format,hidden:!1})));if(u.forEach(((e,t)=>{d.push({key:`additionalResource::${t}`,hidden:!1})})),l&&l.flowType===t){const e=d.filter((e=>!l.formats.find((t=>t.key===e.key))));return{flowType:t,formats:[...l.formats.filter((e=>d.find((t=>t.key===e.key)))),...e]}}return{flowType:t,formats:d}}},730279:(e,t,r)=>{"use strict";r.d(t,{m4:()=>o.m4,My:()=>o.My,Yh:()=>o.Yh,YH:()=>o.YH,mq:()=>a,nc:()=>u,Ki:()=>f.K,mG:()=>y,r6:()=>g.r,Ag:()=>_,gZ:()=>S.g,VU:()=>A,ey:()=>d,nW:()=>p,z7:()=>C,_d:()=>l,ZE:()=>c});var n=r(170209),i=r(899415),s=r(329644),o=r(616967);const a="4326";function c(e){if("object"==typeof e){const{wkid:t,wkt:r}=e;return t?t+"":(0,i.btoa)(r)}return e}function u(e,t){const{onlyTypes:r,layerId:i,spatialRefId:c}=function(e){return e?{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId}:{}}(t),u=Object.keys(o.Yh).map((e=>o.Yh[e])),h=new Set((0,s.VF)(u.filter((e=>!e.supportsProjection)).map((e=>e.itemTypes))));let m;m=r||(0,s.VF)(u.map((e=>e.itemTypes)));const f=(new n.qp).startGroup().match(d(e)).in("typekeywords").and().match(p(i)).in("typekeywords").endGroup().and().startGroup();return function(e,t){const{types:r,noProjectionItemTypes:n,spatialRefId:i}=t,s=(e,t)=>{t.startGroup().match(/\s/g.test(e)?e:`"${e}"`).in("type").and().match(l(((e,t)=>{let r=a;return e&&!n.has(t)&&(r=e),r})(i,e))).in("typekeywords").endGroup()};r.forEach(((t,n)=>{s(t,e),n<r.length-1&&e.or()}))}(f,{types:m,spatialRefId:c,noProjectionItemTypes:h}),f.endGroup(),f.toParam()}function l(e){const t=function(e){let t;try{t=JSON.parse(e)}catch(r){t=e}return t}(e);return`spatialRefId:${c(t)}`}
22function d(e){return`exportItem:${e}`}function p(e){return e?`exportLayer:0${e}`:"exportLayer:null"}var h=r(826899),m=r(212384),f=r(784900),g=r(50863);function y(e,t){var r;return"online"===(null===(r=t.serviceStatus)||void 0===r?void 0:r["hub-downloads"])&&((0,g.r)(e)||(0,f.K)(e))}var b=r(625873),v=r(546721),w=r(792280),S=r(928906),E=r(279436),T=r(616355),I=r(491958);function C(e){let t=[];return(0,f.K)(e)?t=(0,E.z)(e):(0,g.r)(e)&&(t=(0,b.W)(e,"extendedProps.serverExtractCapability")?(0,I.h)():(0,T.i)()),t}function A(e){const{entity:t,context:r}=e;let n=[];y(t,r)?n=C(t):(0,m.X)(t)&&(n=(0,v.v)(t));const i=((0,b.W)(t,"extendedProps.additionalResources")||[]).map(O);return(0,S.g)(t).formats.reduce(((e,t)=>{if(!t.hidden){let r;if((0,w.B)(t)){const e=(0,w.X)(t);r=i[e]}else n.forEach((e=>{e.format===t.key&&(r=e)}));e.push(r)}return e}),[])}function O(e){return{type:"static",label:e.name||e.isDataSource&&"{{dataSource:translate}}"||"{{noTitle:translate}}",url:e.url}}async function _(e){!function(e){const{entity:t,context:r,format:n}=e;if(!A({entity:t,context:r}).filter((e=>"dynamic"===e.type)).map((e=>e.format)).includes(n))throw new h.Z("fetchDownloadFile",`The following format is not enabled for the entity: ${n}`)}(e);const t=null==e.pollInterval?Object.assign(Object.assign({},e),{pollInterval:3e3}):e;let n;if(y(t.entity,t.context))n=(await r.e(30385).then(r.bind(r,830385))).fetchHubApiDownloadFile;else{if(!(0,m.X)(t.entity))throw new h.Z("fetchDownloadFile","Downloads are not supported for this item in this environment");n=(await r.e(70014).then(r.bind(r,70014))).fetchExportImageDownloadFile}return n(t)}},616967:(e,t,r)=>{"use strict";r.d(t,{My:()=>s,YH:()=>i,Yh:()=>n,m4:()=>o});const n={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}};var i,s;!function(e){e.BMP="bmp",e.GIF="gif",e.JPG="jpg",e.JPG_PNG="jpgpng",e.PNG="png",e.PNG8="png8",e.PNG24="png24",e.TIFF="tiff",e.PNG32="png32",e.BIP="bip",e.BSQ="bsq",e.LERC="lerc",e.CSV="csv",e.EXCEL="excel",e.FEATURE_COLLECTION="featureCollection",e.FILE_GDB="filegdb",e.GEOJSON="geojson",e.GEO_PACKAGE="geoPackage",e.JSON="json",e.KML="kml",e.SHAPEFILE="shapefile",e.SQLITE="sqlite"}(i||(i={})),function(e){e.PENDING="pending",e.PROCESSING="processing",e.CONVERTING="converting",e.COMPLETED="completed",e.FAILED="failed"}(s||(s={}));class o extends Error{constructor(e){super(e.rawMessage),this.name="ArcgisHubDownloadError",this.message=e.rawMessage,this.messageId=e.messageId,this.operation=e.operation}}},832132:(e,t,r)=>{"use strict";r.d(t,{q:()=>h});var n=r(656110),i=r(98866),s=r(455872),o=r(934647),a=r(329644),c=r(702397),u=r(382377),l=r(826899),d=r(805959),p=r(989610);class h extends n.x{static fromJson(e,t){const r=this.applyDefaults(e,t);return new h(r,t)}static async fetch(e,t){try{const r=await(0,i.d)(e,t.hubRequestOptions);return h.fromJson(r,t)}catch(e){throw new Error("Event not found.")}}static applyDefaults(e,t){var r;return e.orgUrlKey||(e.orgUrlKey=null===(r=t.portal)||void 0===r?void 0:r.urlKey),Object.assign(Object.assign({},(0,s.H)()),e)}update(e){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");if(this.entity.id){const{updateHubEvent:e}=await Promise.resolve().then(r.bind(r,593977));this.entity=await e(this.entity,this.context.hubRequestOptions)}else{const{createHubEvent:e}=await Promise.resolve().then(r.bind(r,593977));this.entity=await e(this.entity,this.context.hubRequestOptions)}}async delete(){if(this.isDestroyed)throw new Error("HubEvent is already destroyed.");const{deleteHubEvent:e}=await Promise.resolve().then(r.bind(r,593977));await e(this.entity.id,this.context.hubRequestOptions),this.isDestroyed=!0}async shareWithGroup(e){if(!this.context.currentUser)throw new l.Z("Share Event With Group","Cannot share event with group when no user is logged in.");this.entity=await(0,c.g)([e],this.entity,this.context)}async shareWithGroups(e){this.entity=await(0,c.g)(e,this.entity,this.context)}async unshareWithGroup(e){this.entity=await(0,u.c)([e],this.entity,this.context)}async unshareWithGroups(e){this.entity=await(0,u.c)(e,this.entity,this.context)}async setAccess(e){await(0,d.eJ)(Object.assign({eventId:this.entity.id,data:{access:e.toUpperCase()}},this.context.hubRequestOptions)),this.entity.access=e}async sharedWith(){return(0,p.g)(this.entity.id,this.context)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=(0,a.kI)(this.entity);return Promise.resolve(r)}async fromEditor(e){const t=e._thumbnail,r=(0,a.kI)(e);return t&&(r.thumbnailUrl=t.url||null),this.entity=r,await this.save(),this.entity}}},567031:(e,t,r)=>{"use strict";r.d(t,{K:()=>i,g:()=>n});
22const n=["hub:event","hub:event:create","hub:event:edit","hub:event:delete","hub:event:view","hub:event:owner","hub:event:canChangeAccess","hub:event:workspace","hub:event:workspace:dashboard","hub:event:workspace:details","hub:event:workspace:settings","hub:event:workspace:collaborators","hub:event:workspace:manage","hub:event:workspace:registrants","hub:event:workspace:content","hub:event:manage"],i=[{permission:"hub:event",services:["events"],dependencies:["hub:feature:workspace"],licenses:["hub-premium"]},{permission:"hub:event:create",dependencies:["hub:event"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:event:view",services:["events"],licenses:["hub-basic","hub-premium"]},{permission:"hub:event:edit",authenticated:!0,services:["events"],dependencies:["hub:feature:workspace"],licenses:["hub-basic","hub-premium"],entityEdit:!0},{permission:"hub:event:delete",authenticated:!0,dependencies:["hub:event"],entityDelete:!0},{permission:"hub:event:owner",dependencies:["hub:event"],authenticated:!0,entityOwner:!0},{permission:"hub:event:canChangeAccess",dependencies:["hub:event"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:canChangeAccess",type:"eq",value:!0}]},{permission:"hub:event:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:event:workspace:dashboard",dependencies:["hub:event:workspace","hub:event:view"]},{permission:"hub:event:workspace:details",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:settings",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:collaborators",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:registrants",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:workspace:content",dependencies:["hub:event:workspace","hub:event:edit"]},{permission:"hub:event:manage",dependencies:["hub:event:edit"]}]},661956:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventEditorTypes:()=>o,buildSchema:()=>a});var n=r(255582),i=r(81523),s=r(210925);const o=["hub:event:create","hub:event:edit","hub:event:registrants"],a=()=>{const{startDate:e}=(0,i.k)();return{$async:!0,required:["name","startDate","endDate"],properties:{name:n.oG,startDate:{type:"string",format:"date",formatMinimum:e},startTime:{type:"string"},endTime:{type:"string"},isAllDay:{type:"boolean",default:!1}},allOf:[s.M4]}}},957837:(e,t,r)=>{"use strict";r.d(t,{b:()=>d});var n=r(178749),i=r(721347),s=r(329644),o=r(743469),a=r(535524),c=r(386924),u=r(48766),l=r(45805);class d extends n.c7{storeToEntity(e,t){var r,s,d,p,h,m,f,g;const y=(0,n.nc)(e,t,this.mappings);y.type="Event";const b=e.access.toLowerCase();return"private"===b&&(e.readGroups.length>0||e.editGroups.length>0)?y.access="shared":y.access=b,y.isCanceled=e.status===o.N3.CANCELED,y.isPlanned=e.status===o.N3.PLANNED,y.isRemoved=e.status===o.N3.REMOVED,e.attendanceType.includes(o.uA.IN_PERSON)&&e.attendanceType.includes(o.uA.VIRTUAL)?y.attendanceType=a.w.Both:e.attendanceType.includes(o.uA.IN_PERSON)?y.attendanceType=a.w.InPerson:y.attendanceType=a.w.Online,y.onlineCapacity=null!==(s=null===(r=e.onlineMeeting)||void 0===r?void 0:r.capacity)&&void 0!==s?s:null,y.onlineCapacityType=(null===(d=e.onlineMeeting)||void 0===d?void 0:d.capacity)?a.S.Fixed:a.S.Unl
22imited,y.inPersonCapacity=null!==(p=e.inPersonCapacity)&&void 0!==p?p:null,y.inPersonCapacityType=e.inPersonCapacity?a.S.Fixed:a.S.Unlimited,y.onlineDetails=null!==(m=null===(h=e.onlineMeeting)||void 0===h?void 0:h.details)&&void 0!==m?m:null,y.onlineUrl=null!==(g=null===(f=e.onlineMeeting)||void 0===f?void 0:f.url)&&void 0!==g?g:null,y.canChangeAccess=[e.permission.canSetAccessToPublic,e.permission.canSetAccessToOrg,e.permission.canSetAccessToPrivate].every(Boolean),y.canChangeStatus=[e.permission.canSetStatusToCancelled,e.permission.canSetStatusToRemoved].some(Boolean),y.referencedContentIds=e.associations.map((({entityId:e})=>e)),y.referencedContentIdsByType=e.associations.map((({entityId:e,entityType:t})=>({entityId:e,entityType:t}))),y.createdDate=new Date(e.createdAt),y.startDateTime=new Date(e.startDateTime),y.endDateTime=new Date(e.endDateTime),y.isPast=y.endDateTime<new Date,y.createdDateSource="createdAt",y.updatedDate=new Date(e.updatedAt),y.updatedDateSource="updatedAt",y.catalog=(0,i.c)(y.catalog||{}),y.links=(0,c.E)(e),y.slug=(0,u.X)(e),y.view={showMap:!!e.location},y.location=(0,l.c)(e),y}entityToStore(e,t){const r=(0,s.kI)(e),i=(0,n.Bl)(r,t,this.mappings),c=r.access;return i.access="shared"===c?o.bY.PRIVATE:c.toUpperCase(),r.isRemoved?i.status=o.N3.REMOVED:r.isCanceled?i.status=o.N3.CANCELED:i.status=o.N3.PLANNED,r.attendanceType===a.w.Both?i.attendanceType=[o.uA.IN_PERSON,o.uA.VIRTUAL]:r.attendanceType===a.w.InPerson?i.attendanceType=[o.uA.IN_PERSON]:i.attendanceType=[o.uA.VIRTUAL],[a.w.Online,a.w.Both].includes(r.attendanceType)&&(i.onlineMeeting={details:r.onlineDetails,capacity:r.onlineCapacityType===a.S.Fixed?r.onlineCapacity:null,url:r.onlineUrl}),[a.w.InPerson,a.w.Both].includes(r.attendanceType)?i.inPersonCapacity=r.inPersonCapacityType===a.S.Fixed?r.inPersonCapacity:null:i.inPersonCapacity=null,r.isAllDay&&(r.startTime="00:00:00",r.endTime="23:59:59"),i.location=r.location&&"none"!==r.location.type?{type:r.location.type,spatialReference:r.location.spatialReference,extent:r.location.extent,geometries:r.location.geometries,placeName:r.location.name}:null,i}}},386924:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var n=r(952567),i=r(653609),s=r(48766),o=r(991845);function a(e){var t;const r=(0,i.bC)("event",(0,s.X)(e));return{self:r,siteRelative:r,siteRelativeEntityType:(0,i.bC)("event"),workspaceRelative:(0,n.C)("Event",e.id),thumbnail:null!==(t=e.thumbnailUrl)&&void 0!==t?t:(0,o.P)()}}},81523:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var n=r(545381),i=r(650542),s=r(746886);const o=()=>{const e=36e5,t=new Date(Date.now()+e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()),o=r.toISOString(),a=new Date(r.valueOf()+e).toISOString(),c=(0,s.W)(),u=(0,n.X)(o,c),l=(0,n.X)(a,c);return{startDate:u,startDateTime:new Date(o),startTime:(0,i.z)(o,c),endDate:l,endDateTime:new Date(a),endTime:(0,i.z)(a,c),timeZone:c}}},48766:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(407267);function i(e){return[(0,n.l)(e.title),e.id].join("-").split("-").filter(Boolean).join("-")}},45805:(e,t,r)=>{"use strict";function n(e){return e.location?{type:e.location.type,spatialReference:e.location.spatialReference,extent:e.location.extent,geometries:e.location.geometries,name:e.location.placeName}:{type:"none"}}r.d(t,{c:()=>n})},911400:(e,t,r)=>{"use strict";function n(){return["orgId","description","id","tags","categories","timeZone","summary","notifyAttendees","allowRegistration","startDate","startTime","endDate","endTime","thumbnailUrl"].reduce(((e,t)=>[...e,{entityKey:t,storeKey:t}]),[{entityKey:"isAllDay",storeKey:"allDay"},{entityKey:"name",storeKey:"title"},{entityKey:"owner",storeKey:"creator.username"},{entityKey:"canEdit",storeKey:"permission.canEdit"},{entityKey:"canDelete",storeKey:"permission.canDelete"},{entityKey:"canChangeAccessOrg",storeKey:"permission.canSetAccessToOrg"},{entityKey:"canChangeAccessPrivate",storeKey:"permission.canSetAccessToPrivate"},{entityKey:"canChangeAccessPublic",storeKey:"permission.canSetAccessToPublic"},{entityKey:"canChangeStatusCancelled",storeKey:"permission.canSetStatusToCancelled"},{entityKey:"canChangeStatusRemoved",storeKey:"permission.canSetStatusToRemoved"},{entityKey:"readGroupIds",storeKey:"readGroups"},{entityKey:"editGroupIds",storeKey:"editGroups"},{entityKey:"inPersonRegistrationCount",storeKey:"registrationCount.inPerson"},{entityKey:"onlineRegistrationCount",storeKey:"registrationCount.virtual"}])}r.d(t,{s:()=>n})},702397:(e,t,r)=>{"use strict";r.d(t,{g:()=>a});var n=r(170209),i=r(329644),s=r(805959),o=r(991762);async function a(e,t,r){const a=n.td.bind(void 0,Object.assign({q:`id:(${e.join(" OR ")})`,num:e.length},r.requestOptions)),c=t=>t.results.length===e.length;if(!e.length)return t;try{const{results:e}=await(0,o.$)(a,c),{readGroupIds:n,editGroupIds:u}=e.reduce(((e,t)=>{const r=t.capabilities.includes("updateitemcontrol")?"editGroupIds":"readGroupIds";return Object.assign(Object.assign({},e),{[r]:[...e[r],t.id]})}),{readGroupIds:[],editGroupIds:[]}),{readGroups:l,editGroups:d}=await(0,s.eJ)(Object.assign({eventId:t.id,data:{readGroups:[...t.readGroupIds,...n].filter(i.Tw),editGroups:[...t.editGroupIds,...u].filter(i.Tw)}},r.hubRequestOptions));return Object.assign(Object.assign({},t),{readGroupIds:l,editGroupIds:d})}catch(r){throw new Error(`Entity: ${t.id} could not be shared with groups: ${e.join(", ")}`)}}},382377:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(805959);async function i(e,t,r){if(!e.length)return t;try{const{readGroups:i,editGroups:s}=await(0,n.eJ)(Object.assign({eventId:t.id,data:{readGroups:t.readGroupIds.filter((t=>!e.includes(t))),editGroups:t.editGroupIds.filter((t=>!e.includes(t)))}},r.hubRequestOptions));return Object.assign(Object.assign({},t),{readGroupIds:i,editGroupIds:s})}catch(r){throw new Error(`Entity: ${t.id} could not be unshared with groups: ${e.join(", ")}`)}}},210925:(e,t,r)=>{"use strict";r.d(t,{M4:()=>i,TD:()=>o,xn:()=>a,xs:()=>s});var n=r(535524);const i={if:{properties:{isAllDay:{const:!1}}},then:{required:["startTime","endTime"],properties:{endTime:{format:"timePickerTime",formatExclusiveMinimum:{$data:"1/startTime"}}}}},s={if:{properties:{attendanceType:{enum:[n.w.Online,n.w.Both]}}},then:{required:["onlineUrl"],properties:{onlineUrl:{format:"url"}}}},o={if:{properties:{onlineCapacityType:{const:n.S.Fixed},attendanceType:{enum:[n.w.Online,n.w.Both]}}},then:{required:["onlineCapacity"],properties:{onlineCapacity:{minimum:1}}}},a={if:{properties:{inPersonCapacityType:{const:n.S.Fixed},attendanceType:{enum:[n.w.InPerson,n.w.Both]}}},then:{required:["inPersonCapacity"],properties:{inPersonCapacity:{minimum:1}}}}},805959:(e,t,r)=>{"use strict";r.d(t,{Bt:()=>u,EY:()=>a,eJ:()=>c,gT:()=>o,yM:()=>s});var n=r(931990),i=r(743469);async function s(e){return e.token=await(0,n.Y)(e),(0,i.yM)(e.data,e)}async function o(e){return e.token=await(0,n.Y)(e),(0,i.gT)(e.data,e)}async function a(e){return e.token=await(0,n.Y)(e),(0,i.EY)(e.eventId,e)}async function c(e){return e.token=await(0,n.Y)(e),(0,i.eJ)(e.eventId,e.data,e)}async function u(e){return e.token=await(0,n.Y)(e),(0,i.Bt)(e.eventId,e)}},743469:(e,t,r)=>{"use strict";async function n(e,t){const{url:r,method:n,data:s}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:n,cache:a,credentials:c,mode:o};s&&(p.body=JSON.stringify(s));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new i(m,d,f,JSON.stringify(g.message))}r.d(t,{bY:()=>g,Cb:()=>f,uA:()=>m,ji:()=>a,LM:()=>o,N3:()=>p,rf:()=>c,sY:()=>d,Sj:()=>s,Vv:()=>l,yM:()=>y,_Y:()=>E,Bt:()=>
22S,t$:()=>I,EY:()=>v,mv:()=>T,gT:()=>b,eJ:()=>w});class i extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var s,o,a,c,u,l,d,p,h,m,f,g;!function(e){e.createdAt="createdAt",e.updatedAt="updatedAt",e.firstName="firstName",e.lastName="lastName",e.username="username"}(s||(s={})),function(e){e.asc="asc",e.desc="desc"}(o||(o={})),function(e){e.title="title",e.startDateTime="startDateTime",e.createdAt="createdAt",e.updatedAt="updatedAt"}(a||(a={})),function(e){e.associations="associations",e.creator="creator",e.location="location",e.onlineMeeting="onlineMeeting",e.registrations="registrations"}(c||(c={})),function(e){e.csv="csv",e.json="json"}(u||(u={})),function(e){e.PENDING="PENDING",e.ACCEPTED="ACCEPTED",e.DECLINED="DECLINED",e.BLOCKED="BLOCKED"}(l||(l={})),function(e){e.OWNER="OWNER",e.ORGANIZER="ORGANIZER",e.ATTENDEE="ATTENDEE"}(d||(d={})),function(e){e.PLANNED="PLANNED",e.CANCELED="CANCELED",e.REMOVED="REMOVED"}(p||(p={})),function(e){e.none="none",e.custom="custom",e.org="org",e.item="item"}(h||(h={})),function(e){e.VIRTUAL="VIRTUAL",e.IN_PERSON="IN_PERSON"}(m||(m={})),function(e){e.Hub_Site_Application="Hub Site Application",e.Hub_Initiative="Hub Initiative",e.Hub_Project="Hub Project"}(f||(f={})),function(e){e.PRIVATE="PRIVATE",e.ORG="ORG",e.PUBLIC="PUBLIC"}(g||(g={}));const y=(e,t)=>n({url:"/api/events/v1/events",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),b=(e,t)=>n({url:"/api/events/v1/events/search",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),v=(e,t)=>n({url:`/api/events/v1/events/${e}`,method:"GET"},t),w=(e,t,r)=>n({url:`/api/events/v1/events/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),S=(e,t)=>n({url:`/api/events/v1/events/${e}`,method:"DELETE"},t),E=(e,t)=>n({url:"/api/events/v1/registrations",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),T=(e,t)=>n({url:"/api/events/v1/registrations",method:"GET",params:e},t),I=(e,t)=>n({url:`/api/events/v1/registrations/${e}`,method:"DELETE"},t)},825688:(e,t,r)=>{"use strict";r.d(t,{_Y:()=>s,mv:()=>o,t$:()=>a});var n=r(931990),i=r(743469);async function s(e){return e.token=await(0,n.Y)(e),(0,i._Y)(e.data,e)}async function o(e){return e.token=await(0,n.Y)(e),(0,i.mv)(e.data,e)}async function a(e){return e.token=await(0,n.Y)(e),(0,i.t$)(e.registrationId,e)}},931990:(e,t,r)=>{"use strict";function n(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}r.d(t,{Y:()=>n})},455872:(e,t,r)=>{"use strict";r.d(t,{H:()=>o,g:()=>a});var n=r(81523),i=r(743469),s=r(535524);function o(){const e=(0,n.k)();return Object.assign(Object.assign({access:"private",allowRegistration:!0,attendanceType:s.w.InPerson,categories:[],inPersonCapacity:null,inPersonCapacityType:s.S.Unlimited,isAllDay:!1,isCanceled:!1,isDiscussable:!0,isPlanned:!0,isRemoved:!1,name:"",notifyAttendees:!0,onlineCapacity:null,onlineCapacityType:s.S.Unlimited,onlineDetails:null,onlineUrl:null,referencedContentIds:[],referencedContentIdsByType:[],schemaVersion:1,tags:[],readGroupIds:[],editGroupIds:[]},e),{view:{heroActions:[],showMap:!1},location:{type:"none"},catalogs:[]})}function a(){const{startDateTime:e,endDateTime:t}=(0,n.k)();return{access:i.bY.PRIVATE,allDay:!1,allowRegistration:!0,associations:[],attendanceType:[i.uA.IN_PERSON],categories:[],inPersonCapacity:null,editGroups:[],endDateTime:t.toISOString(),notifyAttendees:!0,readGroups:[],startDateTime:e.toISOString(),status:i.N3.PLANNED,tags:[],title:"",location:null}}},593977:(e,t,r)=>{"use strict";r.d(t,{createHubEvent:()=>l,T:()=>h,deleteHubEvent:()=>p,I:()=>m,updateHubEvent:()=>d});var n=r(911400),i=r(957837),s=r(455872),o=r(805959),a=r(825688),c=r(170209);async function u(e,t,r){const n=e.filter((({entityId:e})=>t.includes(e))),i=t.filter((e=>!n.find((({entityId:t})=>t===e))));if(i.length){const{results:e}=await(0,c.KT)({q:i.map((e=>`id:${e}`)).join(" OR "),num:i.length,authentication:r.authentication}),t=e.map((({id:e,type:t})=>({entityId:e,entityType:t})));n.push(...t)}return n}async function l(e,t){const r=Object.assign(Object.assign({},(0,s.H)()),e);r.endDate=r.startDate;const a=new i.b((0,n.s)());let c=a.entityToStore(r,(0,s.g)());const l=await u(e.referencedContentIdsByType,e.referencedContentIds,t),d={access:c.access,allDay:c.allDay,allowRegistration:c.allowRegistration,associations:l,attendanceType:c.attendanceType,categories:c.categories,description:c.description,editGroups:c.editGroups,endDate:c.endDate,endTime:c.endTime,inPersonCapacity:c.inPersonCapacity,notifyAttendees:c.notifyAttendees,onlineMeeting:c.onlineMeeting,readGroups:c.readGroups,startDate:c.startDate,
22startTime:c.startTime,summary:c.summary,tags:c.tags,timeZone:c.timeZone,title:c.title,location:c.location};return c=await(0,o.yM)(Object.assign({data:d},t)),a.storeToEntity(c,{})}async function d(e,t){var r,a;const c=Object.assign(Object.assign({},(0,s.H)()),e),l=new i.b((0,n.s)());let d=l.entityToStore(c,(0,s.g)());const p=await u(e.referencedContentIdsByType,e.referencedContentIds,t),h={access:d.access,allDay:d.allDay,allowRegistration:d.allowRegistration,associations:p,attendanceType:d.attendanceType,categories:d.categories,description:(null===(r=d.description)||void 0===r?void 0:r.trim())||null,editGroups:d.editGroups,endDate:d.endDate,endTime:d.endTime,inPersonCapacity:d.inPersonCapacity,notifyAttendees:d.notifyAttendees,onlineMeeting:d.onlineMeeting,readGroups:d.readGroups,startDate:d.startDate,startTime:d.startTime,status:d.status,summary:(null===(a=d.summary)||void 0===a?void 0:a.trim())||null,tags:d.tags,thumbnailUrl:d.thumbnailUrl||null,timeZone:d.timeZone,title:d.title,location:d.location};return d=await(0,o.eJ)(Object.assign({eventId:d.id,data:h},t)),l.storeToEntity(d,{})}async function p(e,t){await(0,o.Bt)(Object.assign({eventId:e},t))}function h(e,t){return(0,a._Y)(Object.assign({data:e},t))}async function m(e,t){await(0,a.t$)(Object.assign({registrationId:e},t))}},98866:(e,t,r)=>{"use strict";r.d(t,{d:()=>o,e:()=>a});var n=r(957837),i=r(911400),s=r(805959);function o(e,t){const r=e.split("-"),n=r[r.length-1];return(0,s.EY)(Object.assign({eventId:n,data:{include:"associations"}},t)).then((e=>a(e))).catch((()=>{throw new Error("Failed to fetch event.")}))}async function a(e,t){const r=new n.b((0,i.s)());return Promise.resolve(r.storeToEntity(e,{}))}},989610:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(170209),i=r(805959);async function s(e,t){const{editGroups:r,readGroups:s}=await(0,i.EY)(Object.assign({eventId:e},t.hubRequestOptions)),[{results:o},{results:a}]=await Promise.all([s,r].map((e=>e.length?(0,n.td)(Object.assign({q:`id:(${e.join(" OR ")})`,num:e.length},t.requestOptions)):Promise.resolve({results:[]}))));return[...o,...a]}},439756:(e,t,r)=>{"use strict";r.d(t,{IF:()=>n.I,St:()=>o.S,Tb:()=>n.T,Vq:()=>n.deleteHubEvent,eO:()=>i.e,eZ:()=>i.d,gp:()=>a.g,hy:()=>n.createHubEvent,qJ:()=>n.updateHubEvent,qz:()=>s.q,wP:()=>o.w});var n=r(593977),i=r(98866),s=r(832132),o=r(535524),a=r(989610)},535524:(e,t,r)=>{"use strict";var n,i;r.d(t,{S:()=>i,w:()=>n}),function(e){e.InPerson="inPerson",e.Online="online",e.Both="both"}(n||(n={})),function(e){e.Unlimited="unlimited",e.Fixed="fixed"}(i||(i={}))},231566:(e,t,r)=>{"use strict";r.d(t,{CF:()=>o,Dz:()=>g,Uf:()=>b,Vu:()=>s,c5:()=>c,cq:()=>u,kk:()=>d,ko:()=>m,nc:()=>y,pi:()=>p,sA:()=>a,vP:()=>f,vU:()=>l});var n=r(348753),i=r(625873);const s=e=>{const[[t,r],[n,i]]=e;return a(t,r,n,i)},o=e=>e.map((e=>e.join(", "))).join(", ");function a(e,t,r,n,i=4326){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:i}}}function c(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}const u={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function l(e){const t=e.portalSelf,r=t.defaultExtent,s=(0,i.W)(t,"helperServices.geometry.url");
22if(!s)return Promise.resolve(u);if(!r)return Promise.resolve(u);const o=`${s}/project`,a={geometryType:"esriGeometryEnvelope",geometries:[r]},c={httpMethod:"POST",params:{geometries:JSON.stringify(a),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(c.authentication=e.authentication),(0,n.WY)(o,c).then((e=>{const t=e.geometries[0];return{xmin:t.xmin,ymin:t.ymin,xmax:t.xmax,ymax:t.ymax,spatialReference:{wkid:4326}}})).catch((e=>u))}function d(e){return l(e).then((e=>c(e)))}const p=e=>Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1]);function h(e){return["xmin","ymin","xmax","ymax"].every((t=>"number"==typeof e[t]))}function m(e){return!!e&&[p,h].some((t=>t(e)))}const f=e=>{const{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:s}=e;return{rings:[[[t,i],[n,i],[n,r],[t,r],[t,i]]],spatialReference:s}},g=e=>{const{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:s}=e;return{x:(n-t)/2+t,y:(i-r)/2+r,spatialReference:s}},y=e=>{const t=[].concat(...e);for(let e=0;e<t.length;e+=2){const[r,n]=[t[e],t[e+1]];if(n<-90||n>90||r<-180||r>180)return!1}return!0},b=e=>{let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const s of e.coordinates)for(const[e,o]of s)t=Math.min(t,e),r=Math.min(r,o),n=Math.max(n,e),i=Math.max(i,o);return[[t,r],[n,i]]}},272498:(e,t,r)=>{"use strict";r.d(t,{w:()=>f});var n=r(241926),i=r(915021),s=r(973634),o=r(676432),a=r(252934),c=r(329644),u=r(934647),l=r(170209),d=r(826899),p=r(232413),h=r(348753),m=r(50950);class f{constructor(e,t){this.isDestroyed=!1,this.thumbnailCache=null,this.entity=e,this.context=t}get canEdit(){return this.entity.memberType&&("owner"===this.entity.memberType||"admin"===this.entity.memberType)||this.entity.owner===this.context.currentUser.username}get canDelete(){return this.canEdit}get isProtected(){return this.entity.protected}static fromJson(e,t){const r=this.applyDefaults(e);return new f(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e),i=f.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,n.F)(e,t.hubRequestOptions);return f.fromJson(r,t)}catch(e){throw"COM_0003: Group does not exist or is inaccessible."===e.message?new Error("Group not found."):e}}static applyDefaults(e){return Object.assign(Object.assign({},s.P$),e)}toJson(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");return(0,c.kI)(this.entity)}update(e){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.entity.id?this.entity=await(0,n.q7)(this.entity,this.context.userRequestOptions):this.entity=await(0,n.LJ)(this.entity,this.context.userRequestOptions)}async delete(){if(this.isDestroyed)throw new Error("HubGroup is already destroyed.");this.isDestroyed=!0,await(0,n.KD)(this.entity.id,this.context.userRequestOptions)}checkPermission(e){return(0,o.P)(e,this.context,this.entity)}getPermissionPolicies(e){return this.entity.permissions.filter((t=>t.permission===e))}addPermissionPolicy(e){this.entity.permissions=(0,a.a)(this.entity.permissions,e)}removePermissionPolicy(e,t){this.entity.permissions=(0,a.T)(this.entity.permissions,e,t)}async getEditorConfig(e,t){return(0,u.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,m.t)((0,c.kI)(this.entity),t,this.context.hubRequestOptions):(0,c.kI)(this.entity)}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}if(delete e._thumbnail,this.thumbnailCache)if(this.thumbnailCache.clear)await async function(e,t){const{portal:r}=t,n=`${r}/community/groups/${e}/deleteThumbnail`;return(0,h.WY)(n,t)}(this.entity.id,this.context.userRequestOptions);else{await async function(e,t,r,n,i){const s=Object.assign({group:{id:e},owner:i,params:{thumbnail:t,fileName:r},filename:r},n);try{if(!(await(0,l.mD)(s)).success)throw new d.Z("Set Group Thumbnail","Unknown error setting thumbnail.")}catch(e){throw e instanceof Error?new d.Z("Set Group Thumbnail",e.message,e):new d.Z("Set Group Thumbnail","Unknown error setting thumbnail.")}}(this.entity.id,this.thumbnailCache.file,this.thumbnailCache.filename,this.context.userRequestOptions,this.entity.owner),this.entity.thumbnail=`thumbnail/${this.thumbnailCache.filename}`;const e=(0,i.Q)(this.entity);this.entity.thumbnailUrl=(0,p.PP)(this.context.userRequestOptions.portal,e),this.thumbnailCache=null}const t=(0,c.kI)(e);return this.entity=t,await this.save(),this.entity}}},241926:(e,t,r)=>{"use strict";r.d(t,{LJ:()=>E,KD:()=>C,Fx:()=>S,F:()=>T,q7:()=>I});var n=r(170209),i=r(815985),s=r(625873),o=r(597633),a=r(477448);const c=(e,t,r)=>{const{data:n,stack:s,requestOptions:o}=t;return s.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:(0,i.g)(e,n.errors)}),stack:s,requestOptions:o}},u={membershipSummary:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupMembershipSummary"),o=Object.assign({num:3},i);return(0,n.zv)(t.group.id,o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{membershipSummary:{total:e.total,users:e.users}}),stack:r,requestOptions:i}
22))).catch((t=>c(t,e,s)))},contentCount:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupContentCount"),o=Object.assign({groupId:t.group.id,num:1},i);return(0,n.Nt)(o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{contentCount:e.total}),stack:r,requestOptions:i}))).catch((t=>c(t,e,s)))},userMembership:e=>{const{data:t,stack:r,requestOptions:i}=e,o=r.start("enrichGroupUserMembership");return(0,n.ex)(t.group.id,i).then((e=>(r.finish(o),{data:Object.assign(Object.assign({},t),{membershipAccess:e.membershipAccess,userMembership:(0,s.W)(e,"userMembership.memberType")}),stack:r,requestOptions:i}))).catch((t=>c(t,e,o)))}};var l=r(466674),d=r(295426),p=r(329644),h=r(76309),m=r(973634),f=r(915021),g=r(98931),y=r(85738),b=r(381086),v=r(583872);async function w(e,t,r=0){let n=e;return r&&(n=`${e} ${r}`),async function(e,t){const r={targetEntity:"group",filters:[{predicates:[{title:e}]}]};try{const{results:e}=await(0,v.B)(r,{requestOptions:t});return e.length>0}catch(e){throw Error(`Error in getUniqueGroupTitle > doesGroupExist: ${e}`)}}(n,t).then((i=>i?(r++,w(e,t,r)):n)).catch((e=>{throw Error(`Error in getUniqueGroupTitle: ${e}`)}))}async function S(e,t,r){const n={access:e.access,id:e.id,type:"Group",name:e.title,owner:e.owner,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"group.created",updatedDate:new Date(e.modified),updatedDateSource:"group.modified",family:"team",links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},rawResult:e};n.isSharedUpdate=(e.capabilities||[]).includes("updateitemcontrol"),n.membershipAccess=e.membershipAccess,n.isOpenData=!!e.isOpenData;const i=(t=[...t].filter(p.Tw)).map(d.u),c=(0,h.e)("enrichment",i).filter(p.Tw);let l={};return c.length&&(l=await function(e,t,r){const n=t.reduce(((e,t)=>{const r=u[t];return r&&e.push(r),e}),[]);return(0,a.G)(n)({data:{group:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}(e,c,r)),i.forEach((e=>{n[e.prop]=(0,s.W)(l,e.path)})),n.links=(0,b.E)(e,r),n}async function E(e,t){const r=Object.assign(Object.assign({},m.P$),e),i=await w(r.name,t);r.name=i,r.typeKeywords=(0,y.Wb)(r.typeKeywords,r.isDiscussable);const s=(0,f.Q)(r),o={group:s,authentication:t.authentication},a=await(0,n.sS)(o);return s.protected&&(a.group.protected=(await(0,n.Et)({id:a.group.id,authentication:t.authentication})).success),(0,g.f)(a.group,t)}async function T(e,t){const r=await(0,n.ex)(e,t);return(0,g.f)(r,t)}async function I(e,t){e.typeKeywords=(0,y.Wb)(e.typeKeywords,e.isDiscussable);const r=(0,f.Q)(e),i={group:r,authentication:t.authentication};return r._clearEmptyFields&&(0,l.t)("params.clearEmptyFields",!0,i),await(0,n.mD)(i),e}async function C(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,n.BN)(r)}},143554:(e,t,r)=>{"use strict";r.d(t,{q:()=>n,y:()=>i});const n=["hub:group","hub:group:create","hub:group:create:view","hub:group:create:edit","hub:group:delete","hub:group:edit","hub:group:view","hub:group:owner","hub:group:canChangeAccess","hub:group:canAssignMembers","hub:group:workspace","hub:group:workspace:overview","hub:group:workspace:dashboard","hub:group:workspace:details","hub:group:workspace:discussion","hub:group:workspace:settings","hub:group:workspace:collaborators","hub:group:workspace:content","hub:group:workspace:members","hub:group:shareContent","hub:group:manage"],i=[{permission:"hub:group",services:["portal"]},{permission:"hub:group:create",dependencies:["hub:group"],authenticated:!0,privileges:["portal:user:createGroup"],assertions:[{property:"context:currentUser.groups",type:"length-lt",value:"context:portal.limits.MaxNumUserGroups"}]},{permission:"hub:group:create:view",dependencies:["hub:group:create"]},{permission:"hub:group:create:edit",dependencies:["hub:group:create"],privileges:["portal:admin:createUpdateCapableGroup"]},{permission:"hub:group:view",dependencies:["hub:group"]},{permission:"hub:group:edit",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:updateGroups"]}
22,{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:updateGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:delete",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:deleteGroups"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:deleteGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:manage",assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:updateGroups","portal:admin:deleteGroups","portal:admin:assignToGroups","portal:admin:shareToGroup"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:updateGroups","portal:admin:deleteGroups","portal:admin:assignToGroups","portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:owner",dependencies:["hub:group"],authenticated:!0,entityOwner:!0},{permission:"hub:group:canChangeAccess",dependencies:["hub:group:edit"]},{permission:"hub:group:canAssignMembers",dependencies:["hub:group"],authenticated:!0,assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-admin",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:assignToGroups"]},{conditions:[{property:"context:currentUser.privileges",type:"without",value:["portal:admin:assignToGroups"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]},{permission:"hub:group:workspace",dependencies:["hub:feature:workspace","hub:group:manage"]},{permission:"hub:group:workspace:overview",availability:["alpha"],dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:details",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:discussion",services:["discussions"],dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:settings",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:content",dependencies:["hub:group:workspace"]},{permission:"hub:group:workspace:members",dependencies:["hub:group:workspace"]},{permission:"hub:group:shareContent",dependencies:["hub:group"],authenticated:!0,privileges:["portal:user:shareToGroup"],assertions:[{conditions:[{property:"context:currentUser",type:"is-not-group-member",value:"entity:id"}],property:"context:currentUser.privileges",type:"contains",value:["portal:admin:shareToGroup"]},{conditions:[{property:"entity:isViewOnly",type:"eq",value:!1},{property:"context:currentUser.privileges",type:"without",value:["portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-member",value:"entity:id"},{conditions:[{property:"entity:isViewOnly",type:"eq",value:!0},{property:"context:currentUser.privileges",type:"without",value:["portal:admin:shareToGroup"]}],property:"context:currentUser",type:"is-group-admin",value:"entity:id"}]}]},667902:(e,t,r)=>{"use strict";r.d(t,{GroupSchema:()=>s,v:()=>i});var n=r(255582);const i=["hub:group:edit","hub:group:settings","hub:group:discussions","hub:group:create:followers","hub:group:create:association","hub:group:create:view","hub:group:create:edit","hub:group:create"],s={required:["name"],type:"object",properties:{name:n.oG,summary:Object.assign(Object.assign({},n.Z3),{maxLength:250}),description:{type:"string"},_thumbnail:n.W6,access:{type:"string",enum:["private","org","public"],default:"private"},isSharedUpdate:{type:"boolean",enum:[!1,!0],default:!1},leavingDisallowed:{type:"boolean",enum:[!1,!0],default:!1},isOpenData:{type:"boolean",enum:[!1,!0],default:!1},membershipAccess:{type:"string",enum:["organization","collaborators","anyone"],default:"organization"}
22,isViewOnly:{type:"boolean",enum:[!1,!0],default:!1},_join:{type:"string",enum:["invite","request","auto"],default:"invite"},hiddenMembers:{type:"boolean",enum:[!1,!0],default:!1},isDiscussable:n.PH,tags:n.Ld}}},381086:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var n=r(952567),i=r(286455),s=r(232413),o=r(653609);function a(e,t){let r;return t.authentication&&(r=t.authentication.token),{self:(0,i.t)(e.id,t),siteRelative:`/groups/${e.id}`,siteRelativeEntityType:(0,o.bC)("Group"),workspaceRelative:(0,n.C)("Group",e.id),thumbnail:(0,s.PP)(t.portal,e,r)}}},98931:(e,t,r)=>{"use strict";r.d(t,{f:()=>c});var n=r(178749),i=r(85738),s=r(232413),o=r(381086),a=r(481928);function c(e,t){return function(e,t,r){var n,a,c;let u;return r.authentication&&(u=r.authentication.token),t.thumbnailUrl=(0,s.PP)(r.portal,e,u),t.createdDate=new Date(e.created),t.createdDateSource="group.created",t.updatedDate=new Date(e.modified),t.updatedDateSource="group.modified",t.type="Group",t.isDiscussable=(0,i.BV)(e),t.isSharedUpdate=(e.capabilities||[]).includes("updateitemcontrol"),t.memberType=null===(n=e.userMembership)||void 0===n?void 0:n.memberType,t.membershipAccess="anyone","org"===e.membershipAccess&&(t.membershipAccess="organization"),"collaboration"===e.membershipAccess&&(t.membershipAccess="collaborators"),t.canEdit="owner"===(null===(a=e.userMembership)||void 0===a?void 0:a.memberType)||"admin"===(null===(c=e.userMembership)||void 0===c?void 0:c.memberType),t.canDelete=t.canEdit,t.links=(0,o.E)(e,r),t}(e,new n.c7((0,a.s)()).storeToEntity(e,{}),t)}},915021:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});var n=r(178749),i=r(481928);function s(e){switch(e._join){case"invite":e.isInvitationOnly=!0,e.autoJoin=!1;break;case"request":e.isInvitationOnly=!1,e.autoJoin=!1;break;case"auto":e.isInvitationOnly=!1,e.autoJoin=!0}const t=new n.c7((0,i.s)()).entityToStore(e,{});return e.isSharedUpdate&&(t.capabilities="updateitemcontrol"),"organization"===t.membershipAccess&&(t.membershipAccess="org"),"collaborators"===t.membershipAccess&&(t.membershipAccess="collaboration"),"anyone"===t.membershipAccess&&(t.membershipAccess="",t._clearEmptyFields=!0),t}},481928:(e,t,r)=>{"use strict";function n(){const e=[];return e.push({entityKey:"name",storeKey:"title"}),e.push({entityKey:"summary",storeKey:"snippet"}),e.push({entityKey:"permissions",storeKey:"properties.permissions"}),["access","autoJoin","description","id","isInvitationOnly","isDiscussable","isReadOnly","isViewOnly","membershipAccess","owner","orgId","protected","sortField","sortOrder","tags","thumbnail","thumbnailUrl","typeKeywords","userMembership","isOpenData","hiddenMembers","leavingDisallowed"].forEach((t=>{e.push({entityKey:t,storeKey:t})})),e}r.d(t,{s:()=>n})},853660:(e,t,r)=>{"use strict";r.d(t,{H:()=>s});var n=r(609205),i=r(170209);function s(e){const t=(0,n.D)(i.R9,{success:!0}),r=(0,n.D)(i.BN,{success:!0});return t(e).then((()=>r(e)))}},319669:(e,t,r)=>{"use strict";r.d(t,{c:()=>m});var n=r(625873),i=r(551753),s=r(329644),o=r(974538),a=r(903768),c=r(374440),u=r(75961),l=r(828110),d=r(903056),p=r(278751),h=r(807012);function m(e,t,r,m,f){const g=(0,s.kI)((0,i.t)(r,"portalSelf.user",{}));g.cOrgId=(0,n.W)(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId");const y={groupId:e,allUsers:t,primaryRO:r,email:m,secondaryRO:f,requestingUser:g,usersToAutoAdd:(0,d.J)(t,g),usersToInvite:(0,h.X)(t,g),usersToEmail:(0,p.o)(t,g,(0,n.W)(m,"copyMe"))};return(0,a.p)(y).then(c.y).then(u.y).then(l.N).then(o.I)}},275662:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_canEmailUser:()=>i.nA,_consolidateResults:()=>n.It,_formatAutoAddResponse:()=>n.ol,_getAutoAddUsers:()=>i.J2,_getEmailUsers:()=>i.oC,_getInviteUsers:()=>i.Xt,_isOrgAdmin:()=>i.OJ,_processAutoAdd:()=>n.pZ,_processInvite:()=>n.yO,_processPrimaryEmail:()=>n.yW,_processSecondaryEmail:()=>n.Nr,addUsersToGroup:()=>s.c});var n=r(981600),i=r(839855),s=r(319669),o=r(606931),a={};for(const e in o)["default","_consolidateResults","_formatAutoAddResponse","_processAutoAdd","_processInvite","_processPrimaryEmail","_processSecondaryEmail","_canEmailUser","_getAutoAddUsers","_getEmailUsers","_getInviteUsers","_isOrgAdmin","addUsersToGroup"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a)},606931:()=>{},974538:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=r(551753);function i(e){const{autoAddResult:t,inviteResult:r,primaryEmailResult:i,secondaryEmailResult:s}=e;let o;if(i||s){const e=[i,s].filter((e=>e)),t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat((0,
23n.t)(t,"errors",[]))),[]);o={success:t},r.length&&(o.errors=r)}return{success:[t,r,o].filter((e=>e)).every((e=>e.success)),autoAdd:t,invite:r,email:o}}},444686:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(348753),i=r(625873),s=r(620450);function o(e,t){if(e){const r=!(0,i.W)(e,"notAdded.length")&&!e.errors;if(t.autoAddResult={success:r},!r){const r=e.errors||[];(0,i.W)(e,"notAdded.length")&&r.push(new n.yE(`Users not auto-added: ${e.notAdded.join(", ")}`)),t.autoAddResult.errors=r;const o=t.usersToAutoAdd.filter((t=>(0,s.q)(e.notAdded,t.username)));t.usersToInvite=t.usersToInvite.concat(o)}}return t}},903768:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(625873),i=r(510360),s=r(444686);function o(e){return(0,i.a)((0,n.W)(e,"groupId"),(0,n.W)(e,"usersToAutoAdd"),(0,n.W)(e,"primaryRO.authentication")).then((t=>(0,s.o)(t,e)))}},374440:(e,t,r)=>{"use strict";r.d(t,{y:()=>s});var n=r(625873),i=r(673779);function s(e){return(0,i.p)((0,n.W)(e,"groupId"),(0,n.W)(e,"usersToInvite"),(0,n.W)(e,"primaryRO.authentication")).then((t=>(e.inviteResult=t,e)))}},75961:(e,t,r)=>{"use strict";r.d(t,{y:()=>o});var n=r(625873),i=r(161620),s=r(410148);function o(e){let t=Promise.resolve(e);return e.email&&(0,n.W)(e,"inviteResult.success")&&(t=(0,s.M)(e.usersToEmail,e.email,e.primaryRO.authentication,(0,i.O)(e.requestingUser)).then((t=>(e.primaryEmailResult=t,e)))),t}},828110:(e,t,r)=>{"use strict";r.d(t,{N:()=>c});var n=r(290657),i=r(161620),s=r(625873),o=r(551753),a=r(410148);function c(e){let t=Promise.resolve(e);if(e.email&&e.secondaryRO&&(0,s.W)(e,"inviteResult.success")){const r=(0,o.t)(e,"secondaryRO.portalSelf.user",{}),s=e.usersToInvite.filter((e=>(0,n.n)(e,r)));t=(0,a.M)(s,e.email,e.secondaryRO.authentication,(0,i.O)(r)).then((t=>(e.secondaryEmailResult=t,e)))}return t}},981600:(e,t,r)=>{"use strict";r.d(t,{It:()=>n.I,Nr:()=>s.N,ol:()=>i.o,pZ:()=>o.p,yO:()=>a.y,yW:()=>c.y});var n=r(974538),i=r(444686),s=r(828110),o=r(903768),a=r(374440),c=r(75961)},290657:(e,t,r)=>{"use strict";function n(e,t){return e.orgId===t.orgId}r.d(t,{n:()=>n})},903056:(e,t,r)=>{"use strict";function n(e,t){let r=[];if(-1!==t.privileges.indexOf("portal:admin:assignToGroups")){const n=[t.orgId,t.cOrgId].filter((e=>e));r=e.filter((e=>-1!==n.indexOf(e.orgId)))}return r}r.d(t,{J:()=>n})},278751:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(290657),i=r(807012);function s(e,t,r=!1){const s=(0,i.X)(e,t).filter((e=>(0,n.n)(e,t)));return r&&s.push(t),s}},807012:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(903056);function i(e,t){const r=(0,n.J)(e,t);return e.filter((e=>!r.some((t=>t.username===e.username))))}},161620:(e,t,r)=>{"use strict";function n(e){return"org_admin"===e.role&&!e.roleId}
23r.d(t,{O:()=>n})},839855:(e,t,r)=>{"use strict";r.d(t,{J2:()=>i.J,OJ:()=>a.O,Xt:()=>o.X,nA:()=>n.n,oC:()=>s.o});var n=r(290657),i=r(903056),s=r(278751),o=r(807012),a=r(161620)},549854:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var n=r(609205),i=r(510360),s=r(673779);async function o(e,t,r,o){const a=[],c=[],u=[],l=[],d=[];for(const p of t){let t=!0;const h={username:p,add:null,invite:null},m={username:p},f=(0,n.D)(i.a),g=(0,n.D)(s.p);if(o){const n=await f(e,[m],r.authentication);h.add=n,n.notAdded&&0!==n.notAdded.length?u.push(p):(t=!1,a.push(p))}if(t){const t=await g(e,[m],r.authentication);h.invite=t,t.success?c.push(p):l.push(p)}d.push(h)}return{added:a,invited:c,notAdded:u,notInvited:l,responses:d}}},510360:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(170209);function i(e,t,r){let i=Promise.resolve(null);if(t.length){const s={id:e,users:t.map((e=>e.username)),authentication:r};i=(0,n.i1)(s)}return i}},973634:(e,t,r)=>{"use strict";r.d(t,{P$:()=>n});const n={name:"",access:"private",permissions:[],typeKeywords:[]}},410148:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(170209);function i(e,t,r,i){let s=Promise.resolve(null);if(e.length){const o={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map((e=>e.username))};i||(o.batchSize=1),s=(0,n.Dh)(o)}return s}},693620:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(676432);function i(e,t){return{hubGroup:{access:"private",autoJoin:!1,isSharedUpdate:!1,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:"organization"},hubViewGroup:{access:"org",autoJoin:!1,isSharedUpdate:!1,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"anyone":"organization"},hubEditGroup:{access:"org",autoJoin:!1,isSharedUpdate:!0,isInvitationOnly:!1,hiddenMembers:!1,isViewOnly:!1,leavingDisallowed:!1,tags:["Hub Group"],membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"collaborators":"organization"},hubFollowersGroup:{access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!0,leavingDisallowed:!1},hubAssociationsGroup:{access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!0,leavingDisallowed:!1,membershipAccess:(0,n.P)("platform:portal:user:addExternalMembersToGroup",t).access?"anyone":"organization",protected:!0}}[e]}},304674:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HubGroup:()=>c.w,_unprotectAndRemoveGroup:()=>n.H,addGroupMembers:()=>u.b,autoAddUsers:()=>p.a,createHubGroup:()=>a.LJ,deleteHubGroup:()=>a.KD,emailOrgUsers:()=>m.M,enrichGroupSearchResult:()=>a.Fx,fetchHubGroup:()=>a.F,getWellKnownGroup:()=>l.o,inviteUsers:()=>h.p,isOpenDataGroup:()=>d.U,updateHubGroup:()=>a.q7});var n=r(853660),i=r(275662),s={};for(const e in i)["default","_unprotectAndRemoveGroup"].indexOf(e)<0&&(s[e]=()=>i[e]);r.d(t,s);var o=r(116552);s={};for(const e in o)["default","_unprotectAndRemoveGroup","_canEmailUser","_consolidateResults","_formatAutoAddResponse","_getAutoAddUsers","_getEmailUsers","_getInviteUsers","_isOrgAdmin","_processAutoAdd","_processInvite","_processPrimaryEmail","_processSecondaryEmail","addUsersToGroup"].indexOf(e)<0&&(s[e]=()=>o[e]);r.d(t,s);var a=r(241926),c=r(272498),u=r(549854),l=r(693620),d=r(169448),p=r(510360),h=r(673779),m=r(410148)},673779:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(170209);function i(e,t,r,i=20160,s="group_member"){let o=Promise.resolve(null);if(t.length){const a={id:e,users:t.map((e=>e.username)),authentication:r,role:s,expiration:i};o=(0,n.ee)(a)}return o}},169448:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});const n=e=>!!e.isOpenData},919282:()=>{},116552:(e,t,r)=>{"use strict";r.r(t);var n=r(919282),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(92236);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i)},92236:()=>{},88036:(e,t,r)=>{"use strict";r.d(t,{CK:()=>n,Mz:()=>a,b9:()=>i,i$:()=>o,if:()=>c,qG:()=>s});const n=["app","content","dataset","document","event","feedback","initiative","map","people","site","team","template","project","channel","discussion","eventAttendee","organization"];var i,s;!function(e){e.aptx="aptx",e.bpk="bpk",e.csv="csv",e.eaz="eaz",e.esriaddin="esriaddin",e.esriaddinx="esriaddinx",e.doc="doc",e.docx="docx",e.dlpk="dlpk",e.featurecollection="featurecollection",e.geojson="geojson",e.gcpk="gcpk",e.gpk="gpk",e.gpkg="gpkg",e.gpkx="gpkx",e.insightswbk="insightswbk",e.ipynb="ipynb",e.jpg="jpg",e.jpeg="jpeg",e.json="json",e.key="key",e.kml="kml",e.kmz="kmz",e.lpk="lpk",e.lpkx="lpkx",e.lyr="lyr",e.lyrx="lyrx",e.mapx="mapx",e.mmpk="mmpk",e.mpk="mpk",e.mpkx="mpkx",e.msd="msd",e.mspk="mspk",e.mxd="mxd",e.ncfg="ncfg",e.nmc="nmc",e.nmf="nmf",e.numbers="numbers",e.pages="pages",e.pagx="pagx",e.parquet="parquet",e.pdf="pdf",e.pmf="pmf",e.png="png",e.ppkx="ppkx",e.ppt="ppt",e.pptx="pptx",e.proconfigx="proconfigx",e.rpk="rpk",e.rptx="rptx",e.sd="sd",e.
23slpk="slpk",e.spk="spk",e.stylx="stylx",e.surveyaddin="surveyaddin",e.sxd="sxd",e.tif="tif",e.tiff="tiff",e.tpk="tpk",e.tpkx="tpkx",e.vsd="vsd",e.vtpk="vtpk",e.wmpk="wmpk",e.wpk="wpk",e.xls="xls",e.xml="xml",e.xlsx="xlsx",e.zip="zip",e["3dd"]="3dd",e["3vr"]="3vr",e["3ws"]="3ws",e["rft.json"]="rft.json",e["rft.xml"]="rft.xml"}(i||(i={})),function(e){e["360 VR Experience"]="360 VR Experience",e["Apache Parquet"]="Apache Parquet",e["AppBuilder Widget Package"]="AppBuilder Widget Package",e["Desktop Add In"]="Desktop Add In",e["Explorer Add In"]="Explorer Add In",e["Explorer Map"]="Explorer Map",e["Explorer Layer"]="Explorer Layer",e["Windows Mobile Package"]="Windows Mobile Package",e["ArcGIS Pro Add In"]="ArcGIS Pro Add In",e["ArcGIS Pro Configuration"]="ArcGIS Pro Configuration",e["Globe Document"]="Globe Document",e["Map Document"]="Map Document",e["ArcPad Package"]="ArcPad Package",e["Published Map"]="Published Map",e["Scene Document"]="Scene Document",e["CityEngine Web Scene"]="CityEngine Web Scene",e["Code Sample"]="Code Sample",e["CSV Collection"]="CSV Collection",e.CSV="CSV",e["CAD Drawing"]="CAD Drawing",e["Deep Learning Package"]="Deep Learning Package",e["Desktop Application"]="Desktop Application",e["Desktop Application Template"]="Desktop Application Template",e["Desktop Style"]="Desktop Style",e["Earth Configuration"]="Earth Configuration",e["Feature Collection"]="Feature Collection",e["File Geodatabase"]="File Geodatabase",e.GeoJson="GeoJson",e["Geoprocessing Package"]="Geoprocessing Package",e.GeoPackage="GeoPackage",e["Geoprocessing Sample"]="Geoprocessing Sample",e.GML="GML",e["Image Collection"]="Image Collection",e.Image="Image",e["iWork Keynote"]="iWork Keynote",e["iWork Numbers"]="iWork Numbers",e["iWork Pages"]="iWork Pages",e["KML Collection"]="KML Collection",e.KML="KML",e.Layer="Layer",e["Layer Package"]="Layer Package",e.Layout="Layout",e["Locator Package"]="Locator Package",e["Map Package"]="Map Package",e["Map Template"]="Map Template",e["Microsoft Excel"]="Microsoft Excel",e["Microsoft Powerpoint"]="Microsoft Powerpoint",e["Visio Document"]="Visio Document",e["Microsoft Word"]="Microsoft Word",e["Mobile Basemap Package"]="Mobile Basemap Package",e["Mobile Map Package"]="Mobile Map Package",e["Mobile Scene Package"]="Mobile Scene Package",e.Notebook="Notebook",e.PDF="PDF",e["Pro Map"]="Pro Map",e["Pro Report"]="Pro Report",e["Project Package"]="Project Package",e["Project Template"]="Project Template",e["Raster function template"]="Raster function template",e["Rule Package"]="Rule Package",e["Scene Package"]="Scene Package",e["Service Definition"]="Service Definition",e.Shapefile="Shapefile",e["Survey123 Add In"]="Survey123 Add In",e["Tile Package"]="Tile Package",e["Vector Tile Package"]="Vector Tile Package",e["Workflow Manager Package"]="Workflow Manager Package",e["Document Link"]="Document Link",e["Feature Service"]="Feature Service",e["Geocoding Service"]="Geocoding Service",e["Geodata Service"]="Geodata Service",e["Geometry Service"]="Geometry Service",e["Geoprocessing Service"]="Geoprocessing Service",e["Geoenrichment Service"]="Geoenrichment Service",e["Globe Service"]="Globe Service",e["Image Service"]="Image Service",e["Map Service"]="Map Service",e["Network Analysis Service"]="Network Analysis Service",e["Vector Tile Service"]="Vector Tile Service",e.WFS="WFS",e.WMS="WMS",e.WMTS="WMTS",e.OGCFeatureServer="OGCFeatureServer",e["Scene Service"]="Scene Service",e["Stream Service"]="Stream Service",e["Workflow Manager Service"]="Workflow Manager Service",e["Web Mapping Application"]="Web Mapping Application",e["Mobile Application"]="Mobile Application",e["AppBuilder Extension"]="AppBuilder Extension",e["Google Drive"]="Google Drive",e.Dropbox="Dropbox",e.OneDrive="OneDrive",e.StoryMap="StoryMap",e.Dashboard="Dashboard",e["Hub Project"]="Hub Project",e["Hub Initiative"]="Hub Initiative",e["Hub Site Application"]="Hub Site Application",e["Web Experience"]="Web Experience",e["Insights Workbook Package"]="Insights Workbook Package",e.Application="Application",e["ArcGIS Explorer Application Configuration"]="ArcGIS Explorer Application Configuration",e["ArcMap Document"]="ArcMap Document",e["Layer File"]="Layer File",e.ogcFeature="ogcFeature",e.FeatureServer="Feature Service",e.GeocodeServer="GeocodeServer",e.GeoDataServer="GeoDataServer",e.GeometryServer="GeometryServer",e.GeoenrichmentServer="GeoenrichmentServer",e.GPServer="GPServer",e.GlobeServer="GlobeServer",e.ImageServer="ImageServer",e.MapServer="MapServer",e.NAServer="NAServer",e.ElevationServer="ElevationServer",e.VectorTileServer="VectorTileServer",e["Scene Server"]="Scene Server",e.StreamServer="StreamServer",e.WMServer="WMServer",e.TiledImageServer="TiledImageServer"}(s||(s={}));const o={"360 VR Experience":{fileExt:[i["3dd"]],type:s["360 VR Experience"],t
23ypeKeywords:[]},"Apache Parquet":{fileExt:[i.parquet],type:s["Apache Parquet"],typeKeywords:[]},"AppBuilder Widget Package":{fileExt:[i.zip],type:s["AppBuilder Widget Package"],typeKeywords:[]},"Desktop Add In":{fileExt:[i.esriaddin],type:s["Desktop Add In"],typeKeywords:["Tool","Add In","Desktop Add In","ArcGIS Desktop","ArcMap","ArcGlobe","ArcScene","esriaddin"]},"Explorer Add In":{fileExt:[i.eaz],type:s["Explorer Add In"],typeKeywords:["Tool","Add In","Explorer Add In","ArcGIS Explorer","eaz"]},"Explorer Map":{fileExt:[i.nmf],type:s["Explorer Map"],typeKeywords:["Map","Explorer Map","Explorer Document","2D","3D","ArcGIS Explorer","nmf"]},"ArcGIS Explorer Application Configuration":{fileExt:[i.ncfg],type:s["Explorer Map"],typeKeywords:["Map","Explorer Map","Explorer Mapping Application","2D","3D","ArcGIS Explorer"]},"Explorer Layer":{fileExt:[i.nmc],type:s["Explorer Layer"],typeKeywords:["Data","Layer","Explorer Layer","ArcGIS Explorer","nmc"]},"Windows Mobile Package":{fileExt:[i.wmpk],type:s["Windows Mobile Package"],typeKeywords:[]},"ArcGIS Pro Add In":{fileExt:[i.esriaddinx],type:s["ArcGIS Pro Add In"],typeKeywords:["Tool","Add In","Pro Add In","esriaddinx"]},"ArcGIS Pro Configuration":{fileExt:[i.proconfigx],type:s["ArcGIS Pro Configuration"],typeKeywords:[]},"Globe Document":{fileExt:[i["3dd"]],type:s["Globe Document"],typeKeywords:["Map","Globe Document","3D","ArcGlobe","ArcGIS Server","3dd"]},"Map Document":{fileExt:[i.msd],type:s["Map Document"],typeKeywords:["Map Document","Map","2D","ArcMap","ArcGIS Server","msd"]},"ArcMap Document":{fileExt:[i.mxd],type:s["Map Document"],typeKeywords:["Map Document","Map","2D","ArcMap","ArcGIS Server"]},"ArcPad Package":{fileExt:[i.zip],type:s["ArcPad Package"],typeKeywords:["Map","Layer","Data"]},"Published Map":{fileExt:[i.pmf],type:s["Published Map"],typeKeywords:["Map","Published Map","2D","ArcReader","ArcMap","ArcGIS Server","pmf"]},"Scene Document":{fileExt:[i.sxd],type:s["Scene Document"],typeKeywords:["Map","Scene Document","3D","ArcScene","sxd"]},"CityEngine Web Scene":{fileExt:[i["3ws"]],type:s["CityEngine Web Scene"],typeKeywords:["3D","Map","Scene","Web"]},"Code Sample":{fileExt:[i.zip],type:s["Code Sample"],typeKeywords:["Code","Sample"]},"CSV Collection":{fileExt:[i.zip],type:s["CSV Collection"],typeKeywords:[]},CSV:{fileExt:[i.csv],type:s.CSV,typeKeywords:["CSV"]},"CAD Drawing":{fileExt:[i.zip],type:s["CAD Drawing"],typeKeywords:[]},"Deep Learning Package":{fileExt:[i.zip,i.dlpk],type:s["Deep Learning Package"],typeKeywords:["Deep Learning","Raster"]},"Desktop Application":{type:s["Desktop Application"],typeKeywords:["Desktop Application"]},"Desktop Application Template":{fileExt:[i.zip],type:s["Desktop Application Template"],typeKeywords:["application","template","ArcGIS desktop"]},"Desktop Style":{fileExt:[i.stylx],type:s["Desktop Style"],typeKeywords:["ArcGIS Pro","Symbology","Style","Symbols"]},"Earth Configuration":{fileExt:[i.xml],type:s["Earth Configuration"],typeKeywords:["ArcGIS Earth","Earth","Earth Configuration"]},"Feature Collection":{type:s["Feature Collection"],fileExt:[i.featurecollection],typeKeywords:[]},"File Geodatabase":{fileExt:[i.zip],type:s["File Geodatabase"],typeKeywords:[]},GeoJson:{fileExt:[i.geojson,i.json],type:s.GeoJson,typeKeywords:["Coordinates Type","CRS","Feature","FeatureCollection","GeoJSON","Geometry","GeometryCollection"]},"Geoprocessing Package":{fileExt:[i.gpk,i.gpkx],type:s["Geoprocessing Package"],typeKeywords:["ArcGIS Desktop","ArcGlobe","ArcMap","ArcScene","Geoprocessing Package","gpk","Model","Result","Script","Sharing","Tool","Toolbox"]},GeoPackage:{fileExt:[i.gpkg],type:s.GeoPackage,typeKeywords:["Data","GeoPackage","gpkg"]},"Geoprocessing Sample":{fileExt:[i.zip],type:s["Geoprocessing Sample"],typeKeywords:["tool","geoprocessing","sample"]},GML:{fileExt:[i.zip],type:s.GML,typeKeywords:[]},"Image Collection":{fileExt:[i.zip],type:s["Image Collection"],typeKeywords:[]},Image:{fileExt:[i.jpg,i.jpeg,i.png,i.tif,i.tiff],type:s.Image,typeKeywords:["Data","Image"]},"iWork Keynote":{fileExt:[i.key],type:s["iWork Keynote"],typeKeywords:["Data","Document","Mac"]},"iWork Numbers":{fileExt:[i.numbers],type:s["iWork Numbers"],typeKeywords:["Data","Document","Mac"]},"iWork Pages":{fileExt:[i.pages],type:s["iWork Pages"],typeKeywords:["Data","Document","Mac"]},"KML Collection":{fileExt:[i.zip],type:s["KML Collection"],typeKeywords:[]},KML:{type:s.KML,fileExt:[i.kml,i.kmz],typeKeywords:["Data","Map","kml"]}
23,Layer:{fileExt:[i.lyr],type:s.Layer,typeKeywords:["Data","Layer","ArcMap","ArcGlobe","ArcGIS Explorer","lyr"]},"Layer File":{fileExt:[i.lyrx],type:s.Layer,typeKeywords:["ArcGIS Pro","Layer","Layer File"]},"Layer Package":{fileExt:[i.lpk,i.lpkx],type:s["Layer Package"],typeKeywords:[]},Layout:{fileExt:[i.pagx],type:s.Layout,typeKeywords:["ArcGIS Pro","Layout","Layout File","pagx"]},"Locator Package":{fileExt:[i.gcpk],type:s["Locator Package"],typeKeywords:[]},"Map Package":{fileExt:[i.mpk,i.mpkx],type:s["Map Package"],typeKeywords:[]},"Map Template":{fileExt:[i.zip],type:s["Map Template"],typeKeywords:["map","ArcMap","template","ArcGIS desktop"]},"Microsoft Excel":{fileExt:[i.xls,i.xlsx],type:s["Microsoft Excel"],typeKeywords:["Data","Document","Microsoft Excel"]},"Microsoft Powerpoint":{fileExt:[i.ppt,i.pptx],type:s["Microsoft Powerpoint"],typeKeywords:["Data","Document","Microsoft Powerpoint"]},"Visio Document":{fileExt:[i.vsd],type:s["Visio Document"],typeKeywords:["Data","Document","Visio Document"]},"Microsoft Word":{fileExt:[i.doc,i.docx],type:s["Microsoft Word"],typeKeywords:["Data","Document"]},"Mobile Basemap Package":{fileExt:[i.bpk],type:s["Mobile Basemap Package"],typeKeywords:[]},"Mobile Map Package":{fileExt:[i.mmpk],type:s["Mobile Map Package"],typeKeywords:[]},"Mobile Scene Package":{fileExt:[i.mspk],type:s["Mobile Scene Package"],typeKeywords:[]},Notebook:{fileExt:[i.ipynb],type:s.Notebook,typeKeywords:["Notebook","Python"]},PDF:{fileExt:[i.pdf],type:s.PDF,typeKeywords:["Data","Document","PDF"]},"Pro Map":{fileExt:[i.mapx],type:s["Pro Map"],typeKeywords:["ArcGIS Pro","Map","Map File","mapx"]},"Pro Report":{fileExt:[i.rptx],type:s["Pro Report"],typeKeywords:[]},"Project Package":{fileExt:[i.ppkx],type:s["Project Package"],typeKeywords:[]},"Project Template":{fileExt:[i.aptx],type:s["Project Template"],typeKeywords:[]},"Raster function template":{fileExt:[i["rft.json"],i["rft.xml"]],type:s["Raster function template"],typeKeywords:["Raster","Functions","Processing","rft","srf","function template","templates","ArcGIS Pro"]},"Rule Package":{fileExt:[i.rpk],type:s["Rule Package"],typeKeywords:[]},"Scene Package":{fileExt:[i.slpk,i.spk],type:s["Scene Package"],typeKeywords:[]},"Service Definition":{fileExt:[i.sd],type:s["Service Definition"],typeKeywords:["Data","Service","Service Definition"]},Shapefile:{fileExt:[i.zip],type:s.Shapefile,typeKeywords:["Data","
23Layer","shapefile"]},"Survey123 Add In":{fileExt:[i.surveyaddin],type:s["Survey123 Add In"],typeKeywords:["Add In","Survey123 Add In","Tool"]},"Tile Package":{fileExt:[i.tpk,i.tpkx],type:s["Tile Package"],typeKeywords:[]},"Vector Tile Package":{fileExt:[i.vtpk],type:s["Vector Tile Package"],typeKeywords:[]},"Workflow Manager Package":{fileExt:[i.wpk],type:s["Workflow Manager Package"],typeKeywords:[]},"Document Link":{type:s["Document Link"],typeKeywords:["Data","Document"]},"Feature Service":{type:s["Feature Service"],typeKeywords:["ArcGIS Server","Data","Feature Access","Feature Service","Service","Singlelayer","Hosted Service"]},GeocodeServer:{type:s["Geocoding Service"],typeKeywords:["ArcGIS Server","Geocoding Service","Locator Service","Service","Tool","Service Proxy"]},GeoDataServer:{type:s["Geodata Service"],typeKeywords:["Data","Service","Geodata Service","ArcGIS Server"]},GeometryServer:{type:s["Geometry Service"],typeKeywords:["Tool","Service","Geometry Service","ArcGIS Server"]},GeoenrichmentServer:{type:s["Geoenrichment Service"],typeKeywords:["Geoenrichment Service","ArcGIS Server"]},GPServer:{type:s["Geoprocessing Service"],typeKeywords:["Tool","Service","Geoprocessing Service","ArcGIS Server"]},GlobeServer:{type:s["Globe Service"],typeKeywords:["Data","Service","Globe Service","ArcGIS Server"]},ImageServer:{type:s["Image Service"],typeKeywords:["Data","Service","Image Service","ArcGIS Server"]},MapServer:{type:s["Map Service"],typeKeywords:["Data","Service","Map Service","ArcGIS Server"]},NAServer:{type:s["Network Analysis Service"],typeKeywords:["Tool","Service","Network Analysis Service","ArcGIS Server"]},ElevationServer:{type:s["Image Service"],typeKeywords:["Elevation 3D Layer"]},VectorTileServer:{type:s["Vector Tile Service"],typeKeywords:[]},WFS:{type:s.WFS,typeKeywords:["Data","Service","Web Feature Service","OGC"]},WMS:{type:s.WMS,typeKeywords:["Data","Service","Web Map Service","OGC"]},WMTS:{type:s.WMTS,typeKeywords:["Data","Service","OGC"]},ogcFeature:{type:s.OGCFeatureServer,typeKeywords:["Data","Service","Feature Service","OGC","OGC Feature Service"]},SceneServer:{type:s["Scene Service"],typeKeywords:["Scene Service"]},StreamServer:{type:s["Stream Service"],typeKeywords:["Data","Service","Stream Service","ArcGIS Server"]},WMServer:{type:s["Workflow Manager Service"],typeKeywords:["Workflow Manager","ArcGIS Server","WMServer","Workflow","JTX","Job Tracking"]},TiledImageServer:{type:s["Image Service"],typeKeywords:["Tiled Imagery"]},"Web Mapping Application":{type:s["Web Mapping Application"],typeKeywords:["JavaScript","Map","Mapping Site","Online Map","Ready To Use","Web AppBuilder","Web Map (+ WAB2D or WAB3D)"]},"Mobile Application":{type:s["Mobile Application"],typeKeywords:["ArcGIS Mobile Map","Mobile Application"]},"AppBuilder Extension":{type:s["AppBuilder Extension"],typeKeywords:["Widget","App Builder"]},"Google Drive":{type:s["Google Drive"],typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},Dropbox:{type:s.Dropbox,typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},OneDrive:{type:s.OneDrive,typeKeywords:["CSV","Shapefile","GeoJSON","Excel","FileGeodatabase"]},"Map Service":{type:s["Map Service"],typeKeywords:["ArcGIS Server","Data","Map Service","Service","Hosted Service"]},StoryMap:{type:s.StoryMap,typeKeywords:["arcgis-storymaps","StoryMap","Web Application (smstatusdraft or smsstatuspublished)"]},Dashboard:{type:s.Dashboard,typeKeywords:["Dashboard","Operations Dashboard"]},"Hub Initiative":{type:s["Hub Initiative"],typeKeywords:["Hub","hubInitiative","OpenData"]},"Hub Site Application":{type:s["Hub Site Application"],typeKeywords:["Hub","hubSite","hubSolution","JavaScript","Map","Mapping Site","Online Map","OpenData","Ready To Use","selfConfigured","Web Map","Registered App"]},"Web Experience":{type:s["Web Experience"],typeKeywords:["EXB Experience","JavaScript","Ready To Use Web Application","Web Experience","Web Mapping Application","Web Page","Web Site"]},"Insights Workbook Package":{type:s["Insights Workbook Package"],fileExt:[i.insightswbk],typeKeywords:["Insights","Insights Workbook Package"]}};var a,c;!function(e){e.notStarted="notStarted",e.inProgress="inProgress",e.onHold="onHold",e.complete="complete"}(a||(a={})),function(e){e.map="map",e.image="image"}(c||(c={}))},917544:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(362700);function i(e="en"){let t="en";if(e=e.toLowerCase(),n.q.indexOf(e)>-1)t=e;else{const r=e.split("-");r.length>1&&n.q.indexOf(r[0])>-1&&(t=r[0])}return t}},364885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(663384);function i(e,t,r="cors"){const i=`${(0,n.l)(t)}/locales/${e}.json`.toLocaleLowerCase();return fetch(i,{method:"GET",credentials:"same-origin",mode:r}).then((e=>e.json())).catch((t=>{throw Error(`Attempt to fetch locale ${e} from ${i} failed: ${JSON.stringify(t)}`)}))}},568486:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(625873);function i(e){return(0,n.W)(e,"portalSelf.user.culture")||(0,n.W)(e,"portalSelf.culture")||"en-us"}},362700:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});const 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"]},947257:(e,t,r)=>{"use strict";r.d(t,{D_:()=>s.D,Zi:()=>i.Z,aF:()=>n.a,qm:()=>o.q});var n=r(917544),i=r(364885),s=r(568486),o=r(362700)},849287:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALPHA_ORGS:()=>a.wO,ASSOCIATION_REFERENCE_LIMIT:()=>n.g,AclCategory:()=>b.RI,AclSubCategory:()=>b.B8,ArcGISContext:()=>o.Mq,ArcGISContextManager:()=>a.SF,ArcgisHubDownloadError:()=>p.m4,CANNOT_DISCUSS:()=>b.fX,ChannelFilter:()=>b.ww,ChannelRelation:()=>b.Uz,ChannelSort:()=>b.LY,CommonSort:()=>b.jF,DeliveryMethod:()=>I.Gl,DiscussionSource:()=>b.p2,DiscussionType:()=>b.Og,DownloadOperationStatus:()=>p.My,ENTERPRISE_HOME_SUBDOMAIN:()=>o.M7,ENTERPRISE_SITES_PATH:()=>o.me,ENTERPRISE_SITES_SERVICE_STATUS:()=>a.kl,EntityEditor:()=>K.c,EntitySettingType:()=>b.qF,FileExtension:()=>j.b9,GLOBAL_EXTENT:()=>h.cq,GeoJSONPolygonToBBox:()=>h.Uf,HUB_CDN_URLMAP:()=>F.PF,HUB_LOCALES:()=>f.qm,HUB_SERVICE_STATUS:()=>a.c0,HubChannel:()=>v.lM,HubContent:()=>u.QA,HubDiscussion:()=>b.GY,HubEntityHero:()=>j.if,HubEntityStatus:()=>j.Mz,HubError:()=>ce.Z,HubEvent:()=>S.qz,HubEventAttendanceType:()=>S.wP,HubEventCapacityType:()=>S.St,HubFamilies:()=>j.CK,HubInitiative:()=>g.Mz,HubInitiativeTemplate:()=>y.ft,HubPage:()=>_.T,HubProject:()=>P.M6,HubTemplate:()=>N.Pp,ItemType:()=>j.qG,JobRecordStatus:()=>u.cq,JobRecordType:()=>u.sw,MENTION_ATTRIBUTE:()=>b.fL,NewsletterCadence:()=>I.gT,OperationError:()=>ae.Z,OperationStack:()=>oe.Z,PORTAL_EXPORT_TYPES:()=>p.Yh,PostReaction:()=>b.y4,PostRelation:()=>b.ZK,PostSort:()=>b.H_,PostStatus:()=>b.$4,PostType:()=>b.hQ,REQUIRED_PRIVS:()=>i.ol,ReactionRelation:()=>b.nF,RemoteServerError:()=>k.m,Role:()=>b.uU,STANDARD_LICENSES:()=>E.zs,SchedulerCadence:()=>C.Z2,SchedulerDeliveryMethod:()=>C.KB,SchedulerSubscriptionAction:()=>C.yL,SchedulerSystemNotificationSpecNames:()=>C.ZZ,SearchPostsFormat:()=>b.Fr,ServiceCapabilities:()=>u.GY,ServiceDownloadFormat:()=>p.YH,SharingAccess:()=>b.Iw,SortOrder:()=>b.As,SubscriptionAction:()=>I.os,SubscriptionEntityType:()=>C.LW,SystemNotificationSpecNames:()=>
23I.yJ,UpdateFrequency:()=>u.v9,WGS84_WKID:()=>p.mq,_addTokenToResourceUrl:()=>x.oA,_deepMapValues:()=>A.c,_getHttpAndHttpsUris:()=>F.mT,_getLocation:()=>F.G,_isDate:()=>A.Q6,_isFunction:()=>A.cg,_isObject:()=>A.x5,_isRegExp:()=>A.W8,_isString:()=>A.r9,_mapValues:()=>A.t2,_unprotectAndRemoveItem:()=>E.$_,acceptAssociation:()=>n.ZH,addContextToSlug:()=>u.tl,addCreateItemTypes:()=>j.i$,addDays:()=>L.E4,addHistoryEntry:()=>re.j,addSolutionResourceUrlToAssets:()=>x.lK,aggregateMetrics:()=>W.zv,allCoordinatesPossiblyWGS84:()=>h.nc,applyPropertiesToItems:()=>E.ug,arrayToObject:()=>L.FB,atob:()=>ue.atob,bBoxToExtent:()=>h.Vu,bboxToString:()=>h.CF,breakAssociation:()=>n.Cq,btoa:()=>ue.btoa,buildExistingExportsPortalQuery:()=>p.nc,buildUrl:()=>F.Q2,buildWhereClause:()=>W.M1,cacheBustUrl:()=>F.ZP,camelize:()=>L._A,canCreateChannel:()=>b.Sy,canCreateChannelV2:()=>b.GJ,canCreatePost:()=>b.sm,canCreatePostV2:()=>b.i_,canCreateReaction:()=>b.Mg,canCreateReactionV2:()=>b.Hp,canCreateReply:()=>b.jK,canCreateReplyV2:()=>b.pG,canDeleteChannel:()=>b.Ym,canDeleteChannelV2:()=>b.T2,canDeletePost:()=>b.Rz,canDeletePostV2:()=>b.l6,canEditChannel:()=>b.G6,canEditChannelV2:()=>b.xK,canEditEvent:()=>i.F5,canEditItem:()=>i.J2,canEditPost:()=>b.CY,canEditPostStatus:()=>b.G$,canEditPostStatusV2:()=>b._w,canEditPostV2:()=>b.FR,canEditSite:()=>i.hZ,canEditSiteContent:()=>i.Af,canModifyChannel:()=>b.x2,canModifyPost:()=>b.$g,canModifyPostStatus:()=>b.BP,canPostToChannel:()=>b.qU,canReadChannel:()=>b.IO,canReadChannelV2:()=>b.LW,canReadFromChannel:()=>b.lX,canUseCreateReplica:()=>p.Ki,canUseHubDownloadApi:()=>p.mG,canUseHubDownloadSystem:()=>p.r6,capitalize:()=>L.kC,catalogContains:()=>se.r,categories:()=>c.b,channelToSearchResult:()=>b.Ge,chunkArray:()=>L.F3,cloneObject:()=>L.kI,commitItemUpload:()=>R.wd,compose:()=>L.qC,composeContent:()=>u.Hk,composeHubContent:()=>u.Te,constructSlug:()=>E.fU,convertClientEventToHubEvent:()=>S.eO,convertItemToDiscussion:()=>b.WP,convertItemToInitiative:()=>g.p8,convertItemToInitiativeTemplate:()=>y.QA,convertItemToPage:()=>_.VC,convertItemToProject:()=>P.j3,convertItemToTemplate:()=>N.xe,convertModelToPage:()=>_.nu,convertSolutionTemplateResourcesToAssets:()=>x.lD,convertToWellKnownLocale:()=>f.aF,convertUrlsToAnchorTags:()=>F.wV,convertUserToHubUser:()=>G.gU,createChannel:()=>b.mi,createChannelNotificationOptOut:()=>b.$6,createChannelNotificationOptOutV2:()=>b.y6,createChannelV2:()=>b.Ww,createContent:()=>u.K1,createDiscussion:()=>b.vv,createExtent:()=>h.sA,createHubChannel:()=>v.Pw,createHubEvent:()=>S.hy,createHubEventRegistration:()=>S.Tb,createId:()=>L.Mc,createInitiative:()=>g.jA,createInitiativeTemplate:()=>y.cP,createItem:()=>R.fC,createItemFromFile:()=>E.Wh,createItemFromUrl:()=>E.km,createItemFromUrlOrFile:()=>E.Pl,createModel:()=>T.NY,createPage:()=>_.D4,createPost:()=>b.qb,createPostV2:()=>b.U5,createProject:()=>P.$L,createReaction:()=>b.wC,createReactionV2:()=>b.pR,createReply:()=>b.PP,createReplyV2:()=>b.PS,createSetting:()=>b.fj,createSettingV2:()=>b.qH,createSubscription:()=>I.XW,createTemplate:()=>N.Mn,createUser:()=>I.r4,datasetToContent:()=>u.J4,datasetToItem:()=>u.IZ,deepCatalogContains:()=>ne.P,deepDeletePropByValue:()=>A.zI,deepEqual:()=>A.vZ,deepFilter:()=>A.JS,deepFind:()=>A.MX,deepFindById:()=>A.wA,deepSet:()=>A.qm,deepStringReplace:()=>A.ig,deleteContent:()=>u.yd,deleteDiscussion:()=>b.lg,deleteHubChannel:()=>v.Uq,deleteHubEvent:()=>S.Vq,deleteHubEventRegistration:()=>S.IF,deleteInitiative:()=>g.dK,deleteInitiativeTemplate:()=>y.uA,deleteItemThumbnail:()=>E.fJ,deletePage:()=>_.CT,deleteProject:()=>P.th,deleteProp:()=>E.fL,deleteTemplate:()=>N.Xc,deleteUser:()=>I.h8,discussionsApiRequest:()=>b.eR,discussionsApiRequestV2:()=>b.JL,doesItemExistWithTitle:()=>E.I7,doesResourceExist:()=>x.of,editorToContent:()=>u.Bp,editorToInitiative:()=>g.qJ,editorToMetric:()=>W.Ag,editorToProject:()=>P.FH,editorToTemplate:()=>N.OH,enrichContentSearchResult:()=>u.vl,enrichInitiativeSearchResult:()=>g.J5,enrichInitiativeTemplateSearchResult:()=>y.nV,enrichPageSearchResult:()=>_.Hy,enrichProjectSearchResult:()=>P.D6,enrichTemplateSearchResult:()=>N.Gb,enrichUserSearchResult:()=>G.RG,ensureProp:()=>A.uZ,explainQueryResult:()=>z.C,exportPosts:()=>
23b.Mv,exportPostsV2:()=>b.x3,extend:()=>L.l7,extentToBBox:()=>h.c5,extentToPolygon:()=>h.vP,failSafeUpdate:()=>E.A7,fetchAllPages:()=>E.qJ,fetchAndUploadResource:()=>x.gE,fetchAndUploadThumbnail:()=>x.dT,fetchChannel:()=>b.kI,fetchChannelNotifcationOptOut:()=>b.Of,fetchChannelNotifcationOptOutV2:()=>b.Rq,fetchChannelV2:()=>b.fA,fetchContent:()=>u.Z$,fetchDiscussion:()=>b.dK,fetchDownloadFile:()=>p.Ag,fetchEvent:()=>S.eZ,fetchHubChannel:()=>v.cy,fetchHubContent:()=>u.Jn,fetchHubTranslation:()=>f.Zi,fetchHubUser:()=>G.W6,fetchImageAsBlob:()=>x.oX,fetchInitiative:()=>g.AM,fetchInitiativeTemplate:()=>y.cw,fetchItem:()=>E.iY,fetchItemJobRecords:()=>u.SE,fetchMaxNumUserGroupsLimit:()=>O.kq,fetchModelFromItem:()=>T.UO,fetchModelResources:()=>T.wn,fetchOrg:()=>O.T7,fetchOrgLimits:()=>O.wm,fetchOrganization:()=>O.Ak,fetchPage:()=>_.H6,fetchPost:()=>b.SD,fetchPostV2:()=>b.mD,fetchProject:()=>P.GG,fetchSetting:()=>b.j$,fetchSettingV2:()=>b.Fn,fetchTemplate:()=>N.Dv,filterBy:()=>L.j,findBy:()=>L.zP,findItemsBySlug:()=>E.NS,flattenArray:()=>L.VF,followEntity:()=>E.Rs,getAssociatedEntitiesQuery:()=>n.QF,getAssociationStats:()=>n.Z0,getAvailableToRequestAssociationCatalogs:()=>n.G4,getAvailableToRequestEntitiesQuery:()=>n.cO,getCampaignUrl:()=>F.CX,getCardModelUrlFromEntity:()=>V.m,getCardModelUrlFromResult:()=>V.D,getCatalogGroups:()=>Y.r,getCategory:()=>u.n3,getCdnAssetUrl:()=>F.dW,getChannelAccess:()=>b.KX,getChannelGroupIds:()=>b.hw,getChannelOrgIds:()=>b.dC,getChannelUsersQuery:()=>b.Wv,getContentHomeUrl:()=>F.gp,getContentIdentifier:()=>u.WZ,getContentTypeIcon:()=>u.oB,getContentTypeLabel:()=>u.iN,getCulture:()=>f.D_,getDefaultEntitySettings:()=>b.AH,getDownloadConfiguration:()=>p.gZ,getDownloadFormats:()=>p.VU,getEntityFollowersGroupId:()=>
23E.Y_,getEntityMetrics:()=>W.Ev,getEventGroups:()=>S.gp,getExportItemTypeKeyword:()=>p.ey,getExportLayerTypeKeyword:()=>p.nW,getExtentCenter:()=>h.Dz,getFamily:()=>u._A,getFamilyTypes:()=>u.Pp,getGroupHomeUrl:()=>F.tV,getHubApiFromPortalUrl:()=>F.GG,getHubApiUrl:()=>s.g,getHubApiUrlFromPortal:()=>F.dD,getHubDownloadApiFormats:()=>p.z7,getHubEntityTypeFromPath:()=>ie.Zb,getHubLocaleAssetUrl:()=>F.ls,getHubUrlFromPortal:()=>F.Vb,getItemApiUrl:()=>F.pK,getItemAssets:()=>x.tF,getItemBySlug:()=>E.QR,getItemDataUrl:()=>F.mP,getItemHomeUrl:()=>F.$,getItemHubId:()=>u.O1,getItemIdentifier:()=>E.vo,getItemLayer:()=>u.l$,getItemLayerId:()=>u.Oi,getItemThumbnailUrl:()=>x.Sg,getLayerIdFromUrl:()=>u.Tf,getModel:()=>T.PD,getModelBySlug:()=>T.q9,getModelFromOptions:()=>E.G3,getOrgExtentAsBBox:()=>h.kk,getOrgThumbnailUrl:()=>x.SF,getPathForHubEntityType:()=>ie.Jc,getPendingEntitiesQuery:()=>n.cT,getPendingProjectsQuery:()=>g.dB,getPortalApiUrl:()=>F.ik,getPortalBaseFromOrgUrl:()=>F.Dw,getPortalUrl:()=>F.al,getPortalUrls:()=>u.ve,getPostCSVFileName:()=>b.vL,getPredicateValues:()=>J.H,getProp:()=>A.WJ,getProps:()=>A.AM,getProxyUrl:()=>u.b7,getReferencedEntityIds:()=>n.h9,getRequestingEntitiesQuery:()=>n.Ts,getServiceStatus:()=>u._8,getServiceTypeFromUrl:()=>F.Gb,getSpatialRefTypeKeyword:()=>p._d,getStructuredLicense:()=>E.Dj,getSubscription:()=>I.pI,getSubscriptions:()=>I.tJ,getTypeCategories:()=>u.r$,getTypes:()=>u.yu,getUniqueItemTitle:()=>E.I8,getUniqueSlug:()=>E.bb,getUser:()=>I.PR,getUserGroupsByMembership:()=>Q.q,getUserGroupsFromQuery:()=>Z.o,getUserHomeUrl:()=>F.n5,getWellKnownAssociationsCatalog:()=>n.Um,getWithDefault:()=>A.tj,hasBasePriv:()=>i.Lb,hasServiceCapability:()=>u.bI,hubApiRequest:()=>k.$,initiativeResultToCardModel:()=>g.ld,initiativeTemplateResultToCardModel:()=>y.lw,initiativeTemplateToCardModel:()=>y.we,initiativeToCardModel:()=>g.Ki,interpolate:()=>E.sX,interpolateItemId:()=>E.V2,isAGOFeatureServiceUrl:()=>u.Et,isBBox:()=>h.pi,isDiscussable:()=>b.BV,isDownloadable:()=>c.f,isFeatureService:()=>u.N,isHostedFeatureServiceMainEntity:()=>u.E8,isHostedFeatureServiceMainItem:()=>u.ZM,isLayerView:()=>u.F4,isMapOrFeatureServerUrl:()=>F.TD,isNil:()=>L.kK,isOrgAdmin:()=>b.RN,isOrgAdminInOrg:()=>b.ho,isOrgChannel:()=>b.t7,isPrivateChannel:()=>b.pi,isPublicChannel:()=>b.qi,isSafeRedirectUrl:()=>F.v8,isSecureProxyServiceUrl:()=>u.wx,isService:()=>x.cs,isServicesDirectoryDisabled:()=>E.Om,isSiteType:()=>u.Z6,isSlug:()=>u.hb,isUserFollowing:()=>E.MV,isUserInOrg:()=>b.sd,isValidExtent:()=>h.ko,itemPropsNotInTemplates:()=>E.Ze,itemToContent:()=>u.iV,last:()=>L.Z$,maybeAdd:()=>L.fE,maybePush:()=>L.Yp,mergeObjects:()=>A.PM,modelToHubEditableContent:()=>u.lF,negateGroupPredicates:()=>X.O,normalizeItemType:()=>u.KF,normalizeSolutionTemplateItem:()=>E.yQ,notify:()=>C.h4,objectToArray:()=>L.JJ,objectToJsonBlob:()=>x.OA,orgExtent:()=>h.vU,parseContainmentPath:()=>ie._2,parseDatasetId:()=>u.tS,parseDiscussionURI:()=>b.hv,parseItemCategories:()=>u.UY,parseMentionedUsers:()=>b.tt,pathMap:()=>ie.hn,pickProps:()=>A.H6,portalToOrganization:()=>O.ud,portalToSearchResult:()=>O.yT,projectResultToCardModel:()=>P.MP,projectToCardModel:()=>P.So,reduceByGroupMembership:()=>b.v9,registerBrowserApp:()=>E.fd,removeChannel:()=>b.OG,removeChannelActivity:()=>b.TA,removeChannelActivityV2:()=>b.Rt,removeChannelNotificationOptOut:()=>b.fu,removeChannelNotificationOptOutV2:()=>b.KD,removeChannelV2:()=>b.sD,removeContextFromSlug:()=>u.d5,removeEmptyProps:()=>A.t_,removeHistoryEntry:()=>re.g,removePost:()=>b.M8,removePostV2:()=>b.oW,removeReaction:()=>b.WO,removeReactionV2:()=>b.Xq,removeResource:()=>x.ql,removeSetting:()=>b.Wf,removeSettingV2:()=>b.hk,replaceItemId:()=>E.P4,requestAssociation:()=>n.UQ,resolveMetric:()=>W.qd,resolveReferences:()=>A.CY,searchCatalogs:()=>ee.L,searchChannels:()=>b.r6,searchChannelsV2:()=>b.U4,searchEntityCatalogs:()=>te.D,searchPosts:()=>b.cl,searchPostsV2:()=>b.yB,serializeModel:()=>T.S3,serializeSpatialReference:()=>p.ZE,setContentType:()=>u.OG,setDiscussableKeyword:()=>b.Wb,setEntityAssociationGroup:()=>n.$c,setItemThumbnail:()=>E._s,setProp:()=>A.tg,setSlugKeyword:()=>E.KH,shareItemToGroups:()=>E.Ls,stringToBlob:()=>x.IS,stripProtocol:()=>F.G1,subscribe:()=>I.Ld,templateResultToCardModel:()=>N.ZU,templateToCardModel:()=>N.ek,toggleServiceCapability:()=>u.F7,unfollowEntity:()=>E.hZ,unique:()=>L.Tw,uniqueBy:()=>L.uw,unprotectModel:()=>E.vb,unshareItemFromGroups:()=>E.CT,updateChannel:()=>b.pW,updateChannelV2:()=>b.ip,updateContent:()=>u.x0,updateDiscussion:()=>b.Zt,updateHubChannel:()=>v.vL,updateHubEntity:()=>q.T,updateHubEvent:()=>S.qJ,updateInitiative:()=>g.xy,updateInitiativeTemplate:()=>y.w4,updateItem:()=>R.$G,updateModel:()=>T.QB,updatePage:()=>_.T$,updatePost:()=>b.CP,updatePostStatus:()=>b.LC,updatePostStatusV2:()=>b.ec,updatePostV2:()=>b.z6,updateProject:()=>P.ty,updateSetting:()=>b.m7,updateSettingV2:()=>b.SK,updateSubscription:()=>I.Mg,updateTemplate:()=>N.QB,updateUser:()=>I.Nq,upgradeProtocol:()=>F.Ue,uploadImageResource:()=>E.ZC,uploadResourcesFromUrl:()=>x.xO,upsertModelResources:()=>T.Ax,upsertResource:()=>x.Ej,userHasPrivilege:()=>b.am,userHasPrivileges:()=>b.PV,userResultToCardModel:()=>G.HL,validateUrl:()=>x.mQ,without:()=>L.zu});var n=r(709470),i=r(181055),s=r(67869),o=r(422985),a=r(439862),c=r(316875),u=r(906213),l=r(563056),d={};for(const e in l)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent"].indexOf(e)<0&&(d[e]=()=>l[e]);r.d(t,d);var p=r(730279),h=r(231566),m=r(304674);d={};for(const e in m)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
23SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent"].indexOf(e)<0&&(d[e]=()=>m[e]);r.d(t,d);var f=r(947257),g=r(471371),y=r(990294),b=r(819967),v=r(943190),w=r(465479);d={};for(const e in w)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWG
23S84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel"].indexOf(e)<0&&(d[e]=()=>w[e]);r.d(t,d)
24;var S=r(439756),E=r(239777),T=r(404091),I=r(616704),C=r(71052),A=r(8116),O=r(919840),_=r(227727),D=r(199054);d={};for(const e in D)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
24SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getIn
24putFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage"].indexOf(e)<0&&(d[e]=()=>D[e]);r.d(t,d);var P=r(512428),k=r(636137),x=r(410492),R=r(526639),U=r(820696);d={};for(const e in U)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
24SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getIn
24putFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","editorToProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem"].indexOf(e)<0&&(d[e]=()=>U[e]);r.d(t,d);var M=r(328948);d={};for(const e in M)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
24SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getIn
24putFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","editorToProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","Catalog","Collection","SEARCH_APIS","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandApi","expandApis","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions"].indexOf(e)<0&&(d[e]=()=>M[e]);r.d(t,d);var N=r(706608),j=r(88036),$=r(596019);d={};for(const e in $)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_
24SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getIn
24putFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","editorToProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","Catalog","Collection","SEARCH_APIS","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandApi","expandApis","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
24isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes"].indexOf(e)<0&&(d[e]=()=>$[e]);r.d(t,d);var F=r(634250),G=r(968194),L=r(329644),H=r(60348);d={}
25;for(const e in H)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWGS84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discu
25ssionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getInputFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","editorToProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","Catalog","Collection","SEARCH_APIS","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandApi","expandApis","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
25isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes","HUB_CDN_URLMAP","_getHttpAndHttpsUris","_getLocation","buildUrl","cacheBustUrl","convertUrlsToAnchorTags","getCampaignUrl","getCdnAssetUrl","getContentHomeUrl","getGroupHomeUrl","getHubApiFromPortalUrl","getHubApiUrlFromPortal","getHubLocaleAssetUrl","getHubUrlFromPortal","getItemApiUrl","getItemDataUrl","getItemHomeUrl","getPortalApiUrl","getPortalBaseFromOrgUrl","getPortalUrl","getServiceTypeFromUrl","getUserHomeUrl","isMapOrFeatureServerUrl","isSafeRedirectUrl","stripProtocol","upgradeProtocol","convertUserToHubUser","enrichUserSearchResult","fetchHubUser","userResultToCardModel","addDays","arrayToObject","camelize","capitalize","chunkArray","cloneObject","compose","createId","extend","filterBy","findBy","flattenArray","isNil","last","maybeAdd","maybePush","objectToArray","unique","uniqueBy","without"].indexOf(e)<0&&(d[e]=()=>H[e]);r.d(t,d);var B=r(364724);d={};for(const e in B)["default","OperationStack","OperationError","HubError","btoa","atob","ASSOCIATION_REFERENCE_LIMIT","acceptAssociation","breakAssociation","getAssociatedEntitiesQuery","getAssociationStats","getAvailableToRequestAssociationCatalogs","getAvailableToRequestEntitiesQuery","getPendingEntitiesQuery","getReferencedEntityIds","getRequestingEntitiesQuery","getWellKnownAssociationsCatalog","requestAssociation","setEntityAssociationGroup","REQUIRED_PRIVS","canEditEvent","canEditItem","canEditSite","canEditSiteContent","hasBasePriv","getHubApiUrl","ArcGISContext","ENTERPRISE_HOME_SUBDOMAIN","ENTERPRISE_SITES_PATH","ALPHA_ORGS","ArcGISContextManager","ENTERPRISE_SITES_SERVICE_STATUS","HUB_SERVICE_STATUS","categories","isDownloadable","HubContent","JobRecordStatus","JobRecordType","ServiceCapabilities","UpdateFrequency","addContextToSlug","composeContent","composeHubContent","createContent","datasetToContent","datasetToItem","deleteContent","editorToContent","enrichContentSearchResult","fetchContent","fetchHubContent","fetchItemJobRecords","getCategory","getContentIdentifier","getContentTypeIcon","getContentTypeLabel","getFamily","getFamilyTypes","getItemHubId","getItemLayer","getItemLayerId","getLayerIdFromUrl","getPortalUrls","getProxyUrl","getServiceStatus","getTypeCategories","getTypes","hasServiceCapability","isAGOFeatureServiceUrl","isFeatureService","isHostedFeatureServiceMainEntity","isHostedFeatureServiceMainItem","isLayerView","isSecureProxyServiceUrl","isSiteType","isSlug","itemToContent","modelToHubEditableContent","normalizeItemType","parseDatasetId","parseItemCategories","removeContextFromSlug","setContentType","toggleServiceCapability","updateContent","CatalogSchema","CollectionSchema","ENTITY_ACCESS_SCHEMA","ENTITY_CATEGORIES_SCHEMA","ENTITY_FEATURED_CONTENT_SCHEMA","ENTITY_IMAGE_SCHEMA","ENTITY_IS_DISCUSSABLE_SCHEMA","ENTITY_LOCATION_SCHEMA","ENTITY_MAP_SCHEMA","ENTITY_NAME_SCHEMA","ENTITY_SUMMARY_SCHEMA","ENTITY_TAGS_SCHEMA","ENTITY_TIMELINE_SCHEMA","FilterSchema","GalleryDisplayConfigSchema","PRIVACY_CONFIG_SCHEMA","PredicateSchema","QuerySchema","SITE_ENTITY_NAME_SCHEMA","SLUG_SCHEMA","UiSchemaElementTypes","UiSchemaMessageTypes","UiSchemaRuleEffects","UiSchemaSectionTypes","fetchHubEntity","getEditorConfig","getEntityGroups","getEntityThumbnailUrl","getEntityTypeFromHubEntityType","getHubTypeFromItemType","getRelativeWorkspaceUrl","getTagItems","getTypeFromEntity","getTypesFromEntityType","isValidEntityType","processActionLink","processActionLinks","setEntityAccess","shareEntityWithGroups","unshareEntityWithGroups","validCardEditorTypes","validEditorTypes","validEntityEditorTypes","validEventGalleryCardEditorTypes","validFollowCardEditorTypes","validStatCardEditorTypes","ArcgisHubDownloadError","DownloadOperationStatus","PORTAL_EXPORT_TYPES","ServiceDownloadFormat","WGS84_WKID","buildExistingExportsPortalQuery","canUseCreateReplica","canUseHubDownloadApi","canUseHubDownloadSystem","fetchDownloadFile","getDownloadConfiguration","getDownloadFormats","getExportItemTypeKeyword","getExportLayerTypeKeyword","getHubDownloadApiFormats","getSpatialRefTypeKeyword","serializeSpatialReference","GLOBAL_EXTENT","GeoJSONPolygonToBBox","allCoordinatesPossiblyWG
25S84","bBoxToExtent","bboxToString","createExtent","extentToBBox","extentToPolygon","getExtentCenter","getOrgExtentAsBBox","isBBox","isValidExtent","orgExtent","HubGroup","_unprotectAndRemoveGroup","addGroupMembers","autoAddUsers","createHubGroup","deleteHubGroup","emailOrgUsers","enrichGroupSearchResult","fetchHubGroup","getWellKnownGroup","inviteUsers","isOpenDataGroup","updateHubGroup","HUB_LOCALES","convertToWellKnownLocale","fetchHubTranslation","getCulture","HubInitiative","convertItemToInitiative","createInitiative","deleteInitiative","editorToInitiative","enrichInitiativeSearchResult","fetchInitiative","getPendingProjectsQuery","initiativeResultToCardModel","initiativeToCardModel","updateInitiative","HubInitiativeTemplate","convertItemToInitiativeTemplate","createInitiativeTemplate","deleteInitiativeTemplate","enrichInitiativeTemplateSearchResult","fetchInitiativeTemplate","initiativeTemplateResultToCardModel","initiativeTemplateToCardModel","updateInitiativeTemplate","AclCategory","AclSubCategory","CANNOT_DISCUSS","ChannelFilter","ChannelRelation","ChannelSort","CommonSort","DiscussionSource","DiscussionType","EntitySettingType","HubDiscussion","MENTION_ATTRIBUTE","PostReaction","PostRelation","PostSort","PostStatus","PostType","ReactionRelation","Role","SearchPostsFormat","SharingAccess","SortOrder","canCreateChannel","canCreateChannelV2","canCreatePost","canCreatePostV2","canCreateReaction","canCreateReactionV2","canCreateReply","canCreateReplyV2","canDeleteChannel","canDeleteChannelV2","canDeletePost","canDeletePostV2","canEditChannel","canEditChannelV2","canEditPost","canEditPostStatus","canEditPostStatusV2","canEditPostV2","canModifyChannel","canModifyPost","canModifyPostStatus","canPostToChannel","canReadChannel","canReadChannelV2","canReadFromChannel","channelToSearchResult","convertItemToDiscussion","createChannel","createChannelNotificationOptOut","createChannelNotificationOptOutV2","createChannelV2","createDiscussion","createPost","createPostV2","createReaction","createReactionV2","createReply","createReplyV2","createSetting","createSettingV2","deleteDiscussion","discussionsApiRequest","discussionsApiRequestV2","exportPosts","exportPostsV2","fetchChannel","fetchChannelNotifcationOptOut","fetchChannelNotifcationOptOutV2","fetchChannelV2","fetchDiscussion","fetchPost","fetchPostV2","fetchSetting","fetchSettingV2","getChannelAccess","getChannelGroupIds","getChannelOrgIds","getChannelUsersQuery","getDefaultEntitySettings","getPostCSVFileName","isDiscussable","isOrgAdmin","isOrgAdminInOrg","isOrgChannel","isPrivateChannel","isPublicChannel","isUserInOrg","parseDiscussionURI","parseMentionedUsers","reduceByGroupMembership","removeChannel","removeChannelActivity","removeChannelActivityV2","removeChannelNotificationOptOut","removeChannelNotificationOptOutV2","removeChannelV2","removePost","removePostV2","removeReaction","removeReactionV2","removeSetting","removeSettingV2","searchChannels","searchChannelsV2","searchPosts","searchPostsV2","setDiscussableKeyword","updateChannel","updateChannelV2","updateDiscussion","updatePost","updatePostStatus","updatePostStatusV2","updatePostV2","updateSetting","updateSettingV2","userHasPrivilege","userHasPrivileges","HubChannel","createHubChannel","deleteHubChannel","fetchHubChannel","updateHubChannel","HubSurvey","MAP_SURVEY_TYPEKEYWORD","convertItemToSurvey","decodeForm","deleteSurvey","fetchSurvey","getFormInfoJson","getFormJson","getInputFeatureServiceModel","getMapQuestion","getS123EditUrl","getS123ShareUrl","getSourceFeatureServiceModelFromFieldworker","getStakeholderModel","getSurveyModels","hasMapQuestion","isDraft","isFieldworkerView","isMapQuestion","isPageQuestion","isSurvey123Connect","setDisplayMapKeyword","shouldDisplayMap","updateSurvey","HubEvent","HubEventAttendanceType","HubEventCapacityType","convertClientEventToHubEvent","createHubEvent","createHubEventRegistration","deleteHubEvent","deleteHubEventRegistration","fetchEvent","getEventGroups","updateHubEvent","STANDARD_LICENSES","_unprotectAndRemoveItem","applyPropertiesToItems","constructSlug","createItemFromFile","createItemFromUrl","createItemFromUrlOrFile","deleteItemThumbnail","deleteProp","doesItemExistWithTitle","failSafeUpdate","fetchAllPages","fetchItem","findItemsBySlug","followEntity","getEntityFollowersGroupId","getItemBySlug","getItemIdentifier","getModelFromOptions","getStructuredLicense","getUniqueItemTitle","getUniqueSlug","interpolate","interpolateItemId","isServicesDirectoryDisabled","isUserFollowing","itemPropsNotInTemplates","normalizeSolutionTemplateItem","registerBrowserApp","replaceItemId","setItemThumbnail","setSlugKeyword","shareItemToGroups","unfollowEntity","unprotectModel","unshareItemFromGroups","uploadImageResource","createModel","fetchModelFromItem","fetchModelResources","getModel","getModelBySlug","serializeModel","updateModel","upsertModelResources","DeliveryMethod","NewsletterCadence","SubscriptionAction","SystemNotificationSpecNames","createSubscription","createUser","deleteUser","getSubscription","getSubscriptions","getUser","subscribe","updateSubscription","updateUser","SchedulerCadence","SchedulerDeliveryMethod","SchedulerSubscriptionAction","SchedulerSystemNotificationSpecNames","SubscriptionEntityType","notify","_deepMapValues","_isDate","_isFunction","_isObject","_isRegExp","_isString","_mapValues","deepDeletePropByValue","deepEqual","deepFilter","deepFind","deepFindById","deepSet","deepStringReplace","ensureProp","getProp","getProps","getWithDefault","mergeObjects","pickProps","removeEmptyProps","resolveReferences","setProp","fetchMaxNumUserGroupsLimit","fetchOrg","fetchOrgLimits","fetchOrganization","portalToOrganization","portalToSearchResult","HubPage","convertItemToPage","convertModelToPage","createPage","deletePage","enrichPageSearchResult","fetchPage","updatePage","HubPermissionsPolicies","addPermissionPolicy","checkPermission","getPermissionPolicy","removePermissionPolicy","HubProject","convertItemToProject","createProject","deleteProject","editorToProject","enrichProjectSearchResult","fetchProject","projectResultToCardModel","projectToCardModel","updateProject","RemoteServerError","hubApiRequest","_addTokenToResourceUrl","addSolutionResourceUrlToAssets","convertSolutionTemplateResourcesToAssets","doesResourceExist","fetchAndUploadResource","fetchAndUploadThumbnail","fetchImageAsBlob","getItemAssets","getItemThumbnailUrl","getOrgThumbnailUrl","isService","objectToJsonBlob","removeResource","stringToBlob","uploadResourcesFromUrl","upsertResource","validateUrl","commitItemUpload","createItem","updateItem","Catalog","Collection","SEARCH_APIS","WELL_KNOWN_EVENT_CATALOGS","WELL_KNOWN_GROUP_CATALOGS","WELL_KNOWN_ITEM_CATALOGS","addDefaultItemSearchPredicates","combineQueries","dotifyString","expandApi","expandApis","expandPortalQuery","getGroupPredicate","getGroupThumbnailUrl","getKilobyteSizeOfQuery","getResultSiteRelativeLink","getScopeGroupPredicate","getUserThumbnailUrl","getWellKnownCatalog","getWellKnownCatalogs","getWellknownCollection","getWellknownCollections","hubSearch","migrateToCollectionKey","relativeDateToDateRange","searchAssociatedContent","serializeQueryForPortal","upgradeCatalogSchema","valueToMatchOptions","DEFAULT_THEME","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","HubSite","SITE_SCHEMA_VERSION","_checkStatusAndParseJson","_ensureSafeDomainLength","_ensureTelemetry","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","_migrateEventListCardConfigs","_migrateFeedConfig","_migrateLinkUnderlinesCapability","_migrateTelemetryConfig","_migrateToV2Catalog","addDomain","addSiteDomains","buildDraft","convertItemToSite","convertModelToSite","createSite","defaultSiteCollectionKeys","deleteSite","domainExists","domainExistsPortal","enrichSiteSearchResult","ensureUniqueDomainName","fetchSite","fetchSiteModel","getCatalogFromSiteModel","getDomainsForSite","getFeedConfiguration","getFeedTemplate","getOrgDefaultTheme","getSiteById","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
25isValidDomain","lookupDomain","migrateBadBasemap","migrateWebMappingApplicationSites","previewFeed","reharvestSiteCatalog","removeDomain","removeDomainByHostname","removeDomainsBySiteId","searchCategoriesToCollections","setFeedConfiguration","setFeedTemplate","updateDomain","updateSite","upgradeSiteSchema","HubTemplate","convertItemToTemplate","createTemplate","deleteTemplate","editorToTemplate","enrichTemplateSearchResult","fetchTemplate","templateResultToCardModel","templateToCardModel","updateTemplate","FileExtension","HubEntityHero","HubEntityStatus","HubFamilies","ItemType","addCreateItemTypes","HUB_CDN_URLMAP","_getHttpAndHttpsUris","_getLocation","buildUrl","cacheBustUrl","convertUrlsToAnchorTags","getCampaignUrl","getCdnAssetUrl","getContentHomeUrl","getGroupHomeUrl","getHubApiFromPortalUrl","getHubApiUrlFromPortal","getHubLocaleAssetUrl","getHubUrlFromPortal","getItemApiUrl","getItemDataUrl","getItemHomeUrl","getPortalApiUrl","getPortalBaseFromOrgUrl","getPortalUrl","getServiceTypeFromUrl","getUserHomeUrl","isMapOrFeatureServerUrl","isSafeRedirectUrl","stripProtocol","upgradeProtocol","convertUserToHubUser","enrichUserSearchResult","fetchHubUser","userResultToCardModel","addDays","arrayToObject","camelize","capitalize","chunkArray","cloneObject","compose","createId","extend","filterBy","findBy","flattenArray","isNil","last","maybeAdd","maybePush","objectToArray","unique","uniqueBy","without","Logger","asyncForEach","base64ToUnicode","batch","clearMemoizedCache","createOperationPipeline","dasherize","ensureUniqueString","failSafe","fetchUserHubSettings","fetchUserSiteSettings","generateRandomString","getDatePickerDate","getEnvironmentFromPortalUrl","getEventThumbnail","getHubProduct","getObjectSize","getSubscriptionType","getTimePickerTime","guessTimeZone","includes","incrementString","isComboboxItemSelected","isCuid","isGuid","isUpdateGroup","mapBy","memoize","poll","processRevertableTasks","propifyString","runRevertableTask","slugify","titleize","unicodeToBase64","updateUserHubSettings","updateUserSiteSettings","wait","withoutByProp"].indexOf(e)<0&&(d[e]=()=>B[e]);r.d(t,d);var W=r(979597),q=r(680062),V=r(60844),K=r(954554),z=r(773249),Y=r(772070),J=r(9302),Q=r(715377),Z=r(337322),X=r(677425),ee=r(314866),te=r(162317),re=r(738583),ne=r(873247),ie=r(40805),se=r(563292),oe=r(597633),ae=r(276242),ce=r(826899),ue=r(899415)},508435:(e,t,r)=>{"use strict";r.d(t,{f:()=>m});var n=r(656110),i=r(934647),s=r(61285),o=r(342896),a=r(887381),c=r(389982),u=r(329644),l=r(446762),d=r(50950),p=r(144219),h=r(741619);class m extends n.x{constructor(e,t){super(e,t),this._catalog=s.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new m(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=m.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.cw)(e,t.requestOptions);return m.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Initiative Template not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},o.P3),e)}convertToCardModel(e){return(0,c.w)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,d.t)((0,u.kI)(this.entity),t,this.context.hubRequestOptions):(0,u.kI)(this.entity);return r._slug=(0,p.y)(this.entity),r}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const t=(0,h.i)(e,this.context.portal);return this.entity=t,await this.save(),this.entity}update(e){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=s.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,l.w4)(this.entity,this.context.userRequestOptions):this.entity=await(0,l.cP)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubInitiativeTemplate is already destroyed.");this.isDestroyed=!0,await(0,l.uA)(this.entity.id,this.context.userRequestOptions)}}},325572:(e,t,r)=>{"use strict";r.d(t,{Wf:()=>s,gJ:()=>n,k$:()=>i});const n={}
25,i=["hub:initiativeTemplate","hub:initiativeTemplate:create","hub:initiativeTemplate:delete","hub:initiativeTemplate:edit","hub:initiativeTemplate:view","hub:initiativeTemplate:view:related","hub:initiativeTemplate:canChangeAccess","hub:initiativeTemplate:workspace","hub:initiativeTemplate:workspace:dashboard","hub:initiativeTemplate:workspace:details","hub:initiativeTemplate:workspace:collaborators","hub:initiativeTemplate:workspace:settings","hub:initiativeTemplate:manage"],s=[{permission:"hub:initiativeTemplate",services:["portal"]},{permission:"hub:initiativeTemplate:create",dependencies:["hub:initiativeTemplate"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:initiativeTemplate:view",dependencies:["hub:initiativeTemplate"]},{permission:"hub:initiativeTemplate:view:related",dependencies:["hub:initiativeTemplate:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:initiativeTemplate:edit",dependencies:["hub:initiativeTemplate"],authenticated:!0,entityEdit:!0},{permission:"hub:initiativeTemplate:delete",dependencies:["hub:initiativeTemplate"],authenticated:!0,entityDelete:!0},{permission:"hub:initiativeTemplate:canChangeAccess",dependencies:["hub:initiativeTemplate"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:initiativeTemplate:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:initiativeTemplate:workspace:dashboard",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:details",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:collaborators",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:workspace:settings",dependencies:["hub:initiativeTemplate:workspace","hub:initiativeTemplate:edit"]},{permission:"hub:initiativeTemplate:manage",dependencies:["hub:initiativeTemplate:edit"]}]},741808:(e,t,r)=>{"use strict";r.d(t,{InitiativeTemplateSchema:()=>s,g:()=>i});var n=r(434164);const i=["hub:initiativeTemplate:edit"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{previewUrl:{type:"string",if:{minLength:1},then:{format:"url"}},recommendedTemplates:{type:"array",items:{type:"string"}}})})},128148:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(389094);function i(e,t){return(0,n.g)(e,t)}},501025:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(184488),i=r(902815),s=r(325572),o=r(128148),a=r(578506);function c(e,t,r){var c;let u;return r.authentication&&(u=r.authentication.token),(t=(0,a.k)(e.item,t)).thumbnailUrl=(0,i.S)(e.item,r,u),t.features=(0,n.U)((null===(c=e.data.settings)||void 0===c?void 0:c.features)||{},s.gJ),t.links=(0,o.E)(e.item,r),t}},978777:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"previewUrl",storeKey:"item.properties.previewUrl"}),e.push({entityKey:"siteSolutionId",storeKey:"data.siteSolutionId"}),e.push({entityKey:"recommendedTemplates",storeKey:"data.recommendedTemplates"}),e}},342896:(e,t,r)=>{"use strict";r.d(t,{Nc:()=>s,P3:()=>i});const n="Hub Initiative Template",i={catalog:{schemaVersion:0},name:"No title provided",permissions:[],tags:[],typeKeywords:[n],schemaVersion:1,features:r(325572).gJ,values:{}},s={item:{type:n,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:[n],properties:{slug:"",schemaVersion:1,previewUrl:""}},data:{recommendedTemplates:[],siteSolutionId:""}}},446762:(e,t,r)=>{"use strict";r.d(t,{cP:()=>h,uA:()=>f,w4:()=>m});var n=r(404091),i=r(8238),s=r(170209),o=r(178749),a=r(342896),c=r(501025),u=r(978777),l=r(329644),d=r(85738),p=r(923018);async function h(e,t){const r=Object.assign(Object.assign({},a.P3),e);r.slug||(r.slug=(0,i.fU)(r.name,r.orgUrlKey)),await(0,p.E)(r,t),r.typeKeywords=(0,d.Wb)(r.typeKeywords,r.isDiscussable);const s=new o.c7((0,u.s)());let h=s.entityToStore(r,(0,l.kI)(a.Nc));h=await(0,n.NY)(h,t);let m=s.storeToEntity(h,{});return m=(0,c.F)(h,m,t),m}async function m(e,t){await(0,p.E)(e,t),e.typeKeywords=(0,d.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,n.PD)(e.id,t),i=new o.c7((0,u.s)()),s=i.entityToStore(e,r),a=await(0,n.QB)(s,t),l=i.storeToEntity(a,e);
25return e=(0,c.F)(r,l,t),l}async function f(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,s.cl)(r)}},887381:(e,t,r)=>{"use strict";r.d(t,{QA:()=>m,cw:()=>h,nV:()=>f});var n=r(170209),i=r(610924),s=r(653609),o=r(178749),a=r(8238),c=r(404091),u=r(869787),l=r(501025),d=r(978777),p=r(128148);async function h(e,t){let r;return r=(0,u.k)(e)?(0,n.rV)(e,t):(0,a.QR)(e,t),r.then((e=>e?m(e,t):null))}async function m(e,t){const r=await(0,c.UO)(e,t),n=new o.c7((0,d.s)()).storeToEntity(r,{});return(0,l.F)(r,n,t)}async function f(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,s.jA)(e),rawResult:e};return n.links=(0,p.E)(e,r),n}},990294:(e,t,r)=>{"use strict";r.d(t,{QA:()=>s.QA,cP:()=>i.cP,cw:()=>s.cw,ft:()=>n.f,lw:()=>o.l,nV:()=>s.nV,uA:()=>i.uA,w4:()=>i.w4,we:()=>o.w});var n=r(508435),i=r(446762),s=r(887381),o=r(389982)},389982:(e,t,r)=>{"use strict";r.d(t,{l:()=>a,w:()=>o});var n=r(60844),i=r(610924),s=r(653609);const o=(e,t,r)=>{const{actionLinks:i=[],baseUrl:s="",locale:o="en-US",target:a="self"}=r||{},u=(0,n.m)(e,t,a,s);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:i,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:i="",locale:s="en-US",target:o="self"}=t||{},a=(0,n.D)(e,o,i);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,s)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,n;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(n=e.categories)||void 0===n?void 0:n.length)?[{i18nKey:"categories",value:(0,s.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,i._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},494401:(e,t,r)=>{"use strict";r.d(t,{M:()=>E});var n=r(864661),i=r(934647),s=r(329644),o=r(664218),a=r(61285),c=r(656110),u=r(503319),l=r(832219),d=r(180562),p=r(50950),h=r(551753),m=r(625873),f=r(753244),g=r(99522),y=r(739519),b=r(170130),v=r(170209),w=r(98931),S=r(144219);class E extends c.x{constructor(e,t){super(e,t),this._catalog=a.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new E(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=E.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,o.AM)(e,t.requestOptions);return E.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Initiative not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},n.S9),e)}update(e){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=a.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,o.xy)(this.entity,this.context.userRequestOptions):this.entity=await(0,o.jA)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubInitiative is already destroyed.");this.isDestroyed=!0,await(0,o.dK)(this.entity.id,this.context.userRequestOptions)}resolveMetric(e){const t=(0,u.E)(this.entity).find((t=>t.id===e));if(t)return(0,l.q)(t,this.context);throw new Error(`Metric ${e} not found.`)}convertToCardModel(e){return(0,d.K)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,p.t)((0,s.kI)(this.entity),t,this.context.hubRequestOptions):(0,s.kI)(this.entity),n=(0,u.E)(this.entity).find((t=>t.id===e.metricId)),i=(0,h.t)(this.entity,"view.metricDisplays",[]).find((t=>t.metricId===e.metricId))||{};r._metric=(0,b.h)(n,i);const o=(0,m.W)(this.entity,"associations.groupId");if(o){const e=await(0,v.ex)(o,this.context.requestOptions),t=(0,w.f)(e,this.context.userRequestOptions),n={groupAccess:t.access,membershipAccess:t.membershipAccess};r._associations=n}return r._slug=(0,S.y)(this.entity),r}async fromEditor(e){const t=e._thumbnail,r=e.view.featuredImage,n=e._groups||[];let i=await(0,o.qJ)(e,this.context);if(!i.id&&r&&(this.entity=i,await this.save(),i=this.entity),t&&(t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}),r){let e=null;r.blob?e=await(0,f.E)(i.id,i.owner,r.blob,"featuredImage.png",this.context.userRequestOptions):await(0,g.o)(i.id,"featuredImage.png",this.context.userRequestOptions)&&await(0,y.q)(i.id,"featuredImage.png",i.owner,this.context.userRequestOptions),i.view=Object.assign(Object.assign({},i.view),{featuredImageUrl:e})}return this.entity=i,await this.save(),!e.id&&(await this.setAccess(e.access),n.length&&await Promise.all(n.map((e=>this.shareWithGroup(e))))),this.entity}}},664218:(e,t,r)=>{"use strict";r.d(t,{p8:()=>L,jA:()=>N,dK:()=>G,qJ:()=>j,J5:()=>H,AM:()=>F,dB:()=>B,xy:()=>$});
25var n=r(741619),i=r(404091),s=r(8238),o=r(85738),a=r(329644),c=r(849287),u=r(610924),l=r(625873),d=r(170209),p=r(178749),h=r(295426),m=r(815985),f=r(864661),g=r(551076);function y(){const e=(0,g.f)();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"contacts",storeKey:"data.contacts"}),e.push({entityKey:"timeline",storeKey:"data.timeline"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"followersGroupId",storeKey:"item.properties.followersGroupId"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e}var b=r(902815),v=r(184488),w=r(444018),S=r(389094);function E(e,t){return(0,S.g)(e,t)}var T=r(578506),I=r(721347);function C(e,t,r){var n,i;let s;return r.authentication&&(s=r.authentication.token),(t=(0,T.k)(e.item,t)).thumbnailUrl=(0,b.S)(e.item,r,s),t.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:null===(n=e.data.view)||void 0===n?void 0:n.featuredImageUrl}),t.catalog=(0,I.c)(t.catalog||{}),t.features=(0,v.U)((null===(i=e.data.settings)||void 0===i?void 0:i.features)||{},w.TV),t.links=E(e.item,r),t}const A=2;var O=r(881914),_=r(550124),D=r(677425),P=r(653609),k=r(861588),x=r(991550),R=r(750713),U=r(915021),M=r(923018);async function N(e,t){const r=Object.assign(Object.assign({},f.S9),e);r.slug||(r.slug=(0,s.fU)(r.name,r.orgUrlKey)),await(0,M.E)(r,t),r.typeKeywords=(0,k.o)(r.typeKeywords,r.status),r.typeKeywords=(0,o.Wb)(r.typeKeywords,r.isDiscussable);const n=new p.c7(y());let c=n.entityToStore(r,(0,a.kI)(f.sL));c=await(0,i.NY)(c,t);let u=n.storeToEntity(c,{});return u=C(c,u,t),u}async function j(e,t){var r,i;const s=e._metric,o=e._associations;delete e._groups,delete e._thumbnail,null===(r=e.view)||void 0===r||delete r.featuredImage,delete e._metric,delete e._groups,delete e._associations;let c=(0,n.i)(e,t.portal);if(s&&Object.keys(s).length){const e=s.metricId||(0,a.Mc)((0,a._A)(`${s.cardTitle}_`)),{metric:t,displayConfig:r}=(0,x.A)(s,e,{metricName:s.cardTitle});c=(0,R.I)(c,t,r)}const u=null===(i=c.associations)||void 0===i?void 0:i.groupId;if(u&&o){const e=(0,U.Q)(o);o.groupAccess&&await(0,d.mD)({group:{id:u,access:o.groupAccess},authentication:t.hubRequestOptions.authentication}),o.membershipAccess&&await(0,d.mD)({group:{id:u,membershipAccess:e.membershipAccess,clearEmptyFields:!0},authentication:t.hubRequestOptions.authentication})}return c}async function $(e,t){await(0,M.E)(e,t),e.typeKeywords=(0,k.o)(e.typeKeywords,e.status),e.typeKeywords=(0,o.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,i.PD)(e.id,t),n=new p.c7(y()),s=n.entityToStore(e,r),a=await(0,i.QB)(s,t);let c=n.storeToEntity(a,e);return c=C(r,c,t),c}function F(e,t){let r;return r=(0,c.isGuid)(e)?(0,d.rV)(e,t):(0,s.QR)(e,t),r.then((e=>e?L(e,t):null))}async function G(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,d.cl)(r)}async function L(e,t){let r=await(0,i.UO)(e,t);return r=await function(e,t){return(0,l.W)(e,"item.properties.schemaVersion")===A||(e=function(e){if((0,l.W)(e,"item.properties.schemaVersion")>=1.1)return e;{const t=(0,a.kI)(e),r=(0,l.W)(t,"item.properties.contentGroupId"),n={schemaVersion:1,title:"Default Initiative Catalog",scopes:{item:{targetEntity:"item",filters:[{predicates:[{group:r?[r]:[]}]}]}},collections:[]};return t.data.catalog=n,t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1.1,t}}(e)),Promise.resolve(e)}(r),C(r,new p.c7(y()).storeToEntity(r,{}),t)}async function H(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,u._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,P.jA)(e),rawResult:e}
25,i=(t=[...t].filter(a.Tw)).map(h.u),s=(0,c.mapBy)("enrichment",i).filter(a.Tw);let o={};return s.length&&(o=await(0,m.Z)(e,s,r)),i.forEach((e=>{n[e.prop]=(0,l.W)(o,e.path)})),n.links=E(e,r),n}function B(e){let t=(0,_.o)("Hub Project",`initiative|${e.id}`);const r=(0,l.W)(e,"catalog.scopes.item");return t=(0,O.W)([t,(0,D.O)(r)]),t}},444018:(e,t,r)=>{"use strict";r.d(t,{CB:()=>i,TV:()=>n,Z7:()=>s});const n={"hub:initiative:events":!1,"hub:initiative:content":!0,"hub:initiative:discussions":!1},i=["hub:initiative","hub:initiative:create","hub:initiative:delete","hub:initiative:edit","hub:initiative:view","hub:initiative:owner","hub:initiative:canChangeAccess","hub:initiative:events","hub:initiative:content","hub:initiative:discussions","hub:initiative:workspace","hub:initiative:workspace:overview","hub:initiative:workspace:dashboard","hub:initiative:workspace:details","hub:initiative:workspace:metrics","hub:initiative:workspace:projects","hub:initiative:workspace:projects:member","hub:initiative:workspace:projects:manager","hub:initiative:workspace:settings","hub:initiative:workspace:collaborators","hub:initiative:workspace:metrics","hub:initiative:workspace:catalogs","hub:initiative:workspace:catalog","hub:initiative:workspace:catalog:content","hub:initiative:workspace:catalog:events","hub:initiative:workspace:associationGroup:create","hub:initiative:manage"],s=[{permission:"hub:initiative",services:["portal"],licenses:["hub-premium"]},{permission:"hub:initiative:create",dependencies:["hub:initiative"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:initiative:view",services:["portal"],authenticated:!1,licenses:["hub-premium","hub-basic"]},{permission:"hub:initiative:owner",dependencies:["hub:initiative"],authenticated:!0,entityOwner:!0},{permission:"hub:initiative:edit",services:["portal"],authenticated:!0,entityEdit:!0,licenses:["hub-premium","hub-basic"]},{permission:"hub:initiative:delete",dependencies:["hub:initiative"],authenticated:!0,entityDelete:!0},{permission:"hub:initiative:canChangeAccess",dependencies:["hub:initiative"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:initiative:events",dependencies:["hub:initiative:view"]},{permission:"hub:initiative:content",dependencies:["hub:initiative:edit"]},{permission:"hub:initiative:discussions",dependencies:["hub:initiative:view"]},{permission:"hub:initiative:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:initiative:workspace:overview",dependencies:["hub:initiative:workspace","hub:initiative:view"]},{permission:"hub:initiative:workspace:dashboard",dependencies:["hub:initiative:workspace","hub:initiative:view"]},{permission:"hub:initiative:workspace:details",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:metrics",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:projects",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:projects:member",dependencies:["hub:initiative:workspace:projects"],assertions:[{property:"context:currentUser",type:"is-group-member",value:"entity:associations.groupId"}]},{permission:"hub:initiative:workspace:projects:manager",dependencies:["hub:initiative:workspace:projects"],assertions:[{property:"context:currentUser",type:"is-group-admin",value:"entity:associations.groupId"}]},{permission:"hub:initiative:workspace:settings",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:collaborators",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:metrics",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalogs",dependencies:["hub:initiative:workspace","hub:feature:catalogs","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalog",dependencies:["hub:initiative:workspace","hub:initiative:edit"]},{permission:"hub:initiative:workspace:catalog:content",dependencies:["hub:initiative:workspace:catalog"]},{permission:"hub:initiative:workspace:catalog:events",dependencies:["hub:initiative:workspace:catalog","hub
25:event","hub:feature:catalogs:edit:advanced"]},{permission:"hub:initiative:manage",dependencies:["hub:initiative:edit"]},{permission:"hub:initiative:workspace:associationGroup:create",dependencies:["hub:initiative:workspace:projects","hub:group:create"]}]},538774:(e,t,r)=>{"use strict";r.d(t,{InitiativeSchema:()=>c,s:()=>a});var n=r(255861),i=r(434164),s=r(88036),o=r(565305);const a=["hub:initiative:edit","hub:initiative:create","hub:initiative:create2","hub:initiative:metrics","hub:initiative:associations","hub:initiative:settings"],c=Object.assign(Object.assign({},i.N),{properties:Object.assign(Object.assign({},i.N.properties),{_groups:{type:"array",items:{type:"string"}},status:{type:"string",default:s.Mz.notStarted,enum:Object.keys(s.Mz)},_metric:{type:"object",required:["cardTitle"],properties:n.MetricSchema.properties}}),allOf:[o.dM,o.No,o.eS,o.Jw]})},864661:(e,t,r)=>{"use strict";r.d(t,{S9:()=>s,sL:()=>o});var n=r(88036),i=r(444018);const s={name:"",tags:[],typeKeywords:["hubInitiativeV2"],catalog:{schemaVersion:0},permissions:[],schemaVersion:2,status:n.Mz.notStarted,features:i.TV,view:{featuredContentIds:[],hero:n.if.map,metricDisplays:[]}},o={item:{type:"Hub Initiative",title:"",description:"",snippet:"",tags:[],typeKeywords:["hubInitiativeV2"],properties:{slug:"",schemaVersion:2}},data:{catalog:{schemaVersion:0},status:n.Mz.notStarted,view:{featuredContentIds:[],hero:n.if.map,metricDisplays:[]}}}},471371:(e,t,r)=>{"use strict";r.d(t,{AM:()=>i.AM,J5:()=>i.J5,Ki:()=>s.K,Mz:()=>n.M,dB:()=>i.dB,dK:()=>i.dK,jA:()=>i.jA,ld:()=>s.l,p8:()=>i.p8,qJ:()=>i.qJ,xy:()=>i.xy});var n=r(494401),i=r(664218),s=r(180562)},180562:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,l:()=>a});var n=r(653609),i=r(60844),s=r(610924);const o=(e,t,r)=>{const{actionLinks:n=[],baseUrl:s="",locale:o="en-US",target:a="self"}=r||{},u=(0,i.m)(e,t,a,s);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:n,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:s="en-US",target:o="self"}=t||{},a=(0,i.D)(e,o,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,s)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a
26}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,i;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(i=e.categories)||void 0===i?void 0:i.length)?[{i18nKey:"categories",value:(0,n.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,s._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},815985:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h,g:()=>p});var n=r(170209),i=r(958328),s=r(477448),o=r(597633),a=r(653609),c=r(288285),u=r(501193);const l=(e,t,r)=>{const{data:n,stack:i,requestOptions:s}=t;return i.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:p(e,n.errors)}),stack:i,requestOptions:s}},d={groupIds:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichGroupIds");return(0,n.tX)(t.item.id,i).then((e=>{const{admin:n,member:o,other:a}=e,c=[...n,...o,...a].map((e=>e.id));return r.finish(s),{data:Object.assign(Object.assign({},t),{groupIds:c}),stack:r,requestOptions:i}})).catch((t=>l(t,e,s)))},metadata:e=>{const{data:t,stack:i,requestOptions:s}=e,o=i.start("enrichMetadata");return async function(e,t){try{const i=await(0,n.ff)(e,t);return await async function(e){const{parse:t}=await r.e(91345).then(r.t.bind(r,491345,19));return t(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}(i)}catch(e){return null}}(t.item.id,s).then((e=>(i.finish(o),{data:Object.assign(Object.assign({},t),{metadata:e}),stack:i,requestOptions:s})))},ownerUser:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichOwner"),o=Object.assign({username:t.item.owner},i);return(0,n.PR)(o).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{ownerUser:e}),stack:r,requestOptions:i}
26))).catch((t=>l(t,e,s)))},org:e=>{const{data:t,stack:r,requestOptions:n}=e,i=r.start("enrichOrg"),s=(0,a.bV)(t.item,t.ownerUser);return(s?(0,c.T)(s,n):Promise.resolve(void 0)).then((e=>(r.finish(i),{data:Object.assign(Object.assign({},t),{org:e}),stack:r,requestOptions:n}))).catch((t=>l(t,e,i)))},data:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichData");return(0,n.m_)(t.item.id,i).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{data:e}),stack:r,requestOptions:i}))).catch((t=>l(t,e,s)))},server:e=>{const{data:t,stack:r,requestOptions:n}=e,s=r.start("enrichServer"),o=(0,i.pW)(t.item.url),a=Object.assign(Object.assign({},n),{url:o});return Promise.all([(0,i.ko)(a),(0,u.O)(t.item,n)]).then((([e,i])=>(r.finish(s),{data:Object.assign(Object.assign({},t),{server:Object.assign(Object.assign({},e),{servicesDirectoryDisabled:i})}),stack:r,requestOptions:n}))).catch((t=>l(t,e,s)))},layers:e=>{const{data:t,stack:r,requestOptions:n}=e,s=r.start("enrichLayers"),o=t.item.url,a=Object.assign(Object.assign({},n),{url:o});return(0,i.Wz)(a).then((e=>[...e.layers,...e.tables].filter((e=>"Group Layer"!==e.type)))).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{layers:e}),stack:r,requestOptions:n}))).catch((t=>l(t,e,s)))},item:e=>{const{data:t,stack:r,requestOptions:i}=e,s=r.start("enrichData");return(0,n.rV)(t.item.id,i).then((e=>(r.finish(s),{data:Object.assign(Object.assign({},t),{item:e}),stack:r,requestOptions:i}))).catch((t=>l(t,e,s)))}},p=(e,t=[])=>[...t,{type:"Other",message:"string"==typeof e?e:e.message}],h=(e,t,r)=>{const n=t.reduce(((e,t)=>{const r=d[t];return r&&e.push(r),e}),[]);return(0,s.G)(n)({data:{item:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}},923018:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(8238),i=r(611370);const s=async(e,t)=>{e.slug&&!e.slug.startsWith(`${e.orgUrlKey}|`)&&(e.slug=(0,i.Wl)(e.slug,e.orgUrlKey));const{id:r,slug:s}=e,o=r?{slug:s,existingId:r}:{slug:s};return e.slug=await(0,n.bb)(o,t),e.typeKeywords=(0,n.KH)(e.typeKeywords,e.slug),e}},748638:(e,t,r)=>{"use strict";r.d(t,{Gc:()=>s,XE:()=>n,g6:()=>o,wU:()=>i});const n="::",i="|";function s(e){return e.indexOf(n)>-1&&(e=e.replace(n,i)),e}function o(e){return e.indexOf(i)>-1&&(e=e.replace(i,n)),e}},611370:(e,t,r)=>{"use strict";r.d(t,{$M:()=>l,C5:()=>c,I2:()=>o,Wl:()=>a,ti:()=>u});var n=r(869787),i=r(748638);const s=256,o="slug";function a(e,t="",r=0){const n=[o];return t&&n.push(t.toLowerCase()),n.push(e),n.join("|").substring(0,s-r).replace(/-+$/,"").replace(new RegExp(`^${o}\\|`),"")}function c(e){return s-`${o}|${e}|`.length}const u=e=>{let t,r,s=(0,n.k)(e)&&e;if(!s){let n;[n,s]=e.split("~");const o=new RegExp(`^((.*)${i.XE}
26)?(.*)$`).exec(n);o&&(t=o[2],r=o[3])}return{id:s,slug:r,orgKey:t}},l=(e,t)=>`${e.split(i.wU).pop()}~${t}`},622656:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var n=r(170209),i=r(609205);function s(e){const t=(0,i.D)(n.ll,{success:!0}),r=(0,i.D)(n.cl,{success:!0});return t(e).then((()=>r(e)))}},936709:(e,t,r)=>{"use strict";function n(e,t){if("object"!=typeof e||null===e)return;if("string"!=typeof t)return;const r=t.split(".");for(let t=0;t<r.length-1;t++){if(!e.hasOwnProperty(r[t]))return;e=e[r[t]]}delete e[r[r.length-1]]}r.d(t,{f:()=>n})},535794:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(348753);async function i(e,t,r){const{portal:i}=r,s=`${i}/content/users/${t}/items/${e}/deleteThumbnail`;return(0,n.WY)(s,r)}},526996:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(621922),i=r(609205),s=r(966499);function o(e,t){return(0,i.D)(s.$G,{id:e.item.id,success:!0})(Object.assign({item:(0,n.S)(e)},t))}},678657:(e,t,r)=>{"use strict";r.d(t,{i:()=>c});var n=r(170209),i=r(769759),s=r(8238),o=r(748638),a=r(611370);function c(e,t){const{id:r,slug:c,orgKey:u}=(0,a.ti)(e);if(r)return(0,n.rV)(r,t);const l=(0,i.tl)(c,u||t.siteOrgKey),d=(0,o.Gc)(l);return(0,s.NS)({slug:d},t).then((e=>{if(e.length)return e;{const e=d.split("|").slice(1).join("|");return(0,s.NS)({slug:e},t)}})).then((e=>e.length?(0,n.rV)(e[0].id,t):null))}},964033:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(609205),i=r(404091);function s(e,t){const r=`${e}Model`,s=`${e}Id`;if(t[r])return Promise.resolve(t[r]);if(t[s])return(0,n.D)(i.PD,{item:{id:t[s]},isMissing:!0})(t[s],t);throw new Error(`getModelFromOptions requires either a .${r} or .${s} property.`)}},79438:(e,t,r)=>{"use strict";r.d(t,{D:()=>i,z:()=>n});const n=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"https://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"https://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"https://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"https://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"https://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"https://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"https://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:"https://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:"https://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:"https://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:"https://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"https://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:"https://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:"https://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:"https://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:"https://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:"https://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"https://opendatacommons.org/licenses/o
26dbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"https://opendatacommons.org/licenses/by/summary"}];function i(e){let t;t={type:(e=e||"")?"custom":"none",text:e};let r=!1;const i=n.filter((t=>function(e,t){return(e=e.toLowerCase()).includes(t.name.toLowerCase())||e.includes(t.url.toLowerCase())||e.includes(t.abbr.toLowerCase())}(e,t)));if(i.length&&(r=!0,t=i.pop()),!r){let r;if(function(e){try{return!!new URL(e).protocol}catch(e){return!1}}(e))r=e;else if(function(e){return new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!\<\/a\>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(e)}(e)){const t=new RegExp(/href\s?=\s?["'](.*?)["']/);r=e.match(t)[1]}r&&(t.url=r,t.text="")}return t.text||delete t.text,t}},879605:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var n=r(748638),i=r(611370);function s(e,t=!1){const{id:r,properties:s}=e,o=null==s?void 0:s.slug;return o?(0,n.g6)(t?(0,i.$M)(o,r):o):r}},239777:(e,t,r)=>{"use strict";r.d(t,{zs:()=>w.z,$_:()=>n.$,ug:()=>i,fU:()=>S.fU,Wh:()=>D,km:()=>P,Pl:()=>M,fJ:()=>F.f,fL:()=>s.f,I7:()=>f,A7:()=>o.A,qJ:()=>v,iY:()=>q.i,NS:()=>S.NS,Rs:()=>B,Y_:()=>L,QR:()=>S.QR,vo:()=>$.v,G3:()=>a.G,Dj:()=>w.D,I8:()=>g,bb:()=>S.bb,sX:()=>c.s,V2:()=>u.V,Om:()=>j.O,MV:()=>H,Ze:()=>E.Z,yQ:()=>E.y,fd:()=>A,P4:()=>l.P,_s:()=>T._,KH:()=>S.KH,Ls:()=>d.L,hZ:()=>W,vb:()=>p.v,CT:()=>h.z,ZC:()=>N.Z});var n=r(622656);function i(e,t){return e.map((e=>(e.properties||(e.properties={}),Object.assign(e.properties,t),e)))}var s=r(936709),o=r(526996),a=r(964033),c=r(723717),u=r(243767),l=r(865999),d=r(932818),p=r(59625),h=r(540702),m=r(170209);function f(e,t,r){const n={q:`title:"${e}" AND ${Object.keys(t).map((e=>`${e}:"${t[e]}"`)).join(" AND ")}`,authentication:r};return(0,m.KT)(n).then((e=>e.results.length>0)).catch((e=>{throw Error(`Error in doesItemExistWithTitle ${e}`)}))}function g(e,t,r,n=0){let i=e;return n&&(i=`${e} ${n}`),f(i,t,r).then((s=>s?(n++,g(e,t,r,n)):i)).catch((e=>{throw Error(`Error in getUniqueItemTitle ${e}`)}))}var y=r(595727);const b=100;function v(e,t,r=-1,n){const i=t.num||b,s=t.start||1;return(-1===r?e(Object.assign(Object.assign({},t),{num:i,start:s})):Promise.resolve({nextStart:s,total:r,results:[],num:i})).then((r=>{if(-1===r.nextStart)return[r];const s=[];for(let e=r.nextStart;e<=r.total;e+=i)s.push(e);return(0,y.d)(s,(r=>e(Object.assign(Object.assign({},t),{start:r,num:i}))),n).then((e=>[r,...e]))})).then((e=>{const t=e.reduce(((e,t)=>[...e,...t.results]),[]),n=-1===r?t.length:r;return t.slice(0,n)}))}var w=r(79438),S=r(8238),E=r(201985),T=r(745260),I=r(348753),C=r(16933);function A(e,t,r){const n=`${(0,C.i)(r)}/oauth2/registerApp`,i={method:"POST",authentication:r.authentication,params:{itemId:e,appType:"browser",redirect_uris:JSON.stringify(t)}};return(0,I.WY)(n,i)}var O=r(966499),_=r(231566);async function D(e,t){const r=e.file;delete(e=Object.assign({},e)).file;const n=await(0,O.fC)(Object.assign({item:e,filename:r.name,async:!0,multipart:!0,overwrite:!0},t)),i=n.id;try{const n=6e6,s=function(e,t,r,n,i){const s=[];let o=1,a=0;for(;a<e.size;)s.push(Object.assign({file:e.slice(a,a+n,e.type),owner:t,id:r,partNum:o},i)),o+=1,a+=n;return s.reverse()}(r,e.owner,i,n,t);await(0,y.d)(s,(async e=>{if(!(await(0,m.cN)(e)).success)throw new Error("addItemPart failed")}),5),e.extent&&(0,_.pi)(e.extent)&&(e.extent=(0,_.CF)(e.extent)),await(0,O.wd)(Object.assign({id:i,item:e,owner:e.owner},t))}catch(r){throw await(0,m.it)(Object.assign({id:i,owner:e.owner},t)),r}return n}async function P(e,t){return await(0,O.fC)(Object.assign({item:e,owner:e.owner,file:e.file,dataUrl:e.dataUrl,text:e.text,multipart:e.multipart,async:e.async},t))}var k=r(282526),x=r(609205),R=r(252628);function U(e){return new Promise((t=>setTimeout(t,e)))}async function M(e){const{item:t,groups:r}=e,n=(0,k._T)(e,["item","groups"]),i=t.dataUrl||t.file;let s,o,a;if(s=t.file?await D(t,n):await P(t,n),i&&await async function(e,t,r){let n;do{if(await U(2e3),n=await(0,m.sy)(Object.assign({id:e},t)),"failed"===n.status)throw new Error(n.statusMessage)}while("completed"!==n.status)}(s.id,n),"private"!==t.access&&(o=await(0,m.zT)(Object.assign({id:s.id,owner:t.owner,access:t.access},n))),null==r?void 0:r.length){const e=(0,x.D)(m.Ju);a=await Promise.all(r.map((r=>e(Object.assign({id:s.id,owner:t.owner,groupId:r.id,confirmItemControl:(0,R.A)(r)},n)))))}return{title:t.title,createdItem:s,itemAccessResponse:o,itemSharingResponse:a}}var N=r(225198),j=r(501193),$=r(879605),F=r(535794),G=r(710755);async function L(e,t,r){let n;try{return n=await(0,G.z)(t,e,r),n.followersGroupId}catch(e){throw new Error(`Error fetching entity followers group ID: ${e}`)}}async function H(e,t,r,n){let i;return i="string"==typeof e?await L(e,r,n):e.followersGroupId,!!t.groups.find((e=>e.id===i))}async function B(e,t,r,n){if(await H(e,t,r,n))return Promise.reject("User is already following this entity.");const i=await L(e,r,n);try{return await(0,m.be)({id:i,authentication:n.hubRequestOptions.authentication}),{success:!0,username:t.username}}catch(e){throw new Error(`Error joining group: ${e}`)}}async function W(e,t,r,n){if(!await H(e,t,r,n))return Promise.reject("User is not following this entity.");const i=await L(e,r,n);try{return await(0,m.Ln)({id:i,authentication:n.hubRequestOptions.authentication}),{success:!0,username:t.username}}catch(e){throw new Error(`Error leaving group: ${e}`)}}var q=r(678657)},243767:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(723717);function i(e){const t={item:{id:e.item.id},appid:e.item.id};return(0,n.s)(e,t,{toISO:(e,t)=>
26t})}},723717:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(514215);function i(e,t,r){return(0,n.adlib)(e,t,r)}},501193:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(958328),i=r(170209);const s=async(e,t)=>{let r;try{const s="string"==typeof e?await(0,i.rV)(e,t):e;if(s.url){let e=(0,n.pW)(s.url);if("public"!==s.access&&t.authentication){const r=await t.authentication.getToken(s.url,t);r&&(e=`${e}?token=${r}`)}const{status:i}=await fetch(e);r=200!==i}else r=!0}catch(e){r=!0}return r}},201985:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i,y:()=>s});var n=r(329644);const i=["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 s(e){const t=(0,n.kI)(e);return i.forEach((e=>{delete t[e]})),t.extent="{{organization.defaultExtentBBox}}",t}},865999:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(329644),i=r(783163);function s(e,t,r="{{appid}}"){const s=(0,n.kI)(e),o=new RegExp(t,"g");return(0,i.w)(s,o,r)}},745260:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});var n=r(966499),i=r(826899);async function s(e,t,r,s,o){const a=Object.assign({item:{id:e},owner:o,params:{thumbnail:t,fileName:r},filename:r},s);try{if(!(await(0,n.$G)(a)).success)throw new i.Z("Set Project Thumbnail","Unknown error setting thumbnail.")}catch(e){throw e instanceof Error?new i.Z("Set Project Thumbnail",e.message,e):new i.Z("Set Project Thumbnail","Unknown error setting thumbnail.")}}},932818:(e,t,r)=>{"use strict";r.d(t,{L:()=>s});var n=r(170209),i=r(991762);async function s(e,t,r,s){const o=n.td.bind(void 0,Object.assign({q:`id:(${t.join(" OR ")})`,num:t.length},r)),a=e=>e.results.length===t.length;let c;try{({results:c}=t.length?await(0,i.$)(o,a):{results:[]})}catch(r){throw new Error(`Error sharing item: ${e} with groups: ${t.join(", ")}`)}return Promise.all(c.map((async t=>{const i=Object.assign(Object.assign({},r),{id:e,groupId:t.id,owner:s,confirmItemControl:t.capabilities.includes("updateitemcontrol")});try{return await(0,n.Ju)(i)}catch(r){throw new Error(`Error sharing item: ${e} with group: ${t.id}`)}})))}},8238:(e,t,r)=>{"use strict";r.d(t,{KH:()=>c,NS:()=>l,QR:()=>u,bb:()=>d,fU:()=>a});var n=r(170209),i=r(407267),s=r(611370),o=r(748638);function a(e,t=""){return(0,s.Wl)((0,i.l)(e),t,4)}function c(e,t){const r=e.filter((e=>!e.startsWith(`${s.I2}|`)));return r.push([s.I2,t].join("|")),r}function u(e,t){return l({slug:(0,o.Gc)(e)},t).then((e=>e.length?(0,n.rV)(e[0].id,t):null))}async function l(e,t){if(!e.slug)return[];const r={filter:`typekeywords:"${e.slug.startsWith(`${s.I2}|`)?e.slug:[s.I2,e.slug].join("|")}"`};return t.authentication?r.authentication=t.authentication:t.portal&&(r.portal=t.portal),e.exclude&&(r.q=`NOT id:${e.exclude}`),(await(0,n.KT)(r)).results}function d(e,t,r=0){const n=r?[e.slug,r].join("-"):e.slug;return l({slug:n,exclude:e.existingId},t).then((i=>i.length?d(e,t,r+1):n)).catch((e=>{throw Error(`Error in getUniqueSlug ${e}`)}))}},59625:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(170209);function i(e,t){if(e.item.protected){const r=Object.assign({id:e.item.id},t);return(0,n.ll)(r)}return Promise.resolve({success:!0})}},540702:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(170209);function i(e,t,r,i){return Promise.all(t.map((async t=>{const s=Object.assign({},{id:e,groupId:t},r);i&&(s.owner=i);try{return await(0,n.lF)(s)}catch(r){throw new Error(`Error unsharing item: ${e} with group: ${t}`)}})))}},225198:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(170209),i=r(826899),s=r(16933);async function o(e,t,r,o,a,c=""){try{if(!(await(0,n.zJ)(Object.assign({id:e,owner:t,resource:r,name:o,prefix:c},a))).success)throw new i.Z("Set Item Featured Image","Unknown error setting featured image.");const u=(0,s.i)(a.portal);return c&&(c=`${c}/`),`${u}/content/items/${e}/resources/${c}${o}`}catch(e){throw e instanceof Error?new i.Z("Set Item Featured Image",e.message,e):new i.Z("Set Item Featured Image","Unknown error setting featured image.")}}},991550:(e,t,r)=>{"use strict";r.d(t,{A:()=>
26o,M:()=>a});var n=r(282526),i=r(329644),s=r(946534);function o(e={displayType:"stat-card",metricId:void 0},t,r){const{value:i,valueType:o,dynamicMetric:c}=e,u=(0,n._T)(e,["value","valueType","dynamicMetric"]),{layerId:l,itemId:d,field:p,statistic:h,serviceUrl:m,fieldType:f,sourceLink:g,sourceTitle:y,allowExpressionSet:b,expressionSet:v,legacyWhere:w}=c||{},{entityInfo:S,metricName:E}=r||{},T={source:"dynamic"===e.type?{type:"service-query",serviceUrl:m,layerId:l,field:p,statistic:h,where:w||a(b?v:[])}:{type:"static-value",value:i,valueType:o},name:E||t,entityInfo:S||{id:void 0,name:void 0,type:void 0},id:t};return delete u.itemId,{metric:T,displayConfig:Object.assign(Object.assign({},u),{displayType:u.displayType||"stat-card",visibility:u.visibility||s.Q$.hidden,metricId:t,fieldType:f,itemId:d,expressionSet:v,allowExpressionSet:b,statistic:h,sourceLink:"dynamic"===e.type&&g?g:u.sourceLink,sourceTitle:"dynamic"===e.type&&y?y:u.sourceTitle,allowLink:"dynamic"===e.type?u.allowDynamicLink:u.allowLink,type:e.type})}}function a(e=[]){const t=e.map((e=>{const{field:t,values:r,relationship:n}=e,o=e=>e.replace&&e.replace(/(['])/g,"$1$1");if(!(r&&r.length&&t&&t.name))return!1;let a;switch(t.type){case"esriFieldTypeString":a=n===s.TS.LIKE?`${t.name} like '%${r[0]}%'`:`(${t.name} IN (${r.map((e=>`'${o(e)}'`)).join(", ")}))`;break;case"esriFieldTypeDate":"string"==typeof r[0]&&(a=`${t.name} >= timestamp '${o(r[0])} 00:00:00'`),"string"==typeof r[1]&&(a=`${t.name} <= timestamp '${o(r[1])} 23:59:59'`),"string"==typeof r[0]&&"string"==typeof r[1]&&(a=`${t.name} >= timestamp '${o(r[0])} 00:00:00' AND ${t.name} <= timestamp '${o(r[1])} 23:59:59'`);break;default:(0,i.kK)(r[0])||(a=`(${t.name}) >= ${r[0]}`),(0,i.kK)(r[1])||(a=`(${t.name}) <= ${r[1]}`),(0,i.kK)(r[0])||(0,i.kK)(r[1])||(a=`(${t.name}) >= ${r[0]} AND (${t.name}) <= ${r[1]}`)}return a})).filter(Boolean).join(" AND ")||"1=1";return encodeURIComponent(t)}},503319:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(625873),i=r(329644);function s(e){const t={id:e.id,name:e.name,type:e.type};return(e.metrics||[]).map((r=>{r.entityInfo=Object.assign({},t);const s=r.source;if("item-query"===s.type&&s.collectionKey){const t=s.collectionKey,r=(0,n.W)(e.catalog,`collections[findBy(key,'${t}')].scope`);r&&(s.scope=(0,i.kI)(r))}return r.source=s,r}))}},979597:(e,t,r)=>{"use strict";r.d(t,{zv:()=>s,M1:()=>o.M,Ag:()=>o.A,Ev:()=>n.E,qd:()=>i.q});var n=r(503319),i=r(832219);function s(e,t,r){const n=e.map((e=>e.attributes[t]));let i=null;switch(r){case"sum":i=n.reduce(((e,t)=>e+t),0);break;case"count":i=n.length;break;case"avg":i=n.reduce(((e,t)=>e+t),0)/n.length;break;case"min":i=n.reduce(((e,t)=>Math.min(e,t)),Number.MAX_VALUE);break;case"max":i=n.reduce(((e,t)=>Math.max(e,t)),Number.MIN_VALUE);break;case"countByValue":i=n.reduce(((e,t)=>(e[t]?e[t]+=1:e[t]=1,e)),{})}return i}var o=r(991550)},170130:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(282526);function i(e,t){const{allowExpressionSet:r,expressionSet:i,fieldType:s,itemId:o}=t,a=(0,n._T)(t,["allowExpressionSet","expressionSet","fieldType","itemId"]);let c=Object.assign({},a);if(e&&e.source)switch(e.source.type||""){case"service-query":c=Object.assign(Object.assign({type:"dynamic",dynamicMetric:Object.assign(Object.assign({},e.source),{itemId:o,expressionSet:i,allowExpressionSet:r,fieldType:s,sourceLink:t.sourceLink,sourceTitle:t.sourceTitle})},c),{sourceLink:void 0,sourceTitle:void 0});break;case"static-value":c=Object.assign({type:"static",value:e.source.value,valueType:e.source.valueType},c)}return c}},832219:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(958328),i=r(625873),s=r(881914),o=r(753533);async function a(e,t){switch(e.source.type){case"static-value":return function(e,t){const r=e.source,n=e.id.split("_")[0],i={attributes:{id:e.entityInfo.id,name:e.entityInfo.name,type:e.entityInfo.type,[n]:r.value,valueType:r.valueType}};return Promise.resolve({features:[i],generatedAt:(new Date).getTime()})}(e);case"service-query":return async function(e,t){const r=e.source,s=e.id.split("_")[0];r.where=r.where||"1=1";const o={onStatisticField:r.field,statisticType:r.statistic,outStatisticFieldName:r.field},a=r.serviceUrl+`/${r.layerId}`,c=await(0,n.QH)({url:a,where:r.where,f:"json",outStatistics:[o],authentication:t.requestOptions.authentication}),u=(0,i.W)(c,`features[0].attributes.${r.field}`);return{features:[{attributes:{id:e.entityInfo.id,name:e.entityInfo.name,type:e.entityInfo.type,[s]:u}}],generatedAt:(new Date).getTime()}}(e,t);case"item-query":return async function(e,t){const r=e.source,n=e.id.split("_")[0],c={typekeywords:r.keywords};r.itemTypes&&(c.type=r.itemTypes);const u={targetEntity:"item",filters:[{operation:"AND",predicates:[c]}]},l=r.scope||{targetEntity:"item",filters:[]},d=(0,s.W)([u,l]),p={requestOptions:t.hubRequestOptions,num:100},h=await(0,o.hw)(d,p),m=await h.results.reduce((async(e,s)=>{const o=await e,c=(0,i.W)(s,r.propertyPath),u={attributes:{id:s.id,name:s.title,type:s.type,[n]:null}};if(c)if("string"==typeof c||"number"==typeof c)u.attributes[n]=c,o.push(u);else{c.entityInfo=u.attributes;const e=await a(c,t);o.push(...e.features)}return o}
26),Promise.resolve([]));return{features:await Promise.all(m),generatedAt:(new Date).getTime()}}(e,t);default:throw new Error("Unknown metric type passed in.")}}},404091:(e,t,r)=>{"use strict";r.d(t,{Ax:()=>f,NY:()=>h,PD:()=>d,QB:()=>m,S3:()=>n.S,UO:()=>g,q9:()=>p,wn:()=>y});var n=r(621922),i=r(170209),s=r(966499),o=r(231566),a=r(8238),c=r(753244),u=r(329644),l=r(609205);function d(e,t){return Promise.all([(0,i.rV)(e,t),(0,i.m_)(e,t)]).then((e=>({item:e[0],data:e[1]})))}function p(e,t){return(0,a.QR)(e,t).then((e=>{const r=[Promise.resolve(e)];return e?r.push((0,i.m_)(e.id,t)):r.push(Promise.resolve(null)),Promise.all(r)})).then((e=>e[0]?{item:e[0],data:e[1]}:null))}async function h(e,t){const r=(0,u.kI)(e.item);return r.data=(0,u.kI)(e.data),r.extent&&"string"!=typeof r.extent&&(r.extent=(0,o.CF)(r.extent)),d((await(0,s.fC)(Object.assign({item:r},t))).id,t)}function m(e,t){const r=(0,u.kI)(e.item);r.data=(0,u.kI)(e.data),r.extent&&"string"!=typeof r.extent&&(r.extent=(0,o.CF)(r.extent)),function(e){return["description","snippet","tags","categories","licenseInfo"].some((t=>{var r;return""===e[t]||0===(null===(r=e[t])||void 0===r?void 0:r.length)}))}(r)&&(t.params=Object.assign(Object.assign({},t.params),{clearEmptyFields:!0}));const n=Object.assign({item:r},t);return(0,s.$G)(n).then((()=>r.data?d(r.id,t):(0,i.rV)(r.id,t).then((e=>({item:e})))))}async function f(e,t,r){const n=[],i=[];return t.forEach((t=>{n.push((0,c.E)(e.item.id,e.item.owner,t.resource,t.filename,r)),i.push(t.filename)})),Promise.all(n).then((()=>{const r=t.reduce(((e,t)=>(e[t.filename.split(".").shift()]=t.resource,e)),{});return Object.assign({resources:r},e)}))}async function g(e,t){return{item:e,data:await(0,i.m_)(e.id,t)}}async function y(e,t,r){return Object.entries(t).reduce((async(t,[n,s])=>{const o=(0,l.D)(i.AA,null),a=await o(e.id,Object.assign({fileName:s,readAs:s.split(".").pop()},r));return a&&(t[n]=a),t}),{})}},621922:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(329644);function i(e){const t=(0,n.kI)(e.item);return t.text=JSON.stringify(e.data),t}},71052:(e,t,r)=>{"use strict";r.d(t,{Z2:()=>a,KB:()=>i,yL:()=>c,ZZ:()=>s,LW:()=>o,h4:()=>l});class n extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var i,s,o,a,c;!function(e){e.EMAIL="EMAIL"}(i||(i={})),function(e){e.TELEMETRY_REPORT="TELEMETRY_REPORT",e.EVENT="EVENT",e.DISCUSSION_ON_ENTITY="DISCUSSION_ON_ENTITY"}(s||(s={})),function(e){e.DISCUSSION="DISCUSSION"}(o||(o={})),function(e){e.ON_EVENT="ON_EVENT",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY"}(a||(a={})),function(e){e.DISCUSSION_POST_PENDING="DISCUSSION_POST_PENDING"}(c||(c={}));const u=(e,t)=>async function(e,t){const{url:r,method:i,data:s}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:i,cache:a,credentials:c,mode:o};s&&(p.body=JSON.stringify(s));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new n(m,d,f,JSON.stringify(g.message))}({url:"/api/newsletters-scheduler/v1/subscriptions/notify",method:"POST",headers:{"Content-Type":"application/json"},data:e},t);async function l(e){return e.token=await function(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}(e),u(e.data,e)}},616704:(e,t,r)=>{"use strict";function n(e){const{token:t,authentication:r}=e;return r?r.getToken(r.portal):Promise.resolve(t)}async function i(e,t){const{url:r,method:n,data:i}=e,{mode:o,cache:a,credentials:c}=t,{headers:u,params:l}=function(e,t){const r=new Headers(Object.assign(Object.assign({},e.headers),t.headers));return t.token&&r.set("Authorization",t.token),{headers:r,params:Object.assign(Object.assign({},e.params),t.params)}}(e,t),d=`${function(e="https://hub.arcgis.com"){return e.replace(/\/$/,"")}(t.hubApiUrl)}${r}?${new URLSearchParams(l)}`,p={headers:u,method:n,cache:a,credentials:c,mode:o};i&&(p.body=JSON.stringify(i));const h=await fetch(d,p),{statusText:m,status:f}=h;if(h.ok)return h.json();const g=await h.json();throw new s(m,d,f,JSON.stringify(g.message))}r.d(t,{Gl:()=>a,gT:()=>c,os:()=>m,yJ:()=>u,XW:()=>C,r4:()=>D,h8:()=>x,pI:()=>O,tJ:()=>A,PR:()=>P,Ld:()=>I,Mg:()=>_,Nq:()=>k});
26class s extends Error{constructor(e,t,r,n){super(e),this.status=r,this.url=t,this.error=n}}var o,a,c,u,l,d,p,h,m;!function(e){e.DISCUSSION="DISCUSSION"}(o||(o={})),function(e){e.EMAIL="EMAIL"}(a||(a={})),function(e){e.ON_EVENT="ON_EVENT",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY"}(c||(c={})),function(e){e.TELEMETRY_REPORT="TELEMETRY_REPORT",e.EVENT="EVENT",e.DISCUSSION_ON_ENTITY="DISCUSSION_ON_ENTITY"}(u||(u={})),function(e){e.ASC="ASC",e.DESC="DESC"}(l||(l={})),function(e){e.AND="AND",e.OR="OR"}(d||(d={})),function(e){e.content="content",e.dataset="dataset",e.document="document",e.event="event",e.feedback="feedback",e.initiative="initiative",e.people="people",e.site="site",e.team="team",e.template="template",e.project="project",e.channel="channel",e.discussion="discussion",e.eventAttendee="eventAttendee"}(p||(p={})),function(e){e.item="item",e.group="group",e.user="user",e.portalUser="portalUser",e.communityUser="communityUser",e.groupMember="groupMember",e.event="event",e.channel="channel",e.discussionPost="discussionPost",e.eventAttendee="eventAttendee"}(h||(h={})),function(e){e.DISCUSSION_POST_PENDING="DISCUSSION_POST_PENDING"}(m||(m={}));const f=(e,t)=>i({url:"/api/newsletters/v1/subscriptions",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),g=(e,t)=>i({url:"/api/newsletters/v1/subscriptions",method:"GET",params:e},t),y=(e,t)=>i({url:"/api/newsletters/v1/subscriptions/subscribe",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),b=(e,t)=>i({url:`/api/newsletters/v1/subscriptions/${e}`,method:"GET"},t),v=(e,t,r)=>i({url:`/api/newsletters/v1/subscriptions/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),w=(e,t)=>i({url:"/api/newsletters/v1/users",method:"POST",headers:{"Content-Type":"application/json"},data:e},t),S=(e,t)=>i({url:`/api/newsletters/v1/users/${e}`,method:"GET"},t),E=(e,t,r)=>i({url:`/api/newsletters/v1/users/${e}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:t},r),T=(e,t)=>
26i({url:`/api/newsletters/v1/users/${e}`,method:"DELETE"},t);async function I(e){return e.token=await n(e),y(e.data,e)}async function C(e){return e.token=await n(e),f(e.data,e)}async function A(e){return e.token=await n(e),g(e.data,e)}async function O(e){return e.token=await n(e),b(e.subscriptionId,e)}async function _(e){return e.token=await n(e),v(e.subscriptionId,e.data,e)}async function D(e){return e.token=await n(e),w(e.data,e)}async function P(e){return e.token=await n(e),S(e.userId,e)}async function k(e){return e.token=await n(e),E(e.userId,e.data,e)}async function x(e){return e.token=await n(e),T(e.userId,e)}},584253:(e,t,r)=>{"use strict";r.d(t,{Q6:()=>o,W8:()=>u,c:()=>i,cg:()=>a,r9:()=>s,x5:()=>c});var n=r(523991);function i(e,t,r){return r=r||"",Array.isArray(e)?e.map(s):!e||!c(e)||o(e)||u(e)||a(e)?t(e,r):Object.assign({},e,(0,n.t)(e,s));function s(e,n){return i(e,t,""+(r?r+"."+n:n))}}function s(e){return"string"==typeof e||e instanceof String}function o(e){return e instanceof Date}function a(e){return"function"==typeof e}function c(e){return"object"==typeof e}function u(e){return e instanceof RegExp}},523991:(e,t,r)=>{"use strict";function n(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=t(e[n],n,e),r}),{})}r.d(t,{t:()=>n})},422897:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(329644);function i(e,t,r={},i=!1){const s=t.split(".");let o=e;const a=s.length-1;s.forEach(((e,t)=>{o.hasOwnProperty(e)&&null!=o[e]?t===a&&("object"!=typeof o[e]||Array.isArray(o[e])?o[e]=r:o[e]=i?(0,n.kI)(r):Object.assign(o[e],(0,n.kI)(r))):o[e]=t===a?r:{},o=o[e]}))}},783163:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(584253);function i(e,t,r){return(0,n.c)(e,(function(e){if(!(0,n.r9)(e))return e;let i;return i=(0,n.W8)(t)?t:new RegExp(t,"g"),e.replace(i,r)}))}},910968:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(584253);function i(e,t){if(e===t)return!0;if(e&&t&&(0,n.x5)(e)&&(0,n.x5)(t)){if(Array.isArray(e)!==Array.isArray(t))return!1;const r=Object.keys(e);return r.length===Object.keys(t).length&&r.every((r=>i(e[r],t[r])))}return!1}},625873:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(e,t)=>t.split(".").reduce((function(t,r){const i=r.match(/\[(.*?)\]$/);if(i){const e=i[1],n=r.replace(i[0],"");if(parseInt(e,10)>-1){const r=parseInt(e,10);return Array.isArray(t[n])&&t[n][r]?t[n][r]:void 0}return function(e,t){const r=t.split("(");if(!r||2!==r.length)return;let n;const i=r[0],s=r[1].replace(")","").split(",").map((e=>e.trim()));if("findBy"===i){const t=s[0];let r;o=s[1],r=isNaN(parseFloat(o))?s[1].replace(/'/g,""):parseFloat(s[1]),n=e.find((e=>e[t]===r))}else n=void 0;var o;return n}(t[n],e)}return t&&void 0!==t[r]?null!==t[r]&&t[r].$use?n(e,t[r].$use):t[r]:void 0}),e)},551753:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(625873);function i(e,t,r){const i=(0,n.W)(e,t);return void 0!==i?i:r}},8116:(e,t,r)=>{"use strict";r.d(t,{c:()=>n.c,Q6:()=>n.Q6,cg:()=>n.cg,x5:()=>n.x5,W8:()=>n.W8,r9:()=>n.r9,t2:()=>i.t,zI:()=>E,vZ:()=>S.v,JS:()=>f,MX:()=>y,wA:()=>g,qm:()=>s.q,ig:()=>d.w,uZ:()=>o,WJ:()=>a.W,AM:()=>c,tj:()=>u.t,PM:()=>p.P,H6:()=>w.H,t_:()=>l.t,CY:()=>v,tg:()=>h.t});var n=r(584253),i=r(523991),s=r(422897);function o(e,t){return(0,s.q)(e,t)}var a=r(625873);function c(e,t){return t.reduce(((t,r)=>{const n=(0,a.W)(e,r);return n&&t.push(n),t}),[])}var u=r(551753),l=r(538143),d=r(783163),p=r(689275),h=r(466674);function m(e){let t=!1;return!e||!(0,n.x5)(e)||(0,n.Q6)(e)||(0,n.W8)(e)||(0,n.cg)(e)||(t=!0),t}function f(e,t){return Array.isArray(e)?e.reduce(((e,r)=>{if(t(r))if(m(r)){const n=f(r,t);e=[...e,n]}else e=[...e,r];return e}),[]):m(e)?Object.keys(e).reduce(((r,n)=>{if(t(e[n]))if(m(e[n]))if("undefined"!=typeof Blob&&e[n]instanceof Blob)r[n]=e[n];else{const i=f(e[n],t);r[n]=i}else r[n]=e[n];return r}),{}):void 0}function g(e,t){return y(e,(e=>e.id===t))}function y(e,t){return Array.isArray(e)?e.reduce(((e,r)=>{if(t(r))e=r;else if(m(r)){const n=y(r,t);
26n&&(e=n)}return e}),void 0):m(e)?t(e)?e:Object.keys(e).reduce(((r,n)=>{if(m(e[n])){const i=y(e[n],t);i&&(r=i)}return r}),void 0):void 0}var b=r(329644);function v(e,t){const r=Object.keys(e);return t=t||(0,b.kI)(e),r.reduce((function(r,i){if(Array.isArray(e[i]))r[i]=e[i].map((e=>v(e,t)));else if(!e[i]||!(0,n.x5)(e[i])||(0,n.Q6)(e[i])||(0,n.W8)(e[i])||(0,n.cg)(e[i]))r[i]=e[i];else if(e[i]&&e[i].$use){const s=(0,a.W)(t,e[i].$use);(0,n.x5)(s)?r[i]=v(s,t):r[i]=s}else r[i]=v(e[i],t);return r}),{})}var w=r(276978),S=r(910968);function E(e,t){if(!(0,S.v)(e,t))return Array.isArray(e)?e.reduce(((e,r)=>{if(m(r)){const n=E(r,t);void 0!==n&&(e=[...e,n])}else r!==t&&(e=[...e,r]);return e}),[]):(0,n.x5)(e)?Object.keys(e).reduce(((r,n)=>{if(m(e[n])&&!(0,S.v)(e[n],t)){const i=E(e[n],t);r[n]=i}else(0,S.v)(e[n],t)||(r=Object.assign(Object.assign({},r),{[n]:e[n]}));return r}),{}):e}},689275:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(625873),i=r(422897);function s(e,t,r){return Array.isArray(r)&&r.length?(r.forEach((r=>{void 0!==(0,n.W)(e,r)&&(0,i.q)(t,r,(0,n.W)(e,r))})),t):e}},276978:(e,t,r)=>{"use strict";r.d(t,{H:()=>i});var n=r(689275);function i(e,t){return(0,n.P)(e,{},t)}},538143:(e,t,r)=>{"use strict";function n(e){return Object.keys(e).forEach((t=>{e[t]&&"object"==typeof e[t]?n(e[t]):null==e[t]&&delete e[t]})),e}r.d(t,{t:()=>n})},466674:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(422897);function i(e,t,r,i=!1){Array.isArray(e)&&(e=e.join(".")),(0,n.q)(r,e,t,i)}},288285:(e,t,r)=>{"use strict";r.d(t,{T:()=>o});var n=r(625873),i=r(347322),s=r(170209);function o(e,t){const r=(0,n.W)(t,"portal")||(0,n.W)(t,"authentication.portal")||"www.arcgis.com",o=`${(0,i.D)(r)}/sharing/rest`;return(0,s._0)(e,Object.assign(Object.assign({},t),{portal:o}))}},351873:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>s,ud:()=>a,yT:()=>o});var n=r(288285),i=r(417503);async function s(e,t){return a(await(0,n.T)(e,t),t.authentication.token)}function o(e){const t=a(e);return{id:t.id,title:t.name,name:t.name,url:t.url,type:"Organization",family:"organization",source:"portal",createdDate:t.createdDate,createdDateSource:t.createdDateSource,updatedDate:t.updatedDate,updatedDateSource:t.updatedDateSource,thumbnailUrl:t.thumbnailUrl,thumbnail:t.thumbnail,description:t.description,access:t.access,tags:t.tags,typeKeywords:t.typeKeywords,links:t.links}}function a(e,t){let r=`https://${e.portalHostname}`;return e.urlKey&&(r=`https://${e.urlKey}.${e.customBaseUrl}`),{id:e.id,orgId:e.id,access:e.access,name:e.name,summary:e.description,description:e.description,type:"Organization",source:"portal",createdDate:new Date(e.created),createdDateSource:"portal",updatedDate:new Date(e.modified),updatedDateSource:"portal",portal:e,thumbnail:e.thumbnail,thumbnailUrl:(0,i.S)(e,t),url:r,links:{self:r,thumbnail:(0,i.S)(e,t)},typeKeywords:[],tags:[]}}},875075:(e,t,r)=>{"use strict";r.d(t,{k:()=>s,w:()=>i});var n=r(348753);function i(e,t,r,i){const s=`${i.authentication.portal}/portals/${e}/limits?limitsType=${t}&limitName=${r}&f=json`;return(0,n.WY)(s,i)}function s(e,t){return i(e,"Groups","MaxNumUserGroups",t).then((e=>e.limitValue)).catch((e=>512))}},919840:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>s.Ak,T7:()=>n.T,kq:()=>i.k,ud:()=>s.ud,wm:()=>i.w,yT:()=>s.yT});var n=r(288285),i=r(875075),s=r(351873)},806050:(e,t,r)=>{"use strict";r.d(t,{T:()=>d});var n=r(375744),i=r(934647),s=r(656110),o=r(579032),a=r(329644),c=r(50950),u=r(144219),l=r(741619);class d extends s.x{constructor(e,t){super(e,t)}static fromJson(e,t){const r=this.applyDefaults(e,t);return new d(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=d.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,o.H6)(e,t.hubRequestOptions);return d.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Page not found."):e}}static applyDefaults(e,t){e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey||"");const r=Object.assign(Object.assign({},n.XJ),e);return r.type=t.isPortal?n.GH:n.t9,r}update(e){if(this.isDestroyed)throw new Error("HubPage is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubPage is already destroyed.");this.entity.id?this.entity=await(0,o.T$)(this.entity,this.context.userRequestOptions):this.entity=await(0,o.D4)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubPage is already destroyed.");this.isDestroyed=!0,await(0,o.CT)(this.entity.id,this.context.userRequestOptions)}async getEditorConfig(e,t){return(0,i.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,c.t)((0,a.kI)(this.entity),t,this.context.hubRequestOptions):(0,a.kI)(this.entity);return r._slug=(0,u.y)(this.entity),r}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const t=(0,l.i)(e,this.context.portal);return this.entity=t,await this.save(),this.entity}}},579032:(e,t,r)=>{"use strict";r.d(t,{VC:()=>k,nu:()=>P,D4:()=>O,CT:()=>x,Hy:()=>R,H6:()=>D,T$:()=>_});var n=r(610924),i=r(653609),s=r(815985),o=r(625873),a=r(295426),c=r(329644),u=r(76309),l=r(8238),d=r(404091),p=r(178749),h=r(551076);function m(){const e=(0,h.f)();return["headContent","layout"].forEach((t=>{e.push({entityKey:t,storeKey:`data.values.${t}`})})),e}var f=r(902815),g=r(184488),y=r(849870),b=r(578506),v=r(389094),w=r(879605);function S(e,t){const r=(0,v.g)(e,t),n=(0,i.bC)(e.type,(0,w.v)(e,!0),e.typeKeywords);return Object.assign(Object.assign({},r),{siteRelative:n,layoutRelative:`/pages/${e.id}/edit`})}function E(e,t,r){var n;let i;r.authentication&&(i=r.authentication.token),t=(0,b.k)(e.item,t);const s=(0,f.S)(e.item,r,i);return t.thumbnailUrl=s,t.links=S(e.item,r),t.features=(0,g.U)((null===(n=e.data.settings)||void 0===n?void 0:n.features)||{},y.IA),t}var T=r(170209),I=r(375744),C=r(923018),A=r(678657);async function O(e,t){const r=Object.assign(Object.assign({},I.XJ),e);r.slug||(r.slug=(0,l.fU)(r.name,r.orgUrlKey)),await(0,C.E)(r,t);const n=new p.c7(m());let i=n.entityToStore(r,(0,c.kI)(I.Mn));i=await(0,d.NY)(i,t);let s=n.storeToEntity(i,{});return s=E(i,s,t),s}async function _(e,t){await(0,C.E)(e,t);const r=await(0,d.PD)(e.id,t),n=new p.c7(m()),i=n.entityToStore(e,r),s=await(0,d.QB)(i,t);let o=n.storeToEntity(s,e);return o=E(r,o,t),o}
26async function D(e,t){const r=await(0,A.i)(e,t);return r?k(r,t):null}function P(e,t){return E(e,new p.c7(m()).storeToEntity(e,{}),t)}async function k(e,t){return P(await(0,d.UO)(e,t),t)}async function x(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,T.cl)(r)}async function R(e,t,r){const l={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,n._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,i.jA)(e),rawResult:e},d=(t=[...t].filter(c.Tw)).map(a.u),p=(0,u.e)("enrichment",d).filter(c.Tw);let h={};return p.length&&(h=await(0,s.Z)(e,p,r)),d.forEach((e=>{l[e.prop]=(0,o.W)(h,e.path)})),l.links=S(e,r),l}},849870:(e,t,r)=>{"use strict";r.d(t,{IA:()=>n,Nd:()=>i,Q8:()=>s,bS:()=>o});const n={},i=["hub:page","hub:page:create","hub:page:delete","hub:page:edit","hub:page:view","hub:page:canChangeAccess","hub:page:workspace","hub:page:workspace:overview","hub:page:workspace:dashboard","hub:page:workspace:details","hub:page:workspace:settings","hub:page:workspace:collaborators","hub:page:manage"],s=[{permission:"hub:page",services:["portal"]},{permission:"hub:page:create",dependencies:["hub:page"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:page:view",dependencies:["hub:page"]},{permission:"hub:page:edit",dependencies:["hub:page"],authenticated:!0,entityEdit:!0},{permission:"hub:page:delete",dependencies:["hub:page"],authenticated:!0,entityDelete:!0},{permission:"hub:page:canChangeAccess",dependencies:["hub:page"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:page:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:page:workspace:overview",availability:["alpha"],dependencies:["hub:page:workspace","hub:page:view"]},{permission:"hub:page:workspace:dashboard",dependencies:["hub:page:workspace","hub:page:view"]},{permission:"hub:page:workspace:details",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:workspace:collaborators",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:workspace:settings",dependencies:["hub:page:workspace","hub:page:edit"]},{permission:"hub:page:manage",dependencies:["hub:page:edit"]}],o=["data.values.layout","data.values.headContent"]},451003:(e,t,r)=>{"use strict";r.d(t,{PageSchema:()=>s,X:()=>i});var n=r(434164);const i=["hub:page:edit","hub:page:create"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign({},n.N.properties)})},375744:(e,t,r)=>{"use strict";r.d(t,{GH:()=>i,Mn:()=>a,XJ:()=>o,t9:()=>n});const n="Hub Page",i="Site Page",s="hubPage",o={name:"",permissions:[],schemaVersion:1,tags:[],typeKeywords:[s],view:{contacts:[],featuredContentIds:[],showMap:!0},layout:{sections:[]}},a={item:{type:n,title:"",description:"",snippet:"",tags:[],typeKeywords:[s],properties:{slug:"",schemaVersion:1}},data:{values:{layout:{}}}}},227727:(e,t,r)=>{"use strict";r.d(t,{CT:()=>n.CT,D4:()=>n.D4,H6:()=>n.H6,Hy:()=>n.Hy,T:()=>i.T,T$:()=>n.T$,VC:()=>n.VC,nu:()=>n.nu});var n=r(579032),i=r(806050)},419539:(e,t,r)=>{"use strict";r.d(t,{G:()=>g,H:()=>y});var n=r(444018),i=r(51557),s=r(281488),o=r(945068),a=r(52765),c=r(143554),u=r(849870),l=r(918648),d=r(325572),p=r(249960),h=r(491928),m=r(567031),f=r(113426);const g=[...s.Xm,...i.cE,...n.Z7,...o.$,...a.aB,...c.y,...u.Q8,...p.i,...l.j,...d.Wf,{permission:"hub:gating:workspace:released"},{permission:"hub:feature:ai-assistant",availability:["alpha"],flagValue:!1,entityConfigurable:!0},{permission:"hub:feature:privacy",environments:["devext"]},{permission:"hub:feature:workspace",dependencies:["hub:gating:workspace:released"]},{permission:"hub:feature:user:preferences",environments:["devext","qaext","production"]},{permission:"hub:environment:qaext",environments:["qaext"]},{permission:"hub:environment:devext",environments:["devext"]},{permission:"hub:environment:production",environments:["production"]},{permission:"hub:environment:enterprise",environments:["enterprise"]},{permission:"hub:card:follow",environments:["qaext"],availability:["flag"],licenses:["hub-basic","hub-premium"]}
26,{permission:"hub:feature:workspace:user",dependencies:["hub:feature:workspace"]},{permission:"hub:feature:workspace:org",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:keyboardshortcuts",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:history",availability:["alpha"],environments:["devext","qaext"]},{permission:"hub:feature:newentityview",environments:["qaext"],availability:["flag"]},{permission:"hub:feature:catalogs",environments:["qaext"],availability:["alpha"]},{permission:"hub:feature:catalogs:edit:advanced",entityEdit:!0,licenses:["hub-premium"],assertions:[{property:"entity:type",type:"neq",value:"Hub Site Application"}]},{permission:"hub:feature:inline-workspace",environments:["devext"],availability:["alpha"]},{permission:"hub:feature:pagescatalog",environments:["qaext"],availability:["alpha"]},{permission:"hub:license:hub-premium",licenses:["hub-premium"]},{permission:"hub:license:hub-basic",licenses:["hub-basic"]},{permission:"hub:license:enterprise-sites",licenses:["enterprise-sites"]},{permission:"hub:availability:alpha",availability:["alpha"]},{permission:"hub:availability:beta",availability:["beta"]},{permission:"hub:availability:general",availability:["general"]},...h.w,...m.K,...f.l];function y(e){return g.find((t=>t.permission===e))}},918648:(e,t,r)=>{"use strict";r.d(t,{j:()=>i,x:()=>n})
27;const n=["platform:features:user:edit","platform:features:user:fullEdit","platform:features:user:manageVersions","platform:marketplace:admin:manage","platform:marketplace:admin:purchase","platform:marketplace:admin:startTrial","platform:opendata:user:designateGroup","platform:opendata:user:openDataAdmin","platform:portal:admin:assignToGroups","platform:portal:admin:categorizeItems","platform:portal:admin:changeUserRoles","platform:portal:admin:createGPWebhook","platform:portal:admin:createUpdateCapableGroup","platform:portal:admin:createLeavingDisallowedGroup","platform:portal:admin:deleteGroups","platform:portal:admin:deleteItems","platform:portal:admin:deleteUsers","platform:portal:admin:disableUsers","platform:portal:admin:inviteUsers","platform:portal:admin:manageCollaborations","platform:portal:admin:manageCredits","platform:portal:admin:manageEnterpriseGroups","platform:portal:admin:manageLicenses","platform:portal:admin:manageRoles","platform:portal:admin:manageSecurity","platform:portal:admin:manageServers","platform:portal:admin:manageUtilityServices","platform:portal:admin:manageWebhooks","platform:portal:admin:manageWebsite","platform:portal:admin:reassignGroups","platform:portal:admin:reassignItems","platform:portal:admin:reassignUsers","platform:portal:admin:shareToGroup","platform:portal:admin:shareToOrg","platform:portal:admin:shareToPublic","platform:portal:admin:updateGroups","platform:portal:admin:updateItemCategorySchema","platform:portal:admin:updateItems","platform:portal:admin:updateMemberCategorySchema","platform:portal:admin:updateUsers","platform:portal:admin:viewGroups","platform:portal:admin:viewItems","platform:portal:admin:viewUsers","platform:portal:publisher:bulkPublishFromDataStores","platform:portal:publisher:createDataPipelines","platform:portal:publisher:createFeatureWebhook","platform:portal:publisher:publishBigDataAnalytics","platform:portal:publisher:publishDynamicImagery","platform:portal:publisher:publishFeatures","platform:portal:publisher:publishFeeds","platform:portal:publisher:publishKnowledgeGraph","platform:portal:publisher:publishRealTimeAnalytics","platform:portal:publisher:publishScenes","platform:portal:publisher:publishServerGPServices","platform:portal:publisher:publishServerServices","platform:portal:publisher:publishTiledImagery","platform:portal:publisher:publishTiles","platform:portal:publisher:registerDataStores","platform:portal:user:addExternalMembersToGroup","platform:portal:user:categorizeItems","platform:portal:user:createGroup","platform:portal:user:createItem","platform:portal:user:invitePartneredCollaborationMembers","platform:portal:user:joinGroup","platform:portal:user:joinNonOrgGroup","platform:portal:user:reassignItems","platform:portal:user:receiveItems","platform:portal:user:runWebTool","platform:portal:user:shareGroupToOrg","platform:portal:user:shareGroupToPublic","platform:portal:user:shareToGroup","platform:portal:user:shareToOrg","platform:portal:user:shareToPublic","platform:portal:user:viewHostedFeatureServices","platform:portal:user:viewHostedTileServices","platform:portal:user:viewOrgGroups","platform:portal:user:viewOrgItems","platform:portal:user:viewOrgUsers","platform:portal:user:viewTracks","platform:premium:publisher:createAdvancedNotebooks","platform:premium:publisher:createNotebooks","platform:premium:publisher:geoanalytics","platform:premium:publisher:rasteranalysis","platform:premium:publisher:scheduleNotebooks","platform:premium:user:demographics","platform:premium:user:elevation","platform:premium:user:featurereport","platform:premium:user:geocode:stored","platform:premium:user:geocode:temporary","platform:premium:user:geocode","platform:premium:user:geoenrichment","platform:premium:user:networkanalysis:close
27stfacility","platform:premium:user:networkanalysis:locationallocation","platform:premium:user:networkanalysis:optimizedrouting","platform:premium:user:networkanalysis:origindestinationcostmatrix","platform:premium:user:networkanalysis:routing","platform:premium:user:networkanalysis:servicearea","platform:premium:user:networkanalysis:vehiclerouting","platform:premium:user:networkanalysis","platform:premium:user:places","platform:premium:user:spatialanalysis"],i=[{permission:"platform:features:user:edit",services:["portal"],authenticated:!0,privileges:["features:user:edit"]},{permission:"platform:features:user:fullEdit",services:["portal"],authenticated:!0,privileges:["features:user:fullEdit"]},{permission:"platform:features:user:manageVersions",services:["portal"],authenticated:!0,privileges:["features:user:manageVersions"]},{permission:"platform:marketplace:admin:manage",services:["portal"],authenticated:!0,privileges:["marketplace:admin:manage"]},{permission:"platform:marketplace:admin:purchase",services:["portal"],authenticated:!0,privileges:["marketplace:admin:purchase"]},{permission:"platform:marketplace:admin:startTrial",services:["portal"],authenticated:!0,privileges:["marketplace:admin:startTrial"]}
27,{permission:"platform:opendata:user:designateGroup",services:["portal"],authenticated:!0,privileges:["opendata:user:designateGroup"]},{permission:"platform:opendata:user:openDataAdmin",services:["portal"],authenticated:!0,privileges:["opendata:user:openDataAdmin"]},{permission:"platform:portal:admin:assignToGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:assignToGroups"]},{permission:"platform:portal:admin:categorizeItems",services:["portal"],authenticated:!0,privileges:["portal:admin:categorizeItems"]},{permission:"platform:portal:admin:changeUserRoles",services:["portal"],authenticated:!0,privileges:["portal:admin:changeUserRoles"]},{permission:"platform:portal:admin:createGPWebhook",services:["portal"],authenticated:!0,privileges:["portal:admin:createGPWebhook"]},{permission:"platform:portal:admin:createUpdateCapableGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:createUpdateCapableGroup"]},{permission:"platform:portal:admin:createLeavingDisallowedGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:createLeavingDisallowedGroup"]},{permission:"platform:portal:admin:deleteGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteGroups"]},{permission:"platform:portal:admin:deleteItems",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteItems"]},{permission:"platform:portal:admin:deleteUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:deleteUsers"]},{permission:"platform:portal:admin:disableUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:disableUsers"]},{permission:"platform:portal:admin:inviteUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:inviteUsers"]},{permission:"platform:portal:admin:manageCollaborations",services:["portal"],authenticated:!0,privileges:["portal:admin:manageCollaborations"]},{permission:"platform:portal:admin:manageCredits",services:["portal"],authenticated:!0,privileges:["portal:admin:manageCredits"]},{permission:"platform:portal:admin:manageEnterpriseGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:manageEnterpriseGroups"]},{permission:"platform:portal:admin:manageLicenses",services:["portal"],authenticated:!0,privileges:["portal:admin:manageLicenses"]},{permission:"platform:portal:admin:manageRoles",services:["portal"],authenticated:!0,privileges:["portal:admin:manageRoles"]},{permission:"platform:portal:admin:manageSecurity",services:["portal"],authenticated:!0,privileges:["portal:admin:manageSecurity"]},{permission:"platform:portal:admin:manageServers",services:["portal"],authenticated:!0,privileges:["portal:admin:manageServers"]},{permission:"platform:portal:admin:manageUtilityServices",services:["portal"],authenticated:!0,privileges:["portal:admin:manageUtilityServices"]},{permission:"platform:portal:admin:manageWebhooks",services:["portal"],authenticated:!0,privileges:["portal:admin:manageWebhooks"]},{permission:"platform:portal:admin:manageWebsite",services:["portal"],authenticated:!0,privileges:["portal:admin:manageWebsite"]},{permission:"platform:portal:admin:reassignGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignGroups"]},{permission:"platform:portal:admin:reassignItems",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignItems"]},{permission:"platform:portal:admin:reassignUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:reassignUsers"]},{permission:"platform:portal:admin:shareToGroup",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToGroup"]},{permission:"platform:portal:admin:shareToOrg",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToOrg"]},{permission:"platform:portal:admin:shareToPublic",services:["portal"],authenticated:!0,privileges:["portal:admin:shareToPublic"]},{permission:"platform:portal:admin:updateGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:updateGroups"]},{permission:"platform:portal:admin:updateItemCategorySchema",services:["portal"],authenticated:!0,privileges:["portal:admin:updateItemCategorySchema"]},{permission:"platform:portal:admin:updateItems",services:["portal"],authenticated:!0,privileges:["portal:admin:updateItems"]},{permission:"platform:portal:admin:updateMemberCategorySchema",services:["portal"],authenticated:!0,privileges:["portal:admin:updateMemberCategorySchema"]},{permission:"platform:portal:admin:updateUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:updateUsers"]},{permission:"platform:portal:admin:viewGroups",services:["portal"],authenticated:!0,privileges:["portal:admin:viewGroups"]},{permission:"platform:portal:admin:viewItems",services:["portal"],authenticated:!0,privileges:["portal:admin:viewItems"]},{permission:"platform:portal:admin:viewUsers",services:["portal"],authenticated:!0,privileges:["portal:admin:viewUsers"]},{permission:"platform:portal:publisher:bulkPublishFromDataStores",services:["portal"],authenticated:!0,privileges:["portal:publisher:bulkPublishFromDataStores"]},{permission:"platform:portal:publisher:createDataPipelines",services:["portal"],authenticated:!0,privileges:["portal:publisher:createDataPipelines"]},{permission:"platform:portal:publisher:createFeatureWebhook",services:["portal"],authenticated:!0,privileges:["portal:publisher:createFeatureWebhook"]},{permission:"platform:portal:publisher:publishBigDataAnalytics",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishBigDataAnalytics"]},{permission:"platform:portal:publisher:publishDynamicImagery",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishDynamicImagery"]},{permission:"platform:portal:publisher:publishFeatures",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishFeatures"]},{permission:"platform:portal:publisher:publishFeeds",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishFeeds"]},{permission:"platform:portal:publisher:publishKnowledgeGraph",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishKnowledgeGraph"]},{permission:"platform:portal:publisher:publishRealTimeAnalytics",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishRealTimeAnalytics"]},{permission:"platform:portal:publisher:publishScenes",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishScenes"]},{permission:"platform:portal:publisher:publishServerGPServices",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishServerGPServices"]},{permission:"platform:portal:publisher:publishServerServices",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishServerServices"]},{permission:"platform:portal:publisher:publishTiledImagery",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishTiledImagery"]},{permission:"platform:portal:publisher:publishTiles",services:["portal"],authenticated:!0,privileges:["portal:publisher:publishTiles"]},{permission:"platform:portal:publisher:registerDataStores",services:["portal"],authenticated:!0,privileges:["portal:publisher:registerDataStores"]},{permission:"platform:portal:user:addExternalMembersToGroup",services:["portal"],authenticated:!0,privileges:["portal:user:addExternalMembersToGroup"]},{permission:"platform:portal:user:categorizeItems",services:["portal"],authenticated:!0,privileges:["portal:user:categorizeItems"]},{permission:"platform:portal:user:createGroup",services:["portal"],authenticated:!0,privileges:["portal:user:createGroup"]},{permission:"platform:portal:user:createItem",services:["portal"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"platform:portal:user:invitePartneredCollaborationMembers",services:["portal"],authenticated:!0,privileges:["portal:user:invitePartneredCollaborationMembers"]},{permission:"platform:portal:user:joinGroup",services:["portal"],authenticated:!0,privileges:["portal:user:joinGroup"]},{permission:"platform:portal:user:joinNonOrgGroup",services:["portal"],authenticated:!0,privileges:["portal:user:joinNonOrgGroup"]},{permission:"platform:portal:user:reassignItems",services:["portal"],authenticated:!0,privileges:["portal:user:reassignItems"]},{permission:"platform:portal:user:receiveItems",services:["portal"],authenticated:!0,privileges:["portal:user:receiveItems"]},{permission:"platform:portal:user:runWebTool",services:["portal"],authenticated:!0,privileges:["portal:user:runWebTool"]},{permission:"platform:portal:user:shareGroupToOrg",services:["portal"],authenticated:!0,privileges:["portal:user:shareGroupToOrg"]},{permission:"platform:portal:user:shareGroupToPublic",services:["portal"],authenticated:!0,privileges:["portal:user:shareGroupToPublic"]},{permission:"platform:portal:user:shareToGroup",services:["portal"],authenticated:!0,privileges:["portal:user:shareToGroup"]},{permission:"platform:portal:user:shareToOrg",services:["portal"],authenticated:!0,privileges:["portal:user:shareToOrg"]},{permission:"platform:portal:user:shareToPublic",services:["portal"],authenticated:!0,privileges:["portal:user:shareToPublic"]},{permission:"platform:portal:user:viewHostedFeatureServices",services:["portal"],authenticated:!0,privileges:["portal:user:viewHostedFeatureServices"]},{permission:"platform:portal:user:viewHostedTileServices",services:["portal"],authenticated:!0,privileges:["portal:user:viewHostedTileServices"]},{permission:"platform:portal:user:viewOrgGroups",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgGroups"]},{permission:"platform:portal:user:viewOrgItems",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgItems"]},{permission:"platform:portal:user:viewOrgUsers",services:["portal"],authenticated:!0,privileges:["portal:user:viewOrgUsers"]},{permission:"platform:portal:user:viewTracks",services:["portal"],authenticated:!0,privileges:["portal:user:viewTracks"]},{permission:"platform:premium:publisher:createAdvancedNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:createAdvancedNotebooks"]},{permission:"platform:premium:publisher:createNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:createNotebooks"]},{permission:"platform:premium:publisher:geoanalytics",services:["portal"],authenticated:!0,privileges:["premium:publisher:geoanalytics"]},{permission:"platform:premium:publisher:rasteranalysis",services:["portal"],authenticated:!0,privileges:["premium:publisher:rasteranalysis"]},{permission:"platform:premium:publisher:scheduleNotebooks",services:["portal"],authenticated:!0,privileges:["premium:publisher:scheduleNotebooks"]},{permission:"platform:premium:user:demographics",services:["portal"],authenticated:!0,privileges:["premium:user:demographics"]},{permission:"platform:premium:user:elevation",services:["portal"],authenticated:!0,privileges:["premium:user:elevation"]},{permission:"platform:premium:user:featurereport",services:["portal"],authenticated:!0,privileges:["premium:user:featurereport"]},{permission:"platform:premium:user:geocode:stored",services:["portal"],authenticated:!0,privileges:["premium:user:geocode:stored"]},{permission:"platform:premium:user:geocode:temporary",services:["portal"],authenticated:!0,privileges:["premium:user:geocode:temporary"]},{permission:"platform:premium:user:geocode",services:["portal"],authenticated:!0,privileges:["premium:user:geocode"]},{permission:"platform:premium:user:geoenrichment",services:["portal"],authenticated:!0,privileges:["premium:user:geoenrichment"]}
27,{permission:"platform:premium:user:networkanalysis:closestfacility",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:closestfacility"]},{permission:"platform:premium:user:networkanalysis:locationallocation",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:locationallocation"]},{permission:"platform:premium:user:networkanalysis:optimizedrouting",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:optimizedrouting"]},{permission:"platform:premium:user:networkanalysis:origindestinationcostmatrix",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:origindestinationcostmatrix"]},{permission:"platform:premium:user:networkanalysis:routing",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:routing"]},{permission:"platform:premium:user:networkanalysis:servicearea",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:servicearea"]},{permission:"platform:premium:user:networkanalysis:vehiclerouting",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis:vehiclerouting"]},{permission:"platform:premium:user:networkanalysis",services:["portal"],authenticated:!0,privileges:["premium:user:networkanalysis"]},{permission:"platform:premium:user:places",services:["portal"],authenticated:!0,privileges:["premium:user:places"]},{permission:"platform:premium:user:spatialanalysis",services:["portal"],authenticated:!0,privileges:["premium:user:spatialanalysis"]}]},184488:(e,t,r)=>{"use strict";function n(e,t){const r=Object.assign(Object.assign({},t),e),n=Object.keys(t);return Object.keys(r).reduce(((e,t)=>(n.includes(t)||e.push(t),e)),[]).forEach((e=>{delete r[e]})),r}r.d(t,{U:()=>n})},676432:(e,t,r)=>{"use strict";r.d(t,{P:()=>C});var n=r(551753),i=r(625873);const s=[{response:"granted",code:"PC100"},{response:"org-member",code:"PC101"},{response:"not-org-member",code:"PC102"},{response:"group-member",code:"PC103"},{response:"not-group-member",code:"PC104"},{response:"not-group-admin",code:"PC105"},{response:"is-user",code:"PC106"},{response:"not-owner",code:"PC107"},{response:"not-licensed",code:"PC108"},{response:"not-licensed-available",code:"PC109"},{response:"not-available",code:"PC110"},{response:"not-granted",code:"PC111"},{response:"no-edit-access",code:"PC112"},{response:"edit-access",code:"PC113"},{response:"invalid-permission",code:"PC114"},{response:"privilege-required",code:"PC115"},{response:"service-offline",code:"PC116"},{response:"service-maintenance",code:"PC117"},{response:"entity-required",code:"PC118"},{response:"not-authenticated",code:"PC119"},{response:"not-alpha-org",code:"PC120"},{response:"property-missing",code:"PC121"},{response:"property-not-array",code:"PC122"},{response:"array-contains-invalid-value",code:"PC123"},{response:"array-missing-required-value",code:"PC124"},{response:"property-mismatch",code:"PC125"},{response:"user-not-group-member",code:"PC126"},{response:"user-not-group-manager",code:"PC127"},{response:"user-not-group-owner",code:"PC128"},{response:"assertion-property-not-found",code:"PC129"},{response:"assertion-failed",code:"PC130"},{response:"assertion-requires-numeric-values",code:"PC131"},{response:"property-match",code:"PC132"},{response:"not-beta-org",code:"PC133"},{response:"not-in-environment",code:"PC134"},{response:"feature-disabled",code:"PC135"},{response:"feature-enabled",code:"PC136"},{response:"no-policy-exists",code:"PC137"},{response:"disabled-by-entity-flag",code:"PC137"},{response:"disabled-by-feature-flag",code:"PC137"}];function o(e){const t=s.find((t=>t.response===e));return(null==t?void 0:t.code)||"PC000"}function a(e,t,r){var n;const i=[];if(null===(n=e.licenses)||void 0===n?void 0:n.length){let r="granted";e.licenses.includes(t.hubLicense)||(r="not-available","hub-premium"===e.licenses[0]&&"hub-basic"===t.hubLicense&&(r="not-licensed"));const n={name:`license in ${e.licenses.join(", ")}`,value:t.hubLicense,code:o(r),response:r};i.push(n)}return i}var c=r(419539),u=r(454640);function l(e,t,r){const n=[];if(e.hasOwnProperty("authenticated")){let r="granted";e.authenticated&&!t.isAuthenticated&&(r="not-authenticated");const i={name:"authentication",value:`required: ${e.authenticated}`,code:o(r),response:r};n.push(i)}return n}function d(e,t,r){var n;const i=[];if(e.entityOwner){let e="granted",s="entity owner required";t.isAuthenticated?r?(s=`entity owner required: ${r.owner}`,r.owner!==t.currentUser.username&&(e="not-owner")):e="entity-required":e="not-authenticated";const a={name:s,value:`current user: ${null===(n=t.currentUser)||void 0===n?void 0:n.username}`,code:o(e),response:e};i.push(a)}return i}function p(e,t,r){const i=[];if(e.hasOwnProperty("entityEdit")){let t="granted";r?e.entityEdit&&!r.canEdit?t="no-edit-access":!e.entityEdit&&r.canEdit&&(t="edit-access"):t="entity-required";const s={name:"entity edit required",value:`entity.canEdit: ${(0,n.t)(r,"canEdit",!1)}`,code:o(t),response:t};i.push(s)}return i}function h(e,t,r){const i=[];if(e.hasOwnProperty("entityDelete")){let t="granted";r?e.entityDelete&&!r.canDelete?t="no-delete-access":!e.entityDelete&&r.canDelete&&(t="delete-access"):t="entity-required";const s={name:"entity delete required",value:`entity.canDelete: ${(0,n.t)(r,"canDelete",!1)}`,code:o(t),response:t};i.push(s)}return i}function m(e,t,r){var n;let i=[];return(null===(n=e.privileges)||void 0===n?void 0:n.length)&&(i=e.privileges.map((e=>{let r="granted",n="privilege present";return t.isAuthenticated?t.currentUser.privileges.includes(e)||(r="privilege-required",n="privilege missing"):(r="not-authenticated",n="not authenticated"),{name:`privilege required: ${e}`,value:n,response:r,code:o(r)}}))),i}var f=r(76309);function g(e,t,r){let n="granted";const s={entity:t,context:r},a=b(e.property),c=(0,i.W)(s,a.path);void 0===c&&(n="assertion-property-not-found");let u=e.value;if("string"==typeof u&&u.indexOf(":")>-1){const t=b(e.value);u=(0,i.W)(s,t.path),void 0===u&&(n="assertion-property-not-found")}if(void 0!==c&&void 0!==u)switch(e.type){case"eq":case"neq":n=function(e,t,r){let n="granted";return("eq"===e.type&&t!==r||"neq"===e.type&&t===r)&&(n="assertion-failed"),n}(e,c,u);break;case"starts-with":case"ends-with":case"not-starts-with":case"not-ends-with":n=function(e,t,r){let n="granted";return"starts-with"!==e.type||t.startsWith(r)?"not-starts-with"===e.type&&t.startsWith(r)?n="assertion-failed":"ends-with"!==e.type||t.endsWith(r)?"not-ends-with"===e.type&&t.endsWith(r)&&(n="assertion-failed"):n="assertion-failed":n="assertion-failed",n}(e,c,u);break;case"contains":case"contains-some":case"without":n=function(e,t,r){let n="granted";if(Array.isArray(t)){const i=t;"contains"===e.type&&(Array.isArray(r)?r.every((e=>i.includes(e)))||(n="array-missing-required-value"):i.includes(r)||(n="array-missing-required-value")),"contains-some"===e.type&&(Array.isArray(r)?r.some((e=>i.includes(e)))||(n="array-missing-required-value"):n="assertion-requires-array-value"),"without"===e.type&&(Array.isArray(r)?r.some((e=>i.includes(e)))&&(n="array-contains-invalid-value"):i.includes(r)&&(n="array-contains-invalid-value"))}else n="property-not-array";return n}(e,c,u);break;case"included-in":n=function(e,t,r){let n="granted";return Array.isArray(r)?r.includes(t)||(n="array-missing-required-value"):n="property-not-array",n}(0,c,u);break;case"gt":case"lt":n=function(e,t,r){let n="granted";return"number"==typeof t&&"number"==typeof r||(n="assertion-requires-numeric-values"),("gt"!==e.type||t>r)&&("lt"!==e.type||t<r)||(n="assertion-failed"),n}(e,c,u);break;case"length-gt":case"length-lt":n=function(e,t,r){let n="granted";return"string"==typeof t||Array.isArray(t)?"number"!=typeof r?n="assertion-requires-numeric-values":("length-gt"!==e.type||t.length>r)&&("length-lt"!==e.type||t.length<r)||(n="assertion-failed"):n="property-has-no-length",n}(e,c,u);break;case"is-group-admin":case"is-not-group-admin":case"is-group-member":case"is-not-group-member":case"is-group-owner":case"is-not-group-owner":n=function(e,t,r,n){let i="granted";const s=n.currentUser.groups||[];let o=(0,f.e)("id",s),a="user-not-group-member";return"is-group-member"===e.type&&(a="user-not-group-member",o=y(s,["admin","owner","member"])),"is-not-group-member"===e.type&&(a="user-is-group-member",o=y(s,["admin","owner","member"])),"is-group-admin"===e.type&&(a="user-not-group-manager",o=y(s,["admin","owner"])),"is-not-group-admin"===e.type&&(a="user-is-group-manager",o=y(s,["admin","owner"])),"is-group-owner"===e.type&&(a="user-not-group-owner",o=y(s,["owner"])),"is-not-group-owner"===e.type&&(a="user-is-group-owner",o=y(s,["owner"])),(e.type.includes("not")?o.includes(r):!o.includes(r))&&(i=a),i}(e,0,u,r)}return{name:`assertion: ${e.property} ${e.type} ${e.value}`,value:c,code:o(n),response:n}}function y(e,t){return e.reduce(((e,r)=>
27(t.includes(r.userMembership.memberType)&&e.push(r.id),e)),[])}function b(e){let t="entity",r=`entity.${e}`;return e.indexOf(":")>-1&&(t=e.split(":")[0],r=`${t}.${e.split(":")[1]}`),{root:t,path:r}}function v(e,t,r){let n=[];return e.assertions&&(n=e.assertions.reduce(((e,n)=>{var i;let s=!0;if((null===(i=n.conditions)||void 0===i?void 0:i.length)&&(s=n.conditions.every((e=>"granted"===g(e,r,t).response))),s){const i=g(n,r,t);e=[...e,i]}return e}),[])),n}function w(e,t,r){var n;let i=[];return(null===(n=e.dependencies)||void 0===n?void 0:n.length)&&(i=e.dependencies.reduce(((e,n)=>{const i=C(n,t,r);return[...e,...i.checks]}),[])),i}function S(e,t,r){const n=[];if(e.environments&&e.environments.length){let r="granted";e.environments.includes(t.environment)||(r="not-in-environment");const i={name:`user in ${e.environments.join(",")} org`,value:t.environment,code:o(r),response:r};n.push(i)}return n}function E(e,t,r){let n=[];if(e.availability&&e.availability.length){const r=[];t.isAlphaOrg&&r.push("alpha"),t.isBetaOrg&&r.push("beta"),r.length||r.push("general"),n=e.availability.reduce(((e,t)=>{let n="granted";r.includes(t)||(n="flag"===t?"feature-flag-required":`not-${t}-org`);let i=`user in ${t} org`;"flag"===t&&(i="with feature flag");const s={name:i,value:r.join(", "),code:o(n),response:n};return e.push(s),e}),[])}return n}function T(e,t,r){let n=[];if(e.services){const r=t.serviceStatus;n=e.services.map((e=>{let t="granted";return"online"!==r[e]&&(t=`service-${r[e]}`),{name:`service ${e} online`,value:`service is ${r[e]}`,code:o(t),response:t}}))}return n}var I=r(656252);function C(e,t,r){var s;const f="string"==typeof(null==r?void 0:r.label)?r.label:"",g="object"==typeof r&&null!==r&&"entity"in r?r.entity:r;if(!(0,u.m)(e)){const t={policy:e,access:!1,response:"invalid-permission",code:o("invalid-permission"),checks:[]};return A(t,f),t}const y=(0,c.H)(e);if(!y){const t={policy:e,access:!1,response:"no-policy-exists",code:o("no-policy-exists"),checks:[]};return A(t,f),t}const b={hasFlag:!1,value:!1,type:"none"};if(y.entityConfigurable&&(null==g?void 0:g.features)&&"object"==typeof g.features&&null!==g.features&&Object.prototype.hasOwnProperty.call(g.features,e)&&(b.hasFlag=!0,b.value=g.features[e],b.type="entity"),t.featureFlags&&Object.prototype.hasOwnProperty.call(t.featureFlags,e)&&(b.hasFlag=!0,b.value=t.featureFlags[e],b.type="uri-flag"),null===(s=t.userHubSettings)||void 0===s?void 0:s.features){const r=(0,n.t)(t,"userHubSettings.features",{});Object.keys(r).forEach((t=>{e===`hub:feature:${t}`&&(b.hasFlag=!0,b.value=(0,i.W)(r,t),b.type="feature")}))}if(b.hasFlag&&!b.value){const t=`disabled-by-${b.type}-flag`,r={policy:e,access:!1,response:t,code:o(t),checks:[{response:t,code:o(t),name:`Feature Flag: ${e}`}]};return A(r,f),r}const I=[T,l,m,d,p,h,a,v],C=[E,S];let O=[];O=b.hasFlag&&b.value?"feature"===b.type?[...I]:[w,...I]:[...C,w,...I];const _=O.reduce(((e,r)=>[...e,...r(y,t,g)]),[]),D={policy:e,access:!0,response:"granted",code:o("granted"),checks:[]};if(_.forEach((e=>{"granted"!==e.response&&"granted"===D.response&&(D.response=e.response,D.code=e.code,D.access=!1)})),D.checks=_,g){const r=(0,n.t)(g,"permissions",[]).filter((t=>t.permission===e)).map((e=>function(e,t){const r=t.currentUser||{groups:[]},n=r.groups||[];let s="not-granted";const a=e.collaborationType,c=e.collaborationId;if("user"===a&&(s=c===r.username?"granted":"not-granted"),"org"===a&&(s=c===r.orgId?"granted":"not-org-member"),"group"===a&&(s=n.find((e=>e.id===c))?"granted":"not-group-member"),"group-admin"===a){const e=n.find((e=>e.id===c)),t=(0,i.W)(e,"userMembership.memberType");s=["admin","owner"].includes(t)?"granted":"not-group-admin"}return"authenticated"===a&&(s=t.isAuthenticated?"granted":"not-authenticated"),"anonymous"===a&&(s="granted"),{name:"entity:policy",value:`${e.collaborationType}:${e.collaborationId}`,response:s,code:o(s)}}(e,t))),s=r.find((e=>"granted"===e.response));r.length&&!s&&"granted"===D.response&&(D.access=!1,D.response="not-granted"),D.checks=[...D.checks,...r]}return A(D,f),D}function A(e,t){e.access||I.Y.warn(`checkPermission: ${t} ${e.policy} : ${e.response}`,e)}},199054:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HubPermissionsPolicies:()=>n.G,addPermissionPolicy:()=>s.a,checkPermission:()=>i.P,getPermissionPolicy:()=>n.H,removePermissionPolicy:()=>s.T});var n=r(419539),i=r(676432),s=r(252934),o=r(280276),a={};for(const e in o)["default","HubPermissionsPolicies","getPermissionPolicy","checkPermission","addPermissionPolicy","removePermissionPolicy"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a)},543114:()=>{},485358:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});const n={user:"user",group:"group",groupAdmin:"group-admin",org:"org",orgAdmin:"org-admin",authenticated:"authenticated",anonymous:"anonymous",owner:"owner"}},805763:()=>{},716722:()=>{},565984:()=>{},454640:(e,t,r)=>{"use strict";r.d(t,{m:()=>b});var n=r(51557),i=r(281488),s=r(444018),o=r(945068),a=r(840724),c=r(52765),u=r(143554),l=r(849870),d=r(918648),p=r(325572),h=r(249960),m=r(491928),f=r(567031),g=r(113426);const y=[...i.pK,...n.Cl,...s.CB,...c.CB,...u.q,...l.Nd,...d.x,...o.p,...p.k$,...h.Iy,"hub:feature:ai-assistant","hub
27:feature:privacy","hub:feature:workspace","hub:feature:user:preferences","hub:card:follow","hub:feature:workspace:user","hub:feature:workspace:org","hub:feature:keyboardshortcuts","hub:feature:newentityview","hub:feature:history","hub:feature:catalogs","hub:feature:catalogs:edit:advanced","hub:feature:inline-workspace","hub:feature:pagescatalog","hub:license:hub-premium","hub:license:hub-basic","hub:license:enterprise-sites","hub:availability:alpha","hub:availability:beta","hub:availability:general","hub:environment:qaext","hub:environment:devext","hub:environment:production","hub:environment:enterprise",...m.p,...f.g,...g.G,...a.$G];function b(e){return y.includes(e)}},902391:()=>{},508294:()=>{},280276:(e,t,r)=>{"use strict";r.r(t),r.d(t,{COLLABORATION_TYPES:()=>o.C,isPermission:()=>u.m});var n=r(543114),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(805763);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(485358),a=r(716722);i={};for(const e in a)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>a[e]);r.d(t,i);var c=r(565984);i={};for(const e in c)["default","COLLABORATION_TYPES"].indexOf(e)<0&&(i[e]=()=>c[e]);r.d(t,i);var u=r(454640),l=r(902391);i={};for(const e in l)["default","COLLABORATION_TYPES","isPermission"].indexOf(e)<0&&(i[e]=()=>l[e]);r.d(t,i);var d=r(508294);i={};for(const e in d)["default","COLLABORATION_TYPES","isPermission"].indexOf(e)<0&&(i[e]=()=>d[e]);r.d(t,i)},252934:(e,t,r)=>{"use strict";r.d(t,{T:()=>s,a:()=>i});var n=r(329644);function i(e=[],t){const r=s(e,t.permission,t.collaborationId);return r.push(t),r}function s(e=[],t,r){return(0,n.kI)(e).filter((e=>e.permission!==t||e.collaborationId!==r))}},254471:(e,t,r)=>{"use strict";r.d(t,{M:()=>w});var n=r(563671),i=r(61285),s=r(656110),o=r(934647),a=r(3406),c=r(503319),u=r(832219),l=r(594494),d=r(329644),p=r(848880),h=r(50950),m=r(551753),f=r(170130),g=r(753244),y=r(99522),b=r(739519),v=r(144219);class w extends s.x{constructor(e,t){super(e,t),this._catalog=i.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new w(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=w.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.GG)(e,t.requestOptions);return w.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Project not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},n.O7),e)}convertToCardModel(e){return(0,l.S)(this.entity,this.context,e)}async getEditorConfig(e,t){return(0,o.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,h.t)((0,d.kI)(this.entity),t,this.context.hubRequestOptions):(0,d.kI)(this.entity);r._groups=[];const n=(0,c.E)(this.entity).find((t=>t.id===e.metricId)),i=(0,m.t)(this.entity,"view.metricDisplays",[]).find((t=>t.metricId===e.metricId))||{};return r._metric=(0,f.h)(n,i),r._slug=(0,v.y)(this.entity),r}async fromEditor(e,t){const r=e._thumbnail,n=e.view.featuredImage,i=e._groups||[],s=(0,p.FH)(e,this.context.portal);if(r&&(r.blob?this.thumbnailCache={file:r.blob,filename:r.fileName,clear:!1}:this.thumbnailCache={clear:!0}),n){let e=null;n.blob?e=await(0,g.E)(s.id,s.owner,n.blob,"featuredImage.png",this.context.userRequestOptions):await(0,y.o)(s.id,"featuredImage.png",this.context.userRequestOptions)&&await(0,b.q)(s.id,"featuredImage.png",s.owner,this.context.userRequestOptions),s.view=Object.assign(Object.assign({},s.view),{featuredImageUrl:e})}return this.entity=s,await this.save(),!e.id&&(await this.setAccess(e.access),i.length&&await Promise.all(i.map((e=>this.shareWithGroup(e))))),this.entity}update(e){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=i.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,p.ty)(this.entity,this.context.userRequestOptions):this.entity=await(0,p.$L)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubProject is already destroyed.");this.isDestroyed=!0;const{deleteProject:e}=await Promise.resolve().then(r.bind(r,848880));await e(this.entity.id,this.context.userRequestOptions)}resolveMetric(e){const t=(0,c.E)(this.entity).find((t=>t.id===e));if(t)return(0,u.q)(t,this.context);throw new Error(`Metric ${e} not found.`)}}},51557:(e,t,r)=>{"use strict";r.d(t,{Cl:()=>i,cE:()=>s,g2:()=>n});const n={"hub:project:events":!1,"hub:project:content":!0,"hub:project:discussions":!1}
27,i=["hub:project","hub:project:create","hub:project:delete","hub:project:edit","hub:project:view","hub:project:owner","hub:project:canChangeAccess","hub:project:events","hub:project:content","hub:project:discussions","hub:project:associations","hub:project:workspace","hub:project:workspace:overview","hub:project:workspace:dashboard","hub:project:workspace:details","hub:project:workspace:initiatives","hub:project:workspace:settings","hub:project:workspace:collaborators","hub:project:workspace:events","hub:project:workspace:metrics","hub:project:workspace:catalog","hub:project:workspace:catalog:content","hub:project:workspace:catalog:events","hub:project:manage"],s=[{permission:"hub:project",services:["portal"],licenses:["hub-premium"]},{permission:"hub:project:create",authenticated:!0,dependencies:["hub:project"],privileges:["portal:user:createItem"]},{permission:"hub:project:view",services:["portal"]},{permission:"hub:project:edit",services:["portal"],authenticated:!0,entityEdit:!0,licenses:["hub-premium","hub-basic"]},{permission:"hub:project:delete",dependencies:["hub:project"],authenticated:!0,entityDelete:!0},{permission:"hub:project:owner",dependencies:["hub:project"],authenticated:!0,entityOwner:!0},{permission:"hub:project:canChangeAccess",dependencies:["hub:project"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:project:events",dependencies:["hub:project:view"],entityConfigurable:!0},{permission:"hub:project:content",dependencies:["hub:project:edit"]},{permission:"hub:project:discussions",dependencies:["hub:project:view"]},{permission:"hub:project:associations",dependencies:["hub:project:view"]},{permission:"hub:project:workspace"},{permission:"hub:project:workspace:overview",dependencies:["hub:project:workspace","hub:project:view"]},{permission:"hub:project:workspace:dashboard",dependencies:["hub:project:workspace","hub:project:view"]},{permission:"hub:project:workspace:details",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:initiatives",dependencies:["hub:project:workspace","hub:project:associations","hub:project:edit"]},{permission:"hub:project:workspace:settings",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:collaborators",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:metrics",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:catalog",dependencies:["hub:project:workspace","hub:project:edit"]},{permission:"hub:project:workspace:catalog:content",dependencies:["hub:project:workspace:catalog"]},{permission:"hub:project:workspace:catalog:events",dependencies:["hub:project:workspace:catalog","hub:event","hub:feature:catalogs:edit:advanced"]},{permission:"hub:project:manage",dependencies:["hub:project:edit"]}]},306560:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,ProjectSchema:()=>c});var n=r(255861),i=r(565305),s=r(434164),o=r(88036);const a=["hub:project:create","hub:project:create2","hub:project:edit","hub:project:metrics","hub:project:settings"],c=Object.assign(Object.assign({},s.N),{properties:Object.assign(Object.assign({},s.N.properties),{_groups:{type:"array",items:{type:"string"}},status:{type:"string",default:o.Mz.notStarted,enum:Object.keys(o.Mz)},_metric:{type:"object",required:["cardTitle"],properties:n.MetricSchema.properties}}),allOf:[i.dM,i.No,i.eS,i.Jw]})},48589:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(389094);function i(e,t){return(0,n.g)(e,t)}},80532:(e,t,r)=>{"use strict";r.d(t,{F:()=>u});var n=r(902815),i=r(184488),s=r(51557),o=r(48589),a=r(578506),c=r(721347);function u(e,t,r){var u,l;let d;return r.authentication&&(d=r.authentication.token),(t=(0,a.k)(e.item,t)).thumbnailUrl=(0,n.S)(e.item,r,d),t.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:null===(u=e.data.view)||void 0===u?void 0:u.featuredImageUrl}
27),t.catalog=(0,c.c)(t.catalog||{}),t.features=(0,i.U)((null===(l=e.data.settings)||void 0===l?void 0:l.features)||{},s.g2),t.links=(0,o.E)(e.item,r),t}},279149:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e}},563671:(e,t,r)=>{"use strict";r.d(t,{O7:()=>o,rd:()=>a});var n=r(444018),i=r(88036);const s="Hub Project",o={catalog:{schemaVersion:0},name:"",permissions:[],schemaVersion:1,status:i.Mz.notStarted,tags:[],typeKeywords:[s],view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]},features:n.TV},a={item:{type:s,title:"",description:"",snippet:"",tags:[],typeKeywords:[s],properties:{slug:"",schemaVersion:1}},data:{display:"about",permissions:[],catalog:{schemaVersion:0},status:i.Mz.notStarted,view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]}}}},848880:(e,t,r)=>{"use strict";r.d(t,{$L:()=>y,FH:()=>b,deleteProject:()=>w,ty:()=>v});var n=r(404091),i=r(8238),s=r(170209),o=r(178749),a=r(563671),c=r(80532),u=r(279149),l=r(329644),d=r(85738),p=r(861588),h=r(991550),m=r(750713),f=r(923018),g=r(741619);async function y(e,t){const r=Object.assign(Object.assign({},a.O7),e);r.slug||(r.slug=(0,i.fU)(r.name,r.orgUrlKey)),await(0,f.E)(r,t),r.typeKeywords=(0,p.o)(r.typeKeywords,r.status),r.typeKeywords=(0,d.Wb)(r.typeKeywords,r.isDiscussable);const s=new o.c7((0,u.s)());let h=s.entityToStore(r,(0,l.kI)(a.rd));h=await(0,n.NY)(h,t);let m=s.storeToEntity(h,{});return m=(0,c.F)(h,m,t),m}function b(e,t){var r;const n=e._metric;delete e._groups,delete e._thumbnail,null===(r=e.view)||void 0===r||delete r.featuredImage,delete e._metric,delete e._groups;let i=(0,g.i)(e,t);if(n&&Object.keys(n).length){const e=n.metricId||(0,l.Mc)((0,l._A)(`${n.cardTitle}_`)),{metric:t,displayConfig:r}=(0,h.A)(n,e,{metricName:n.cardTitle});i=(0,m.I)(i,t,r)}return i}async function v(e,t){await(0,f.E)(e,t),e.typeKeywords=(0,p.o)(e.typeKeywords,e.status),e.typeKeywords=(0,d.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,n.PD)(e.id,t),i=new o.c7((0,u.s)()),s=i.entityToStore(e,r),a=await(0,n.QB)(s,t);let l=i.storeToEntity(a,e);return l=(0,c.F)(r,l,t),l}async function w(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,s.cl)(r)}},3406:(e,t,r)=>{"use strict";r.d(t,{D6:()=>w,GG:()=>b,j3:()=>v});var n=r(170209),i=r(610924),s=r(178749),o=r(8238),a=r(815985),c=r(404091),u=r(295426),l=r(869787),d=r(76309),p=r(80532),h=r(279149),m=r(329644),f=r(625873),g=r(48589),y=r(653609);async function b(e,t){let r;return r=(0,l.k)(e)?(0,n.rV)(e,t):(0,o.QR)(e,t),r.then((e=>e?v(e,t):null))}async function v(e,t){const r=await(0,c.UO)(e,t),n=new s.c7((0,h.s)()).storeToEntity(r,{});return(0,p.F)(r,n,t)}async function w(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,y.jA)(e),rawResult:e},s=(t=[...t].filter(m.Tw)).map(u.u),o=(0,d.e)("enrichment",s).filter(m.Tw);let c={};
27return o.length&&(c=await(0,a.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,f.W)(c,e.path)})),n.links=(0,g.E)(e,r),n}},512428:(e,t,r)=>{"use strict";r.d(t,{$L:()=>i.$L,D6:()=>s.D6,FH:()=>i.FH,GG:()=>s.GG,M6:()=>n.M,MP:()=>o.M,So:()=>o.S,j3:()=>s.j3,th:()=>i.deleteProject,ty:()=>i.ty});var n=r(254471),i=r(848880),s=r(3406),o=r(594494)},594494:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,S:()=>o});var n=r(610924),i=r(653609),s=r(60844);const o=(e,t,r)=>{const{actionLinks:n=[],baseUrl:i="",locale:o="en-US",target:a="self"}=r||{},u=(0,s.m)(e,t,a,i);return Object.assign(Object.assign(Object.assign({},c(e,o)),{actionLinks:n,titleUrl:u}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},a=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:i="en-US",target:o="self"}=t||{},a=(0,s.D)(e,o,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(e,i)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},c=(e,t)=>{var r,s;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(s=e.categories)||void 0===s?void 0:s.length)?[{i18nKey:"categories",value:(0,i.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,n._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}}},636137:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,m:()=>s});var n=r(67869),i=r(260495);class s extends Error{constructor(e,t,r){super(e),this.status=r,this.url=t}}function o(e,t){const r=Object.assign({httpMethod:"GET"},t),o=r.fetch||fetch,a=Object.assign({"Content-Type":"application/json"},r.headers);let c,u;"GET"===r.httpMethod?c=r.params:u=JSON.stringify(r.params);const l=(0,i.Q)({host:(0,n.g)(r),path:`/api/v3/${e}`.replace(/\/\//g,"/"),query:c});return o(l,{method:r.httpMethod,headers:a,body:u}).then((e=>{if(e.ok)return e.json();throw new s(e.statusText,l,e.status)}))}},274052:(e,t,r)=>{"use strict";function n(e,t){let r=e;return-1===e.indexOf("token")&&e.indexOf(t.authentication.portal)>-1&&(r=`${e}?token=${t.authentication.token}`),r}r.d(t,{o:()=>n})},194479:(e,t,r)=>{"use strict";r.d(t,{l:()=>i});var n=r(16933);function i(e,t){let r=e.assets||e.resources||[];if(e.bundleItemId){const i=`${(0,n.i)(t.portalSelf)}/content/items/${e.bundleItemId}`,s=e.itemId;r=r.map((e=>({name:e.name,type:e.type||"resource",url:`${i}/resources/${s}-${e.name}`})))}return r}},99522:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(170209);async function i(e,t,r){return(0,n.C)(e,r).then((e=>!!e.resources.find((e=>e.resource===t))))}},592779:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(170209),i=r(255146);function s(e){return(0,i.o)(e.url).then((t=>(0,n.zJ)({id:e.id,owner:e.owner,name:e.fileName,resource:t,authentication:e.authentication})))}},68410:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var n=r(255146),i=r(966499);function s(e){return(0,n.o)(e.url).then((t=>(0,i.$G)({item:{id:e.id,owner:e.owner},params:{fileName:e.fileName,thumbnail:t},authentication:e.authentication}).catch((e=>Promise.resolve())))).catch((e=>Promise.resolve()))}},255146:(e,t,r)=>{"use strict";function n(e,t={}){return t.credentials||(t.credentials="same-origin"),fetch(e,t).then((e=>e.blob()))}r.d(t,{o:()=>n})},517815:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(16933),i=r(902815),s=r(170209);function o(e,t){const r=`${(0,n.i)(t.portalSelf)}/content/items/${e.id}`,o=(0,i.S)(e,t),a=[];return o&&a.push({name:e.thumbnail,url:o,type:"thumbnail"}),(0,s.C)(e.id,t).then((e=>{const t=e.resources.map((e=>({name:e.resource,type:"resource",url:`${r}/resources/${e.resource}`})));return a.concat(t)}))}},902815:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(825190);function i(e,t,r){if(!e||!e.thumbnail)return null;let{token:i,width:s}=r||{};i||"string"!=typeof r||(i=r);const o=(0,n.p)(e,t,i),[a,c]=o.split("?"),u=new URLSearchParams(c);u.delete("f"),s&&u.append("w",s+"");const l=u.toString(),d=`${a}/info/${e.thumbnail}`;return l?`${d}?${l}`:d}},417503:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(163044);function i(e,t){let r=null;return(null==e?void 0:e.thumbnail)&&(r=`${(0,n.a)(e)}/sharing/rest/portals/${e.id}/resources/${e.thumbnail}`,t&&"public"!==e.access&&(r=`${r}?token=${t}`)),r}},410492:(e,t,r)=>{"use strict";r.d(t,{oA:()=>n.o,lK:()=>m.l,lD:()=>s,of:()=>A.o,gE:()=>o.g,dT:()=>a.d,oX:()=>c.o,tF:()=>u.t,Sg:()=>l.S,SF:()=>d.S,cs:()=>E.c,OA:()=>f.O,ql:()=>C.q,IS:()=>p.I,xO:()=>h.x,Ej:()=>I.E,mQ:()=>T});var n=r(274052),i=r(16933);function s(e,t){let r=[];if(e.resources&&e.bundleItemId){const n=`${(0,i.i)(t.portalSelf)}/content/items/${e.bundleItemId}`,s=e.itemId;r=e.resources.map((e=>({name:e,type:"resource",url:`${n}/resources/${s}-${e}`})))}return r}var o=r(592779),a=r(68410),c=r(255146),u=r(517815),l=r(902815),d=r(417503),p=r(702832),h=r(130939),m=r(194479),f=r(646979),g=r(88036),y=r(656252);const b=/(feature)server(\/|\/(\d+))?$/i;function v(e){let t;
27try{const r=new URL(e);t="/"!==r.pathname?r.pathname.split("/").pop():r.hostname}catch(e){throw new Error("Error getting file name from data url")}return t}function w(e,t){return{title:t.name,description:t.description,extent:t.extent,url:e}}function S(e,t){const r=t.serviceDescription||t.description,n=function(e){return e.match(/\/services\/(.+)\/(feature|map|image)server/i)[1]}(e);return{title:n,description:r,extent:t.fullExtent||t.initialExtent,url:e}}var E=r(888213);async function T(e){if(!function(e){try{return!!new URL(e)}catch(e){return y.Y.error("Error parsing URL"),!1}}(e))return{pass:!1,error:"invalidFormat"};const t=function(e){return b.test(e)}(e);if((0,E.c)(e)&&!t)return{pass:!1,error:"invalidFormat"};let r,n,i={};try{if(i=t?await async function(e){const t=new URL(e);t.searchParams.set("f","json");const r=await fetch(t.href);if(!r.ok)return{ok:!1};const n=await r.json();if(n.error)return{ok:!1};const i=function(e){const t=e.match(b);return t&&!!t[3]}(e)?w:S;return{ok:!0,item:i(e,n)}}(e):await async function(e){const t=await fetch(e,{method:"HEAD"});return{ok:t.ok,headers:t.headers}}(e),!i.ok)return{pass:!1,error:"invalidUrl"}}catch(e){y.Y.error("error requesting url")}var s;return n=i.item?i.item:{title:v(e),url:e},i.headers&&(r=function(e){let t,r=e.get("Content-Type");if(r)return r=r.split(";").shift(),
28"text/csv"===r?t=g.qG.CSV:"application/vnd.ms-excel"===r||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===r?t=g.qG["Microsoft Excel"]:"application/pdf"===r?t=g.qG.PDF:"image/jpeg"===r||"image/jpg"===r||"image/png"===r?t=g.qG.Image:"application/geo+json"===r&&(t=g.qG.GeoJson),t}(i.headers)),t?r=g.qG["Feature Service"]:r||(r=function(e){const t=e.toLowerCase().split(".").pop();let r;return"csv"===t?r=g.qG.CSV:"xls"===t||"xlsx"===t?r=g.qG["Microsoft Excel"]:"pdf"===t?r=g.qG.PDF:"jpeg"===t||"jpg"===t||"png"===t?r=g.qG.Image:"geojson"===t&&(r=g.qG.GeoJson),r}(e)),r&&(n.type=r),n.type&&(s=n.type,!["Feature Service","Document Link"].includes(s))&&(n.dataUrl=n.url),{pass:!0,type:r,item:n}}var I=r(753244),C=r(739519),A=r(99522)},888213:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});const n=/\/[a-zA-Z]+server(\/|\/(\d+))?$/i;function i(e){return n.test(e)}},646979:(e,t,r)=>{"use strict";function n(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}r.d(t,{O:()=>n})},739519:(e,t,r)=>{"use strict";r.d(t,{q:()=>s});var n=r(170209),i=r(826899);async function s(e,t,r,s){try{const o=await(0,n.ug)(Object.assign({id:e,resource:t,owner:r},s));if(!o.success)throw new i.Z("Remove Item Resource","Unknown error removing resource.");return o}catch(e){throw e instanceof Error?new i.Z("Remove Item Resource",e.message,e):new i.Z("Remove Item Resource","Unknown error removing resource.")}}},702832:(e,t,r)=>{"use strict";function n(e,t="application/octet-stream"){if("undefined"!=typeof Blob){const r=[];for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);const n=new Uint8Array(r);return new Blob([n],{type:t})}throw new Error("stringToBlob is not currently supported on Node")}r.d(t,{I:()=>n})},130939:(e,t,r)=>{"use strict";r.d(t,{x:()=>o});var n=r(592779),i=r(68410),s=r(274052);function o(e,t,r){if(Array.isArray(t)){const o=t.reduce(((t,o)=>{if(o.url){const a={id:e.item.id,owner:e.item.owner,fileName:o.name,url:(0,s.o)(o.url,r),authentication:r.authentication};"thumbnail"===o.type?t.push((0,i.d)(a)):t.push((0,n.g)(a))}return t}),[]);return Promise.all(o)}return Promise.resolve([])}},753244:(e,t,r)=>{"use strict";r.d(t,{E:()=>u});var n=r(170209),i=r(826899),s=r(99522),o=r(646979),a=r(702832),c=r(16933);async function u(e,t,r,u,l,d=""){try{const p=u.split(".").pop(),h=await(0,s.o)(e,u,l)?n.zy:n.zJ;let m=r;if("json"===p&&(m=(0,o.O)(r)),"txt"===p&&(m=(0,a.I)(r)),!(await h(Object.assign({id:e,owner:t,resource:m,name:u,prefix:d},l))).success)throw new i.Z("Add Item Resource",`Error adding resource ${u} to item ${e}.`);return`${(0,c.i)(l.portal)}/content/items/${e}/resources/${d?`${d}/`:""}${u}`}catch(t){throw t instanceof Error?new i.Z("Add Item Resource",t.message,t):new i.Z("Add Item Resource",`Error adding resource ${u} to item ${e}.`)}}},526639:(e,t,r)=>{"use strict";r.d(t,{$G:()=>n.$G,fC:()=>n.fC,wd:()=>n.wd});var n=r(966499)}
28,966499:(e,t,r)=>{"use strict";r.d(t,{wd:()=>a,fC:()=>s,$G:()=>o});var n=r(170209);function i(e){return e.params=Object.assign(Object.assign({},e.params),function(e){const 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}(e.item)),e}function s(...e){return(0,n.fC)(i(e[0]))}function o(...e){return(0,n.$G)(i(e[0]))}function a(...e){return(0,n.wd)(i(e[0]))}},61285:(e,t,r)=>{"use strict";r.d(t,{g:()=>S});var n=r(439862),i=r(563292),s=r(826899),o=r(329644),a=r(76309),c=r(170209),u=r(98866),l=r(625873),d=r(615555),p=r(408923),h=r(869787),m=r(769418),f=r(380459),g=r(364282),y=r(710755),b=r(958623),v=r(583872),w=r(721347);class S{constructor(e,t){this._containsCache={},this._catalog=e,this._context=t}static async init(e,t,r){t||(t=(await n.SF.create()).context);const i=await async function(e,t,r){let n;if(0===e.indexOf("http")){let i=e;i=(0,p.G)(i),i.includes("#")||(i=i.split("/")[0]);const s=await(0,f.F)(i,t.hubRequestOptions),o=await(0,d.IN)(s.siteId,t.hubRequestOptions);n=(0,l.W)(o,(null==r?void 0:r.prop)||"catalog")}else if((0,h.k)(e)){let i;if(null==r?void 0:r.hubEntityType)i=r.hubEntityType;else{const r=await(0,c.rV)(e,t.requestOptions);i=(0,g.T)(r.type)}const s=await(0,y.z)(i,e,t);n=(0,l.W)(s,(null==r?void 0:r.prop)||"catalog")}else{if(!(0,m.l)(e))throw new s.Z("Catalog.init","Identifier must be a url, item or event id");{const i=await(0,u.d)(e,t.hubRequestOptions);n=(0,l.W)(i,(null==r?void 0:r.prop)||"catalog")}}return n}(e,t,r);if(i)return new S(i,t);throw new s.Z("Catalog.fetch","No catalog found for the entity")}static fromJson(e,t){const r=(0,w.c)(e);return new S(r,t)}toJson(){return(0,o.kI)(this._catalog)}get schemaVersion(){return this._catalog.schemaVersion}get title(){return this._catalog.title}set title(e){this._catalog.title=e}get scopes(){return this._catalog.scopes||{}}get availableScopes(){return Object.keys(this.scopes)}get displayConfig(){return this._catalog.displayConfig}getScope(e){var t;return null===(t=this._catalog.scopes)||void 0===t?void 0:t[e]}setScope(e,t){this._catalog.scopes[e]=t}get collections(){return this._catalog.collections||[]}get collectionNames(){return(0,a.e)("key",this.collections)}getCollection(e){const t=this.getCollectionJson(e);return b.F.fromJson(t,this._context)}addCollection(e){var t;(null===(t=this._catalog.collections)||void 0===t?void 0:t.length)?this._catalog.collections.push(e):this._catalog.collections=[e]}getCollectionJson(e){const t=this.collections.find((t=>t.key===e));if(t){const e=(0,o.kI)(t),r=this.getScope(e.scope.targetEntity);return(null==r?void 0:r.filters)&&(e.scope.filters=[...e.scope.filters||[],...r.filters]),e}throw new s.Z("getCollectionJson",`Collection "${e}" is not present in the Catalog`)}getCustomCollection(e,t){const r=this.getCustomCollectionJson(e,t);return b.F.fromJson(r,this._context)}getCustomCollectionJson(e,t){const r=this.getScope(e);return{key:`${e}-custom`,label:`${e} Custom`,targetEntity:e,scope:{targetEntity:e,filters:[...(null==r?void 0:r.filters)||[],...t]}}}async searchItems(e,t){if(t||(t=this.getDefaultSearchOptions("item")),this.getScope("item"))return t.targetEntity="item",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for items",data:{scope:"item"}}],Promise.resolve(e)}}async contains(e,t){const r=Date.now();if(this._containsCache[e]){const t=(0,o.kI)(this._containsCache[e]);return t.duration=Date.now()-r,Promise.resolve(t)}{const n=await(0,i.r)(e,this._catalog,this._context,t);return this._containsCache[e]=n,n.duration=Date.now()-r,n}}async searchGroups(e,t){if(t||(t=this.getDefaultSearchOptions("group")),this.get
28Scope("group"))return t.targetEntity="group",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for groups",data:{scope:"group"}}],Promise.resolve(e)}}async searchUsers(e,t={}){if(this.getScope("user"))return t.targetEntity="user",this.search(e,t);{const e=this.getEmptyResult();return e.messages=[{code:"missingScope",message:"Catalog does not have a scope for user",data:{scope:"user"}}],Promise.resolve(e)}}async searchCollections(e,t={}){let r,n=!0;"string"==typeof e?(n=!1,r={targetEntity:"item",filters:[{predicates:[{term:e}]}]}):r=e;const i=[],s=this.collectionNames.reduce(((e,s)=>{const o=this.getCollection(s);return n?o.targetEntity===r.targetEntity&&(i.push(s),e.push(o.search(r,t))):(i.push(s),r.targetEntity=o.targetEntity,e.push(o.search(r,t))),e}),[]),o=await Promise.all(s),a={};for(let e=0;e<i.length;e++)a[i[e]]=o[e];return a}async searchScopes(e,t={},r){let n;n="string"==typeof e?{targetEntity:"item",filters:[{predicates:[{term:e}]}]}:e;const i=[],s=this.availableScopes.reduce(((e,s)=>{if(!r||r.includes(s)){i.push(s);const r=(0,o.kI)(n),a=(0,o.kI)(t);r.targetEntity=s,a.targetEntity=s,e.push(this.search(r,a))}return e}),[]),a=await Promise.all(s),c={};for(let e=0;e<i.length;e++)c[i[e]]=a[e];return c}async search(e,t){let r,n=t.targetEntity;"string"==typeof e?r={targetEntity:n,filters:[{predicates:[{term:e}]}]}:(n=e.targetEntity,r=(0,o.kI)(e));const i=this.getScope(n);i&&(r.filters=[...r.filters,...i.filters]);const s=(0,o.kI)(t);return delete s.authentication,s.requestOptions=this._context.hubRequestOptions,(0,v.B)(r,s)}getEmptyResult(){return{results:[],total:0,hasNext:!1,next:null}}getDefaultSearchOptions(e){return{targetEntity:e,num:10,start:1,requestOptions:this._context.hubRequestOptions}}}},958623:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(583872),i=r(329644);class s{constructor(e,t){this._collection=e,this._context=t}static fromJson(e,t){return new s(e,t)}toJson(){return(0,i.kI)(this._collection)}get label(){return this._collection.label}get key(){return this._collection.key}get include(){return this._collection.include||[]}get scope(){return this._collection.scope}get sortField(){return this._collection.sortField||"title"}get sortDirection(){return this._collection.sortDirection||"asc"}get targetEntity(){return this._collection.targetEntity}async search(e,t={}){let r;r="string"==typeof e?{targetEntity:this._collection.targetEntity,filters:[{predicates:[{term:e}]}]}:(0,i.kI)(e),r.filters=[...r.filters,...this.scope.filters];const s=(0,i.kI)(t);return s.requestOptions=this._context.hubRequestOptions,s.sortField=t.sortField||this.sortField,s.sortOrder=t.sortOrder||this.sortDirection,s.include=t.include||this.include,(0,n.B)(r,s)}}},736261:(e,t,r)=>{"use strict";function n(e,t,r,n,i,s){return{schemaVersion:1,title:s||`{{${e}catalog.${t}:translate}}`,scopes:{[i]:{targetEntity:i,filters:r}},collections:n}}r.d(t,{Y:()=>n})},482072:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(348753),i=r(329644);function s(e,t,r,s){const o=(0,i.kI)(e);return e.authentication&&(o.authentication=n.$l.deserialize(e.authentication.serialize())),o.start=t>-1?t:r+1,()=>s(o)}},987160:(e,t,r)=>{"use strict";function n(e,t){const r=new URL(t.hubApiUrl).hostname;return"discussionPost"===e?{type:"arcgis-hub",url:`https://${r}/api/search/v2`}:{type:"arcgis-hub",url:`https://${r}/api/search/v1`}}r.d(t,{v:()=>n})},311787:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(152189);function i(e,t){let r=null;const i=t.filter((t=>t.predicates.find((t=>!(0,n.B)(t[e])))));if(i.length>1)throw new Error(`Only 1 IFilter can have a '${e}' predicate but ${i.length} were detected`);if(i.length){const t=i[0],s=t.predicates.filter((t=>!(0,n.B)(t[e])));if(s.length>1)throw new Error(`Only 1 '${e}' predicate is allowed but ${s.length} were detected`);if("AND"!==t.operation&&t.predicates.length>1)throw new Error(`'${e}' predicates cannot be OR'd to other predicates`);const o=s[0],a=o[e];if("string"!=typeof a&&"boolean"!=typeof a)throw new Error(`'${e}' predicate must be a string or boolean primitive. string[] and IMatchOptions are not allowed.`);r=o}return r}},152189:(e,t,r)=>{"use strict";function n(e){return null==e||""===e}r.d(t,{B:()=>n})},758744:(e,t,r)=>{"use strict";r.d(t,{AI:()=>l,ff:()=>u,qj:()=>a});var n=r(466674),i=r(625873),s=r(329644),o=r(232413);const a=["created","modified","lastlogin"],c=["bbox","categoriesAsParam","categoryFilter","filterType","isopendata","isviewonly","memberType","name","searchUserAccess","searchUserName","term","openData"],u=[...a,...c];function l(e){const t={};return Object.entries(e).forEach((([r,l])=>{if(u.includes(r)||(0,n.t)(r,(0,o.N0)(l),t),a.includes(r)){const a=(0,s.kI)((0,i.W)(e,r));"relative-date"===(0,i.W)(e,`${r}.type`)?(0,n.t)(r,(0,o.SN)(a),t):(0,n.t)(r,a,t)}c.includes(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(0,n.t)(r,l,t)})),t}},561037:(e,t,r)=>{"use strict";function n(e){let t="item";return["group","event","user","channel","organization"].includes(e.toLowerCase())&&(t=e.toLocaleLowerCase()),"group member"===e.toLowerCase()&&(t="groupMember"),t}r.d(t,{x:()=>n})},342570:(e,t,r)=>{"use strict";r.d(t,{Zx:()=>i});var n=r(152189);function i(e){return e.filters.map(s).filter(u).join(" AND ")}function s(e){const t=e.operation||"OR";return`(${e.predicates.map(o).filter(u).join(` ${t} `)})`}function o(e){return`(${Object.entries(e).filter((([e,t])=>"term"!==e&&"bbox"!==e&&"fields"!==e&&"flatten"!==e&&!(0,n.B)(t))).reduce(((e,[t,r])=>{let n;var i;return"string"==typeof r||"boolean"==typeof r?n=a(t,r):Array.isArray(r)?n=function(e,t){return`${e} IN (${t.map(c).join(", ")})`}(t,r):(i=r,n=Number.isInteger(i.from)&&Number.isInteger(i.to)?function(e,t){return`${e} BETWEEN ${t.from} AND ${t.to}`}(t,r):function(e,t){const r=function(e,t){let r;return Array.isArray(t)?r=`${e} IN (${t.map(c).join(", ")})`:t&&(r=a(e,t)),r}(e,t.any),n=function(e,t){let r;return Array.isArray(t)?r=t.map((t=>a(e,t))).join(" AND "):t&&(r=a(e,t)),r}(e,t.all),i=function(e,t){let r;return t&&(r=`${e} NOT IN (${(Array.isArray(t)?t:[t]).map(c).join(", ")})`),r}(e,t.not);return[r,n,i].filter((e=>!!e)).join(" AND ")}(t,r)),e.push(n),e}),[]).join(" AND ")})`}function a(e,t){return`${e}=${"string"==typeof t?c(t):t}`}function c(e){return/\s/.test(e)?`'${e}'`:e}function u(e){return"()"!==e}},630933:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(636137),i=r(329644),s=r(152189);async function o(e,t,r){var o;const a=(0,i.kI)(t);let c;r.site&&(c=new URL(r.site).hostname);const u=new URL(e).hostname;c&&c!==u&&(a.target=c);const l=e+function(e){const t=Object.entries(e).filter((([e,t])=>!(0,s.B)(t))).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return t&&`?${t}`}(a),d=(null===(o=r.requestOptions)||void 0===o?void 0:o.fetch)||fetch,p=await d(l,{method:"GET"});if(!p.ok)throw new n.m(p.statusText,l,p.status);return p.json()}},299644:(e,t,r)=>{"use strict";function n(e,t,r,n){const i=e.links.find((e=>"next"===e.rel));let s=()=>null;return i&&(s=()=>{const e=+new URL(i.href).searchParams.get("startindex"),s=Object.assign(Object.assign({},n),{start:e});return u(t,r,s)}),s}r.d(t,{S:()=>u});var i=r(753533),s=r(625873),o=r(311787),a=r(342570),c=r(630933);async function u(e,t,r){const u=function(e,t){const r=(0,a.Zx)(e),n=(0,s.W)(t,"requestOptions.authentication.token"),i=t.num,c=t.start,u=function(e){const t=(0,o.$)("term",e.filters);return null==t?void 0:t.term}(e),l=function(e){const{sortField:t,sortOrder:r}=e;let n;return t&&(n="desc"===r?`-properties.${t}`:`properties.${t}`),n}(t),d=function(e){const t=(0,o.$)("bbox",e.filters);return null==t?void 0:t.bbox}(e),p=function(e){const t=(0,o.$)("flatten",e.filters);return null==t?void 0:t.flatten}(e),h=function(e){const t=(0,o.$)("fields",e.filters);return null==t?void 0:t.fields}(e);return{filter:r,token:n,limit:i,startindex:c,q:u,sortBy:l,bbox:d,flatten:p,fields:h}}(t,r);return async function(e,t,r,s){return"discussionPost"===r.targetEntity?async function(e,t,r,i){const s=await Promise.all(e.features.map((e=>async function(e){return{id:e.id,name:e.properties.title,summary:e.properties.body,createdDate:new Date(e.properties.createdAt),createdDateSource:"properties.createdAt",updatedDate:new Date(e.properties.updatedAt),updatedDateSource:"properties.updatedAt",type:"post",owner:e.properties.creator,location:null,created:new Date(e.properties.createdAt),modified:new Date(e.properties.updatedAt),title:e.properties.title,rawResult:e,access:null,family:null}}(e)))),o=n(e,t,r,i),a=e.links.find((e=>"next"===e.rel));return{total:e.numberMatched,results:s,hasNext:!!a,next:o}}(e,t,r,s):async function(e,t,r,s){const o=await Promise.all(e.features.map((e=>async function(e,t,r){const n=e.properties,s=await(0,i.Qm)(n,t,r);return s.source=e.properties.source,s.license=e.properties.license,s}(e,s.include,s.requestOptions)))),a=n(e,t,r,s),c=e.links.find((e=>"next"===e.rel));return{total:e.numberMatched,results:o,hasNext:!!c,next:a}}(e,t,r,s)}(await(0,c.d)(e,u,r),e,t,r)}},295426:(e,t,r)=>{"use strict";function n(e){const t=e.split(" AS "),r=t[0],n=t[1]||r.split(".").reverse()[0];return{enrichment:r.split(".")[0],path:r,prop:n}}r.d(t,{u:()=>n})},753533:(e,t,r)=>{"use strict";r.d(t,{qI:()=>O,X3:()=>S,Qm:()=>C,XZ:()=>v,hw:()=>w});var n=r(170209),i=r(111068),s=r(579032),o=r(3406),a=r(615555),c=r(664218),u=r(713907),l=r(88036),d=r(232413),p=r(482072);function h(e){var t;return(null===(t=e.aggregations)||void 0===t?void 0:t.counts)?e.aggregations.counts.map((e=>({mode:"terms",field:e.fieldName,values:e.fieldValues}))):[]}var m=r(758744),f=r(826899),g=r(770519),y=r(329644),b=r(610924);async function v(e,t){return I(E(t,(0,d.Fn)(e)))}function w(e,t){return T(E(t,e))}function S(e){const t=(0,y.kI)(e);return t.filters=t.filters.map((e=>(e.predicates=e.predicates.map(m.AI),e))),t}function E(e,t){var r;if(!e.requestOptions)throw new f.Z("portalSearchItems","options.requestOptions is required.");const n=(0,d.Bq)(t),s=(0,i.O)(n);
28return["num","sortField","sortOrder","include","start","httpMethod","requestOptions"].forEach((t=>{e.hasOwnProperty(t)&&(s[t]=e[t])})),e.requestOptions.authentication?s.authentication=e.requestOptions.authentication:s.portal=e.requestOptions.portal,(null===(r=e.aggFields)||void 0===r?void 0:r.length)&&(s.countFields=e.aggFields.join(","),s.countSize=e.aggLimit||10),s}async function T(e){const t=await(0,n.KT)(e),r=h(t);return{total:t.total,results:t.results,aggregations:r,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,T),executedQuerySize:(0,d.tS)(e.q)}}async function I(e){const t=await(0,n.KT)(e),r=await Promise.all(t.results.map((t=>C(t,e.include,e.requestOptions)))),i=h(t);return{total:t.total,results:r,aggregations:i,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,I),executedQuerySize:(0,d.tS)(e.q)}}async function C(e,t=[],r){let n=g.v;switch(e.type){case"Hub Site Application":case"Site Application":n=a.nK;break;case"Hub Page":case"Site Page":n=s.Hy;break;case"Hub Project":n=o.D6;break;case"Hub Initiative":n=c.J5;break;case"Solution":n=u.Gb;break;case"Web Mapping Application":e.typeKeywords.includes("hubSite")&&(n=a.nK)}return n(e,t,r)}const A={$application:[{type:{any:["Web Mapping Application","Application","Insights","Web Experience"],not:["Insights Theme","Insights Model"]},typekeywords:{not:["hubSite","Story Map"]}},{type:"Web Mapping Experience",typekeywords:"EXB Experience"}],$dashboard:[{type:{any:["Dashboard"],not:["Operation View"]},typekeywords:{not:["Extension","ArcGIS Operation View"]}}],$dataset:[{type:{any:["Scene Service","Feature Collection","Route Layer","Layer","Explorer Layer","Tile Package","Vector Tile Package","Scene Package","Layer Package","Feature Service","Stream Service","Map Service","Vector Tile Service","Image Service","WMS","WFS","WMTS","KML","KML Collection","Globe Service","CSV","Shapefile","GeoJson","Service Definition","File Geodatabase","CAD Drawing","Relational Database Connection"],not:["Web Mapping Application","Geodata Service"]}},{typekeywords:["OGC","Geodata Service"]}],$document:[{type:["PDF","Microsoft Excel","Microsoft Word","Microsoft Powerpoint","iWork Keynote","iWork Pages","iWork Numbers","Visio Document","Document Link"]}],$initiative:[{type:"Hub Initiative",typekeywords:"hubInitiativeV2"}],$experience:[{type:"Web Experience"}],$feedback:[{type:"Form"}],$page:[{typekeywords:"hubPage"}],$site:[{type:["Hub Site Application","Site Application"]}],$storymap:[{type:"Storymap"},{type:"Web Mapping Application",typekeywords:"Story Map"}],$template:[{type:["Web Mapping Application","Hub Initiative","Hub Initiative Template","Solution"],typekeywords:{any:["hubInitiativeTemplate","hubSolutionTemplate","Template"],not:"Deployed"}}],$webmap:[{type:{any:["Web Map","Web Scene"],not:"Web Mapping Application"}}]};function O(e){const t=(0,y.kI)(e);return t.filters=t.filters.map((e=>{let t=!1;return e.predicates=e.predicates.reduce(((e,r)=>{if(function(e){let t=!1;return"string"==typeof e&&(t=e in A),t}(r.type)){const i=(n=r.type,A[n]);e=[...e,...i],t=!0}else r.type&&"string"!=typeof r.type&&!Array.isArray(r.type)?(Object.keys(r.type).forEach((e=>{const t=r.type[e];Array.isArray(t)&&(r.type[e]=t.reduce(((e,t)=>{if(function(e){let t=!1;return e&&"$"===e.charAt(0)&&l.CK.includes(e.slice(1))&&(t=!0),t}(t)){const r=t.slice(1),n=(0,b.P)(r);e=[...e,...n]}else e.push(t);return e}),[]))})),e.push(r)):e.push(r);var n;return e}),[]),t&&(e.operation="OR"),e})),t}},881914:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=e=>{const t=(e=e.filter((e=>e)))[0].targetEntity;if(e.some((e=>e.targetEntity!==t)))throw new Error("Cannot combine queries for different entity types");const r=e.reduce(((e,t)=>[...e,...t.filters]),[]);return{targetEntity:t,filters:r}}},773249:(e,t,r)=>{"use strict";r.d(t,{C:()=>v});var n=r(329644),i=r(758744),s=r(170209),o=r(551753),a=r(625873);async function c(e,t,r){throw new Error("Not implemented")}async function u(e,t,r){throw new Error("Not implemented")}async function l(e,t,r){const i=Object.keys(e)[0],c=e[i],u={predicate:(0,n.kI)(e),matched:!0,reasons:[]},l={};if("group"===i){const e=await(0,s.tX)(t.id,r);l.groups=[...(0,o.t)(e,"admin",[]),...(0,o.t)(e,"member",[]),...(0,o.t)(e,"other",[])].map((e=>({id:e.id,title:e.title}))),t.group=l.groups.map((e=>e.id))}const m=(0,a.W)(t,i);if(m){const e={any:d,all:p,not:h};Object.keys(e).forEach((t=>{const r=(0,a.W)(c,t);if(r){const n=(0,a.W)(e,t)(i,r,m);n.meta=l,u.reasons.push(n)}})),u.matched=u.reasons.every((e=>e.matched))}else u.matched=!1,u.reasons.push({attribute:i,matched:!1,message:`Property ${i} not present on search result, cannot provide explanation`});return Promise.resolve(u)}function d(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"IN",matched:!1,requirement:m(t).join(","),message:"No match"},{matches:i}=f(m(t),m(r));return n.matched=i.length>0,n.matched?n.message=`Value(s) ${n.values} contained at least one of value from [${n.requirement}]`:n.message=`Value(s) ${n.values} did not contain any of value from [${n.requirement}]`,n}function p(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"ALL",requirement:m(t).join(","),matched:!1,message:"No match"},{options:i,matches:s}=f(m(t),m(r));return n.matched=s.length===i.length,n.matched?n.message=`Value(s) ${n.values} contained all values from [${n.requirement}]`:n.message=`Value(s) ${n.values} did not contain all values from [${n.requirement}]`,n}function h(e,t,r){const n={attribute:e,values:m(r).join(","),condition:"NOT_IN",requirement:m(t).join(","),matched:!1,message:"No match"},{matches:i}=f(m(t),m(r));return n.matched=0===i.length,n.matched?n.message=`Value(s) ${n.values} is not contained in [${n.requirement}]`:n.message=`Value(s) ${n.values} is contained in [${n.requirement}]`,n}function m(e){return Array.isArray(e)?e:[e]}function f(e,t){const r={options:e,values:t,matches:[]};return r.matches=e.reduce(((e,r)=>(t.includes(r)&&e.push(r),e)),[]),r}async function g(e,t,r){const n=Object.keys(e)[0];let s=l;return i.ff.includes(n)&&(s=i.qj.includes(n)?c:u),s(e,t,r)}async function y(e,t,r){const i={filter:(0,n.kI)(e),matched:!1,reasons:[]};for(const n of e.predicates){const e=await g(n,t,r);i.reasons.push(e)}return"OR"===e.operation?i.matched=i.reasons.some((e=>e.matched)):i.matched=i.reasons.every((e=>e.matched)),i}var b=r(232413);async function v(e,t,r){if("item"!==t.targetEntity)throw new Error('explainQueryResult: Only queries with targetEntity: "item" are supported');const i=(0,b.Bq)(t),s=[];for(const t of i.filters){const n=await y(t,e,r);s.push(n)}const o=s.reduce(((e,t)=>(t.matched||(e=!1),e)),!0),a=[];
28return s.forEach((e=>{e.reasons.forEach((e=>{e.reasons.forEach((e=>{a.push(e)}))}))})),{result:(0,n.kI)(e),query:(0,n.kI)(t),matched:o,reasons:s,summary:a}}},772070:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(329644),i=r(61285),s=r(337322);function o(e,t){const r={owner:[],member:[],admin:[]},o=i.g.fromJson(e,t),a=o.collectionNames.map((e=>{const r=o.getCollection(e);return(0,s.o)(r.scope,t.currentUser)}));return[...Object.keys(e.scopes).reduce(((t,r)=>((e.collections||[]).some((e=>e.targetEntity===r))||t.push(r),t)),[]).map((e=>{const r=o.getScope(e);return(0,s.o)(r,t.currentUser)})),...a].forEach((e=>{r.owner=[...r.owner,...e.owner],r.member=[...r.member,...e.member],r.admin=[...r.admin,...e.admin]})),r.owner=r.owner.filter(n.Tw),r.member=r.member.filter(n.Tw),r.admin=r.admin.filter(n.Tw),r}},9302:(e,t,r)=>{"use strict";r.d(t,{H:()=>o});var n=r(551753),i=r(329644),s=r(753533);function o(e,t,r=["any","all"]){return(0,s.X3)(t).filters.reduce(((e,t)=>[...e,...t.predicates]),[]).reduce(((t,i)=>(r.forEach((r=>{t=[...t,...(0,n.t)(i,`${e}.${r}`,[])]})),t)),[]).filter(i.Tw)}},715377:(e,t,r)=>{"use strict";function n(e){const t={owner:[],member:[],admin:[]};return(e.groups||[]).forEach((e=>{var r,n,i;"owner"===(null===(r=e.userMembership)||void 0===r?void 0:r.memberType)&&t.owner.push(e.id),"admin"===(null===(n=e.userMembership)||void 0===n?void 0:n.memberType)&&t.admin.push(e.id),"member"!==(null===(i=e.userMembership)||void 0===i?void 0:i.memberType)||e.isViewOnly||t.member.push(e.id)})),t}r.d(t,{q:()=>n})},337322:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(9302),i=r(715377);function s(e,t){let r={owner:[],member:[],admin:[]};const s=(0,n.H)("group",e),o=(0,i.q)(t);if(s.length){const e=["owner","admin","member"];s.forEach((t=>{e.forEach((e=>{o[e].includes(t)&&r[e].push(t)}))}))}else r=o;return r}},583872:(e,t,r)=>{"use strict";r.d(t,{B:()=>se});var n=r(282526),i=r(826899),s=r(625873),o=r(329644),a=r(232413),c=r(987160),u=r(111068),l=r(170209),d=r(758744),p=r(482072),h=r(447694),m=r(609205),f=r(276978),g=r(466674);async function y(e,t){let r;if(e.filters.forEach((e=>{e.predicates.forEach((e=>{const t=(0,s.W)(e,"group");Array.isArray(t)?r=t[0]:"string"==typeof t?r=t:"object"==typeof t&&(r=(0,s.W)(t,"any[0]")||(0,s.W)(t,"all[0]"))}))})),!r)throw new i.Z("portalSearchGroupMembers","Group Id required. Please pass as a predicate in the query.");e.filters=e.filters.map((e=>{const t=["name","memberType","joined"];return e.predicates=e.predicates.map((e=>(e.term&&(e.name=e.term,delete e.term),e))).map((e=>(0,f.H)(e,t))).filter((e=>Object.entries(e).length>0)).map(d.AI),e}));const n=(0,u.O)(e);return["num","sortField","sortOrder","include","start"].forEach((e=>{t.hasOwnProperty(e)&&(n[e]=t[e])})),n.groupId=r,n.requestOptions=t.requestOptions,b(n)}async function b(e){const t=Object.assign(Object.assign({},e),e.requestOptions),r=await(0,l.zv)(e.groupId,t),n=await Promise.all(r.users.map((t=>async function(e,t=[],r){const n={username:e.username,memberType:e.memberType||"member",access:"private",fullName:null,firstName:null,lastName:null,description:null,orgId:null,groups:[],tags:[],thumbnail:null,created:null,modified:null,isGroupOwner:e.isGroupOwner},i=(0,m.D)(l.PR,n),s=await i({username:e.username,authentication:r.authentication,portal:r.portal});return Object.keys(n).forEach((e=>{s.hasOwnProperty(e)&&""!==s[e]&&(0,g.t)(e,s[e],n)})),(0,h.RG)(n,["org.name as OrgName",...t],r)}(Object.assign(Object.assign({},t),{isGroupOwner:r.owner.username===t.username}),e.include,e.requestOptions))));return{total:r.total,results:n,hasNext:r.nextStart>-1,next:(0,p.D)(e,r.nextStart,r.total,b)}}var v=r(753533),w=r(241926);async function S(e,t){if(!t.requestOptions)throw new i.Z("portalSearchGroups","options.requestOptions is required.");e.filters=e.filters.map((e=>(e.predicates=e.predicates.map(d.AI),e)));const r=(0,u.O)(e);return["num","sortField","sortOrder","include","start","httpMethod","requestOptions"].forEach((e=>{t.hasOwnProperty(e)&&(r[e]=t[e])})),t.requestOptions.authentication?r.authentication=t.requestOptions.authentication:r.portal=t.requestOptions.portal,E(r)}async function E(e){const t=await(0,l.td)(e),r=await Promise.all(t.results.map((t=>async function(e,t=[],r){return(0,w.Fx)(e,t,r)}(t,e.include,e.requestOptions))));return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,E),executedQuerySize:(0,a.tS)(e.q)}}function T(e,t,r){if(!t.requestOptions)throw new i.Z(r,"requestOptions: IHubRequestOptions is required.");
28if(!t.requestOptions.authentication)throw new i.Z(r,"requestOptions must pass authentication.");const n=(0,o.kI)(e);n.filters=n.filters.map((e=>(e.predicates=e.predicates.map(d.AI),e)));const s=(0,u.O)(n);return["num","sortField","sortOrder","include","start","requestOptions"].forEach((e=>{t.hasOwnProperty(e)&&(s[e]=t[e])})),s.authentication=t.requestOptions.authentication,s}function I(e,t){const r=T(e,t,"searchPortalUsersLegacy");return _(Object.assign(Object.assign({},r),{include:["org.name as OrgName",...r.include||[]]}))}function C(e,t){return _(T(e,t,"searchPortalUsers"))}function A(e,t){return D(T(e,t,"searchCommunityUsers"))}function O(e,t){return Promise.all(t.results.map((t=>function(e,t=[],r){return(0,h.RG)(e,t,r)}(t,e.include,e.requestOptions))))}async function _(e){const t=await(0,l.pz)(e),r=await O(e,t);return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,_),executedQuerySize:(0,a.tS)(e.q)}}async function D(e){const t=await(0,l.p3)(e),r=await O(e,t);return{total:t.total,results:r,hasNext:t.nextStart>-1,next:(0,p.D)(e,t.nextStart,t.total,D),executedQuerySize:(0,a.tS)(e.q)}}function P(e,t){const r=t.api;return"discussionPost"===e.targetEntity?`${r.url}/collections/discussion-post`:`${r.url}/collections/all`}var k=r(342570),x=r(630933),R=r(299644);async function U(e,t){var r;const n=(0,a.Bq)(e);if(null===(r=t.aggFields)||void 0===r?void 0:r.length)return async function(e,t){const r=`${P(e,t)}/aggregations`,n=function(e,t){return{aggregations:`terms(fields=(${t.aggFields.join()}))`,filter:(0,k.Zx)(e),token:(0,s.W)(t,"requestOptions.authentication.token")}}(e,t);return{total:0,results:[],hasNext:!1,next:()=>null,aggregations:(await(0,x.d)(r,n,t)).aggregations.aggregations.map((e=>({mode:"terms",field:e.field,values:e.aggregations.map((e=>({value:e.label,count:e.value})))})))}}(n,t);const i=`${P(n,t)}/items`;return(0,R.S)(i,n,t)}var M=r(972335);function N(e){return e.reduce(((e,t)=>t.predicates.reduce(((e,t)=>Object.keys(t).reduce(((e,r)=>{const n=(Array.isArray(t[r])?t[r]:[t[r]]).reduce(((e,t)=>e.includes(t)?e:[...e,t]),e[r]||[]);return Object.assign(Object.assign({},e),{[r]:n})}),e)),e)),{})}var j=r(376826);const $={access:j.LY.ACCESS,created:j.LY.CREATED_AT,modified:j.LY.UPDATED_AT,owner:j.LY.CREATOR},F={desc:j.As.DESC,asc:j.As.ASC};var G=r(85738),L=r(595727),H=r(570900);const B=async(e,t)=>{if(!t.requestOptions)throw new i.Z("hubSearchChannels","options.requestOptions is required");const r=function(e){var t,r,n,i;const s={},a=N(e);if((null===(t=a.term)||void 0===t?void 0:t.length)&&(s.name=a.term[0]),(null===(r=a.groups)||void 0===r?void 0:r.length)&&(s.groups=a.groups),(null===(n=a.access)||void 0===n?void 0:n.length)&&(s.access=a.access),null===(i=a.id)||void 0===i?void 0:i.length){const{ids:e,notIds:t}=a.id.reduce(((e,t)=>t.not?Object.assign(Object.assign({},e),{notIds:[...e.notIds,...Array.isArray(t.not)?t.not:[t.not]]}):Object.assign(Object.assign({},e),{ids:[...e.ids,t]})),{ids:[],notIds:[]});e.length&&(s.ids=e),t.length&&(s.notIds=t.filter(o.Tw))}return s}(e.filters),n=function(e){const t={};return e.num&&(t.num=e.num),e.start&&(t.start=e.start),e.sortField&&$[e.sortField]&&(t.sortBy=$[e.sortField]),e.sortOrder&&F[e.sortOrder]&&(t.sortOrder=F[e.sortOrder]),t}(t),{total:s,nextStart:a,items:c}=await(0,M.r6)(Object.assign({data:Object.assign(Object.assign({},r),n)},t.requestOptions)),u=await async function(e,t){var r;let n=[];if(null===(r=t.include)||void 0===r?void 0:r.includes("groups")){const r=e.reduce(((e,t)=>(0,G.hw)(t).reduce(((e,t)=>e.includes(t)?e:[...e,t]),e)),[]),i=await(0,L.d)((0,H.D)(r,100),(e=>(0,l.td)(Object.assign({q:e.map((e=>`id:${e}`)).join(" OR "),num:e.length},t.requestOptions))),5);n=i.reduce(((e,t)=>[...e,...t.results]),[])}return e.map((e=>{var r;return(0,G.Ge)(e,(null===(r=t.include)||void 0===r?void 0:r.includes("groups"))?(0,G.hw)(e).map((e=>n.find((({id:t})=>t===e))||null)):[])}))}(c,t);return{total:s,results:u,hasNext:a>-1,next:()=>B(e,Object.assign(Object.assign({},t),{start:a}))}};var W=r(805959),q=r(743469),V=r(386924),K=r(45805);function z(e,t){return e.map((e=>function(e,t){return t[e]||t[e.toUpperCase()]||t[e.toLowerCase()]||e}(e,t)))}async function Y(e,t){const r=function(e){var t,r,n,i,s,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S,E;const T=N(e),I={};if((null===(t=T.access)||void 0===t?void 0:t.length)&&(I.access=z(T.access,q.bY)),(null===(r=T.canEdit)||void 0===r?void 0:r.length)&&(I.canEdit=T.canEdit[0]),(null===(n=T.entityId)||void 0===n?void 0:n.length)&&(I.entityIds=T.entityId),(null===(i=T.entityType)||void 0===i?void 0:i.length)&&(I.entityTypes=z(T.entityType,q.Cb)),null===(s=T.id)||void 0===s?void 0:s.length){const{ids:e,notIds:t}=T.id.reduce(((e,t)=>t.not?Object.assign(Object.assign({},e),{notIds:[...e.notIds,...Array.isArray(t.not)?t.not:[t.not]]}):Object.assign(Object.assign({},e),{ids:[...e.ids,t]})),{ids:[],notIds:[]});
28e.length&&(I.eventIds=e.filter(o.Tw)),t.length&&(I.notEventIds=t.filter(o.Tw))}if((null===(a=T.term)||void 0===a?void 0:a.length)&&(I.title=T.term[0]),(null===(c=T.orgId)||void 0===c?void 0:c.length)&&(I.orgId=T.orgId[0]),(null===(u=T.categories)||void 0===u?void 0:u.length)&&(I.categories=T.categories),(null===(l=T.tags)||void 0===l?void 0:l.length)&&(I.tags=T.tags),null===(d=T.group)||void 0===d?void 0:d.length){const{ids:e,notIds:t}=T.group.reduce(((e,t)=>t.not?Object.assign(Object.assign({},e),{notIds:[...e.notIds,...Array.isArray(t.not)?t.not:[t.not]]}):Object.assign(Object.assign({},e),{ids:[...e.ids,t]})),{ids:[],notIds:[]});if(e.length&&(I.sharedToGroups=e),t.length){const e=t.filter(o.Tw);I.withoutEditGroups=e,I.withoutReadGroups=e}}return(null===(p=T.attendanceType)||void 0===p?void 0:p.length)&&(I.attendanceTypes=z(T.attendanceType,q.uA)),(null===(h=T.owner)||void 0===h?void 0:h.length)&&(I.createdByIds=T.owner),I.status=(null===(m=T.status)||void 0===m?void 0:m.length)?z(T.status,q.N3):[q.N3.PLANNED,q.N3.CANCELED],(null===(f=T.startDateRange)||void 0===f?void 0:f.length)?(T.startDateRange[0].to&&(I.startDateTimeBefore=new Date(T.startDateRange[0].to).toISOString()),T.startDateRange[0].from&&(I.startDateTimeAfter=new Date(T.startDateRange[0].from).toISOString())):((null===(g=T.startDateBefore)||void 0===g?void 0:g.length)&&(I.startDateTimeBefore=new Date(T.startDateBefore[0]).toISOString()),(null===(y=T.startDateAfter)||void 0===y?void 0:y.length)&&(I.startDateTimeAfter=new Date(T.startDateAfter[0]).toISOString())),(null===(b=T.endDateRange)||void 0===b?void 0:b.length)?(T.endDateRange[0].to&&(I.endDateTimeBefore=new Date(T.endDateRange[0].to).toISOString()),T.endDateRange[0].from&&(I.endDateTimeAfter=new Date(T.endDateRange[0].from).toISOString())):((null===(v=T.endDateBefore)||void 0===v?void 0:v.length)&&(I.endDateTimeBefore=new Date(T.endDateBefore[0]).toISOString()),(null===(w=T.endDateAfter)||void 0===w?void 0:w.length)&&(I.endDateTimeAfter=new Date(T.endDateAfter[0]).toISOString())),(null===(S=T.occurrence)||void 0===S?void 0:S.length)&&T.occurrence.forEach((e=>{switch(e){case"upcoming":I.startDateTimeAfter=(new Date).toISOString();break;case"past":I.endDateTimeBefore=(new Date).toISOString();break;case"inProgress":I.startDateTimeBefore=(new Date).toISOString(),I.endDateTimeAfter=(new Date).toISOString()}})),(null===(E=T.modified)||void 0===E?void 0:E.length)&&T.modified[0].to&&T.modified[0].from&&(I.updatedAtBefore=new Date(T.modified[0].to).toISOString(),I.updatedAtAfter=new Date(T.modified[0].from).toISOString()),I}(e.filters),n=function(e){const t={};return e.num>0&&(t.num=e.num),e.start>1&&(t.start=e.start),"modified"===e.sortField?t.sortBy=q.ji.updatedAt:"created"===e.sortField?t.sortBy=q.ji.createdAt:"title"===e.sortField?t.sortBy=q.ji.title:"startDate"===e.sortField&&(t.sortBy=q.ji.startDateTime),t.sortOrder="desc"===e.sortOrder?q.LM.desc:q.LM.asc,t}(t),i=Object.assign(Object.assign(Object.assign({},r),n),{include:[q.rf.creator,q.rf.location]}),{items:s,nextStart:a,total:c}=await(0,W.gT)(Object.assign(Object.assign({},t.requestOptions),{data:i})),u=await Promise.all(s.map((e=>async function(e,t){var r;let n;return(null===(r=t.include)||void 0===r?void 0:r.includes("ownerUser"))&&(n=await(0,l.PR)(Object.assign({username:e.creator.username},t.requestOptions))),{access:e.access.toLowerCase(),id:e.id,location:(0,K.c)(e),type:"Event",name:e.title,owner:e.creator.username,ownerUser:n,summary:e.summary||e.description,createdDate:new Date(e.createdAt),createdDateSource:"event.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"event.updatedAt",family:"event",links:(0,V.E)(e),tags:e.tags,categories:e.categories,rawResult:e}}(e,t)))),d=a>-1;return{total:c,results:u,hasNext:d,next:()=>{if(!d)throw new Error("No more hub events for the given query and options");return Y(e,Object.assign(Object.assign({},t),{start:a}))}}}var J=r(825688),Q=r(957322);const Z=(e,t)=>e.reduce(((e,r)=>r.predicates.reduce(((e,r)=>Object.entries(r).reduce(((e,[r,n])=>r===t?[...e,...Array.isArray(n)?n:[n]]:e),e)),e)),[]),X=(e,t)=>{const r=Z(e,t).filter(o.Tw).join(",");if(r)return r};async function ee(e,t){const r=function(e){const t={eventId:e.properties.eventId},r=(e,t)=>(null==e?void 0:e.length)?e:t.map((e=>e.toLowerCase())).join(","),n=X(e.filters,"userId");(null==n?void 0:n.length)&&(t.userId=n);const i=Z(e.filters,"term");i.length&&(t.name=i[0]),t.type=r(X(e.filters,"attendanceType"),[q.uA.VIRTUAL,q.uA.IN_PERSON]),t.role=r(X(e.filters,"role"),[q.sY.OWNER,q.sY.ORGANIZER,q.sY.ATTENDEE]),t.status=r(X(e.filters,"status"),[q.Vv.PENDING,q.Vv.ACCEPTED,q.Vv.DECLINED,q.Vv.BLOCKED]);const s=Z(e.filters,"updatedDateRange");return s.length&&(t.updatedAtBefore=new Date(s[0].to).toISOString(),t.updatedAtAfter=new Date(s[0].from).toISOString()),t}(e),n=function(e){const t={};return e.num>0&&(t.num=e.num.toString()),e.start>1&&(t.start=e.start.toString()),"modified"===e.sortField?t.sortBy=q.Sj.updatedAt:"created"===e.sortField?t.sortBy=q.Sj.createdAt:"username"===e.sortField?t.sortBy=q.Sj.username:"firstName"===e.sortField?t.sortBy=q.Sj.firstName:"lastName"===e.sortField&&(t.sortBy=q.Sj.lastName),t.sortOrder="desc"===e.sortOrder?q.LM.desc:q.LM.asc,t}(t),i=Object.assign(Object.assign({},r),n),{items:s,nextStart:o,total:c}=await(0,J.mv)(Object.assign(Object.assign({},t.requestOptions),{data:i})),u=await Promise.all(s.map((e=>async function(e,t){var r;const[n,i]=await Promise.all([(0,l.PR)(Object.assign({username:e.userId},t.requestOptions)),(0,l.PR)(Object.assign({username:e.createdById},t.requestOptions))]);return{id:e.id.toString(),access:n.access,name:n.fullName,createdDate:new Date(e.createdAt),createdDateSource:"attendee.createdAt",updatedDate:new Date(e.updatedAt),updatedDateSource:"attendee.updatedAt",type:"Event Attendee",family:"eventAttendee",owner:i.username,rawResult:e,links:{self:(0,Q.n)(n.username,t.requestOptions),siteRelative:`/people/${n.username}`,thumbnail:n.thumbnail?(0,a.Fz)(t.requestOptions.portal,n,null===(r=t.requestOptions.authentication)||void 0===r?void 0:r.token):null}}}(e,t)))),d=o>-1;return{total:c,results:u,hasNext:d,next:()=>{if(!d)throw new Error("No more hub events for the given query and options");return ee(e,Object.assign(Object.assign({},t),{start:o}))}}}var te=r(288285),re=r(351873),ne=r(9302);async function ie(e,t){const r=(0,ne.H)("id",e,["any"]);if(!r.length)throw new Error("Organization query must contain an id predicate.");const n=(0,m.D)(te.T,null),i=(await(0,L.d)(r,(async e=>n(e,t.requestOptions)),8)).filter((e=>null!==e));return{total:i.length,hasNext:!1,next:null,results:i.map((e=>(0,re.yT)(e)))}}async function se(e,t){if(!e)throw new i.Z("hubSearch","Query is required.");
28if(!Array.isArray(e.filters))throw new i.Z("hubSearch","Query must have a filters array.");if(!e.filters.length)throw new i.Z("hubSearch","Query must contain at least one Filter.");if(!t.requestOptions)throw new i.Z("hubSearch","requestOptions: IHubRequestOptions is required.");t.include||(t.include=[]);const r=e.targetEntity,{requestOptions:u}=t,l=(0,n._T)(t,["requestOptions"]),d=(0,o.kI)(l);d.requestOptions=u,d.api=function(e,t){const{api:r,requestOptions:{portal:n}}=t;let i;return i=r?(0,a.F6)(r):function(e,t){const{requestOptions:{isPortal:r}}=t;return"channel"===e&&!r}(e,t)||function(e,t){const{requestOptions:{isPortal:r}}=t;return["event","eventAttendee"].includes(e)&&!r}(e,t)?{type:"arcgis-hub",url:null}:function(e,t){const{site:r,requestOptions:{isPortal:n}}=t;return!n&&("discussionPost"===e||"item"===e&&!!r)}(e,t)?(0,c.v)(e,t.requestOptions):{type:"arcgis",url:n},i}(r,d);const p={arcgis:{item:v.XZ,group:S,user:I,portalUser:C,communityUser:A,groupMember:y,organization:ie},"arcgis-hub":{item:U,channel:B,discussionPost:U,event:Y,eventAttendee:ee}},h=(0,s.W)(p,`${d.api.type}.${r}`);if(!h)throw new i.Z("hubSearch",`Search via "${r}" filter against "${d.api.type}" api is not implemented. Please ensure "targetEntity" is defined on the query.`);return h((0,o.kI)(e),d)}},820696:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Catalog:()=>n.g,Collection:()=>i.F,SEARCH_APIS:()=>l.s8,WELL_KNOWN_EVENT_CATALOGS:()=>d.IN,WELL_KNOWN_GROUP_CATALOGS:()=>d.en,WELL_KNOWN_ITEM_CATALOGS:()=>d.Zp,addDefaultItemSearchPredicates:()=>l.Fn,combineQueries:()=>h.W,dotifyString:()=>d.YM,expandApi:()=>l.F6,expandApis:()=>l.Kf,expandPortalQuery:()=>l.Bq,getGroupPredicate:()=>l.l8,getGroupThumbnailUrl:()=>l.PP,getKilobyteSizeOfQuery:()=>l.tS,getResultSiteRelativeLink:()=>l.U9,getScopeGroupPredicate:()=>l.x9,getUserThumbnailUrl:()=>l.Fz,getWellKnownCatalog:()=>d.Sj,getWellKnownCatalogs:()=>d.ad,getWellknownCollection:()=>d.sd,getWellknownCollections:()=>d.AX,hubSearch:()=>s.B,migrateToCollectionKey:()=>l.FT,relativeDateToDateRange:()=>l.SN,searchAssociatedContent:()=>p.u,serializeQueryForPortal:()=>o.O,upgradeCatalogSchema:()=>u.c,valueToMatchOptions:()=>l.N0});var n=r(61285),i=r(958623),s=r(583872),o=r(111068),a=r(615756),c={};for(const e in a)["default","Catalog","Collection","hubSearch","serializeQueryForPortal"].indexOf(e)<0&&(c[e]=()=>a[e]);r.d(t,c);var u=r(721347),l=r(232413),d=r(20084),p=r(442642),h=r(881914)},677425:(e,t,r)=>{"use strict";r.d(t,{O:()=>i});var n=r(753533);function i(e){if(!e)return;const t=(0,n.X3)(e);return t.filters.forEach((e=>{e.predicates.forEach((e=>{e.group&&(e.group.not=[...e.group.any||[],...e.group.all||[]],e.group.any=[],e.group.all=[])}))})),t}},442642:(e,t,r)=>{"use strict";r.d(t,{u:()=>c});var n=r(54430),i=r(874623),s=r(826899),o=r(987160),a=r(299644);async function c(e){const{scope:t,requestOptions:r,num:c=4}=e,u={requestOptions:r,num:c},l=(0,n.Q)(e.entity);if(!i.T.includes(l))throw new s.Z("searchAssociatedContent",`associated content is not supported for entity type "${l}"`);if("item"!==t.targetEntity)throw new s.Z("searchAssociatedContent",`associated content scope does not support targetEntity "${t.targetEntity}"`);if(!e.layerId&&"connected"===e.association)throw new s.Z("searchAssociatedContent",'"layerId" is required for searching "connected" content');const{entity:d,layerId:p}=e,h=p?`${d.id}_${p}`:d.id,{association:m}=e,f=`${(0,o.v)(t.targetEntity,u.requestOptions).url}/collections/all/items/${h}/${m}`;return(0,a.S)(f,t,u)}},314866:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var n=r(61285),i=r(329644),s=r(76309);async function o(e,t,r,o){const a=e.map((e=>n.g.fromJson(e,o))).map((async e=>{const n=[e.searchCollections(t,r).then((t=>({catalogTitle:e.title,collectionResults:t})))],o=(0,s.e)("targetEntity",e.collections).filter(i.Tw),a=e.availableScopes.filter((e=>!o.includes(e)));if(a.length){const i=e.searchScopes(t,r,a).then((t=>({catalogTitle:`${e.title}`,scopeResults:t})));n.push(i)}return await Promise.all(n).then((e=>e.reduce(((e,t)=>({catalogTitle:t.catalogTitle,collectionResults:Object.assign(Object.assign({},e.collectionResults),t.collectionResults),scopeResults:Object.assign(Object.assign({},e.scopeResults),t.scopeResults)})),{})))}));return Promise.all(a)}},162317:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(551753),i=r(314866);async function s(e,t,r,s){const o=(0,n.t)(e,"catalogs",[]);return(0,i.L)(o,t,r,s)}}
28,111068:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(311787),i=r(758744);function s(e){const t=a(e.filters.map(c).filter(o),"AND"),r=(0,n.$)("bbox",e.filters);return r&&(t.params={bbox:r.bbox}),t}function o(e){return!(null==e||""===e)}function a(e,t){return e.reduce(((e,r)=>(Object.entries(r).forEach((([r,n])=>{e[r]&&""!==n?e[r]=`${e[r]} ${t} ${n}`:""!==n&&(e[r]=n)})),e)),{q:""})}function c(e){const t=e.operation||"AND",r=e.predicates.map(i.AI),n=a(r.map(u).filter((e=>null!=e)),t);return r.length>1&&(n.q=`(${n.q})`),n}function u(e){const t=["created","modified"],r=["isopendata","isviewonly"],n=["searchUserAccess","searchUserName","memberType","name","categoriesAsParam","categoryFilter","bbox","joined"],i=["filterType","term",...t,...r,...n],s=["access","capabilities","created","categories","categoriesAsParam","categoryFilter","description","disabled","email","emailstatus","firstname","fullname","group","id","isInvitationOnly","isopendata","joined","lastlogin","lastname","memberType","modified","name","orgid","orgIds","owner","provider","role","searchUserAccess","searchUserName","snippet","tags","term","title","type","typekeywords","userlicensetype","username","isviewonly"],c=Object.entries(e).map((([e,o])=>{if(s.includes(e)){const s={q:""};return i.includes(e)||"term"===e||(s.q=function(e,t){var r,n,i;let s="";return(null===(r=t.any)||void 0===r?void 0:r.length)&&(s=`${l("OR",e,t.any)}`),(null===(n=t.all)||void 0===n?void 0:n.length)&&(s=(s?s+" AND ":"")+`${l("AND",e,t.all)}`),(null===(i=t.not)||void 0===i?void 0:i.length)&&(s=(s?s+" AND ":"")+`${l("OR",`-${e}`,t.not)}`),s}(e,o)),(t.includes(e)||function(e){return"object"==typeof e&&null!==e&&["from","to"].every((t=>void 0!==e[t]))}(o))&&(s.q=function(e,t){return`${e}:[${t.from} TO ${t.to}]`}(e,o)),r.includes(e)&&(s.q=`${e}:${o}`),n.includes(e)&&(s[e]="joined"===e?`${o.from},${o.to}`:o),"term"===e&&(s.q=o),s}})).filter(o);if(c.length){const e=a(c,"AND");return e.q&&(e.q=`(${e.q})`),e}return null}function l(e,t,r){let n="";return Array.isArray(r)&&r.length?(n=`${t}:"${r.join(`" ${e} ${t}:"`)}"`,r.length>1&&(n=`(${n})`)):n=`${t}:"${r}"`,n}},552450:()=>{},435031:()=>{},322965:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});const n=["item","group","user","portalUser","communityUser","groupMember","event","channel","discussionPost","eventAttendee","organization"]},39311:()=>{},503297:()=>{},470177:()=>{},615756:(e,t,r)=>{"use strict";r.r(t),r.d(t,{targetEntities:()=>u.g});var n=r(435031),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(39311);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(470177);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(503297);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(37417);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(322965),l=r(552450);i={};for(const e in l)["default","targetEntities"].indexOf(e)<0&&(i[e]=()=>l[e]);r.d(t,i)},37417:()=>{},721347:(e,t,r)=>{"use strict";r.d(t,{c:()=>a});var n=r(625873),i=r(329644);const s=1,o={item:e=>[{orgid:[e]},{type:{not:["Code Attachment"]}}],event:e=>[{orgId:e}]};function a(e){if((0,n.W)(e,"schemaVersion")===s)return e;{let t=(0,i.kI)(e);return t=function(e){if((0,n.W)(e,"schemaVersion")>1)return e;{const t={schemaVersion:1,title:"Default Catalog",scopes:{item:{targetEntity:"item",filters:[]},event:{targetEntity:"event",filters:[]}},collections:[]},r=(0,n.W)(e,"groups")||[];let i=[];Array.isArray(r)&&r.length?i=r:"string"==typeof r&&(i=[r]),i.length&&(t.scopes=Object.entries(t.scopes).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t[0]]:Object.assign(Object.assign({},t[1]),{filters:[{predicates:[{group:i}]}]})})),{}));const s=(0,n.W)(e,"orgId");return s&&(t.scopes=Object.entries(t.scopes).reduce(((e,t)=>{const r=t[0],n=t[1];return Object.assign(Object.assign({},e),{[r]:Object.assign(Object.assign({},n),{filters:[...n.filters,{operation:"AND",predicates:o[r](s)}]})})}),{})),t}}(t),t}}},232413:(e,t,r)=>{"use strict";r.d(t,{s8:()=>o,Fn:()=>y,F6:()=>c,Kf:()=>a,Bq:()=>v,l8:()=>f,PP:()=>d,tS:()=>b,U9:()=>g,x9:()=>m,Fz:()=>p,FT:()=>h,SN:()=>l,N0:()=>u});var n=r(653609),i=r(329644),s=r(753533);const o={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 a(e){return e.map(c)}function c(e){return"string"==typeof e&&e in o?o[e]:e}function u(e){let t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function l(e){const t={min:6e4,hours:36e5,days:864e5,weeks:6048e5},r=new Date,n={type:"date-range",from:r.getTime(),to:r.getTime()};switch(e.unit){case"hours":case"days":case"weeks":n.from=n.to-t[e.unit]*e.num;break;case"months":r.setMonth(r.getMonth()-e.num),n.from=r.getTime();break;case"years":r.setFullYear(r.getFullYear()-e.num),n.from=r.getTime()}return n}function d(e,t,r){let n=null;return t.thumbnail&&(n=`${e}/community/groups/${t.id}/info/${t.thumbnail}`,r&&"public"!==t.access&&(n=`${n}?token=${r}`)),n}function p(e,t,r){let n=null;return t.thumbnail&&(n=`${e}/community/users/${t.username}/info/${t.thumbnail}`,r&&"public"!==t.access&&(n=`${n}?token=${r}`)),n}function h(e){return function(e){return["Site","Event","Dataset","Document","App,Map"].includes(e)}(e)?"App,Map"===(t=e)?"appAndMap":t.toLowerCase():e;var t}function m(e){console.warn('"getScopeGroupPredicate(query)" is deprecated. Please use "getGroupPredicate(qyr)');const t=e=>!!e.group,r=e.filters.find((e=>e.predicates.find(t)));return r&&r.predicates.find(t)}function f(e){const t=v(e),r=e=>!!e.group,n=t.filters.find((e=>e.predicates.find(r)));return n&&n.predicates.find(r)}function g(e,t){var r
29;const{id:i,type:s,typeKeywords:o}=e;let a=null===(r=e.links)||void 0===r?void 0:r.siteRelative;if(a&&(0,n.r9)(s,o)){const e=((null==t?void 0:t.pages)||[]).find((e=>e.id===i)),r=null==e?void 0:e.slug;r&&(a=a.replace(i,r))}return a}function y(e){const t=(0,i.kI)(e);return t.filters.push({predicates:[{type:{not:["Code Attachment"]}}]}),t}function b(e){const t="string"==typeof e?e:e.toParam();return(new TextEncoder).encode(t).length/1024}function v(e){const t=(0,s.qI)(e);return(0,s.X3)(t)}},20084:(e,t,r)=>{"use strict";r.d(t,{AX:()=>g,IN:()=>u,Sj:()=>p,YM:()=>l,Zp:()=>a,ad:()=>d,en:()=>c,sd:()=>y});var n=r(610924),i=r(736261),s=r(625873),o=r(551753);const a=["myContent","favorites","organization","world","partners","community","livingAtlas"],c=["editGroups","viewGroups","allGroups","myGroups","orgGroups","communityGroups","publicGroups"],u=["myEvents","orgEvents","worldEvents"];function l(e){return e&&"."!==e.slice(-1)?`${e}.`:e}function d(e,t,r,n,i){const s={item:[...a],group:[...c],event:[...u]}[t];
29if(r.some((e=>!s.includes(e))))throw new Error(`Requested catalogs must be of the same targetEntity type: ${t}`);return r.map((r=>p(e,r,t,Object.assign(Object.assign({},i||{}),{user:n.currentUser,context:n}))))}function p(e,t,r,n){switch(r){case"item":return function(e,t,r){let n;e=l(e);const o=(0,s.W)(r,"filters")||[],a=(0,s.W)(r,"context"),c=g(e,"item",null==r?void 0:r.collectionNames);switch(t){case"myContent":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:r.user.username}]},...o],c,"item");break;case"favorites":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{group:r.user.favGroupId}]},...o],c,"item");break;case"organization":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:r.user.orgId}]},...o],c,"item");break;case"partners":const s=a.trustedOrgIds.filter((e=>e!==a.currentUser.orgId&&e!==m(a)));s.length&&(n=(0,i.Y)(e,t,[{predicates:[{orgid:s,searchUserAccess:"includeTrustedOrgs"}]},...o],c,"item"));break;case"community":const u=m(a);u&&(n=(0,i.Y)(e,t,[{predicates:[{orgid:u}]},...o],c,"item",a.isCommunityOrg?function(e,t){return t.trustedOrgs.find((t=>t.to.orgId===e)).to.name}(u,a):void 0));break;case"livingAtlas":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:"Esri_LivingAtlas"}]}],c,"item");break;case"world":n=(0,i.Y)(e,t,[{predicates:[{type:{not:["code attachment"]}}]},...o],c,"item")}return n}(e,t,n);case"group":return function(e,t,r){let n;const{context:a,filters:c=[]}=r||{};e=l(e);const u=[{targetEntity:"group",key:t,label:t,scope:{targetEntity:"group",filters:[{predicates:[{q:"*"}]}]}}],d=(0,o.t)(a,"currentUser.groups",[]).reduce(((e,t)=>("admin"===t.userMembership.memberType&&e.push(t.id),e)),[]);switch(t){case"editGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:["updateitemcontrol"]}]},...c],u,"group");break;case"viewGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:{not:["updateitemcontrol"]}}]},...c],u,"group");break;case"allGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{capabilities:[""]}]},...c],u,"group");break;case"myGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:(0,s.W)(a,"currentUser.username")}]},...c],u,"group");break;case"orgGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(a,"currentUser.orgId"),searchUserAccess:"groupMember",searchUserName:(0,s.W)(a,"currentUser.username"),isviewonly:!1},{orgid:(0,s.W)(a,"currentUser.orgId"),id:d}]},...c],u,"group");break;case"communityGroups":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(a,"communityOrgId"),searchUserAccess:"groupMember",searchUserName:(0,s.W)(a,"currentUser.username"),isviewonly:!1},{orgid:(0,s.W)(a,"communityOrgId"),id:d}]},...c],u,"group");break;case"publicGroups":n=(0,i.Y)(e,t,[{predicates:[{access:"public"}]},...c],u,"group")}return n}(e,t,n);case"event":return function(e,t,r){let n;const{context:o,filters:a=[]}=r||{};e=l(e);const c=[{key:t,label:t,targetEntity:"event",include:[],scope:{targetEntity:"event",filters:[{predicates:[]}]}}];switch(t){case"myEvents":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{owner:(0,s.W)(o,"currentUser.id")}]},...a],c,"event");break;case"orgEvents":h(t,r),n=(0,i.Y)(e,t,[{predicates:[{orgid:(0,s.W)(o,"currentUser.orgId")}]},...a],c,"event");break;case"worldEvents":n=(0,i.Y)(e,t,[{predicates:[{access:["public","private","org"]}]},...a],c,"event")}return n}(e,t,n);default:throw new Error(`Wellknown catalog not implemented for "${r}"`)}}function h(e,t){if(!t||!t.user)throw new Error(`User needed to get "${e}" catalog`)}function m(e){const t=e.trustedOrgs.find((t=>t.from.orgId===e.currentUser.orgId));return e.isCommunityOrg&&t?t.to.orgId:e.communityOrgId}function f(e,t){return{appAndMap:{key:"appAndMap",label:`{{${e}collection.appsAndMaps:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:[...(0,n.P)("app"),...(0,n.P)("map")]}]}]}},dataset:{key:"dataset",label:`{{${e}collection.dataset:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("dataset")}]}]}},document:{key:"document",label:`{{${e}collection.documents:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("document")}]}]}},feedback:{key:"feedback",label:`{{${e}collection.feedback:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("feedback")}]}]}},site:{key:"site",label:`{{${e}collection.sites:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("site")}]}]}},template:{key:"template",label:`{{${e}collection.templates:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("template")}]}]}},project:{key:"project",label:`{{${e}collection.projects:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("project")}]}]}},initiative:{key:"initiative",label:`{{${e}collection.initiatives:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{predicates:[{type:(0,n.P)("initiative"),typekeywords:["hubInitiativeV2"]}]}]}},projectAndInitiative:{key:"projectAndInitiative",label:`{{${e}collection.projectsAndInitiatives:translate}}`,targetEntity:t,include:[],scope:{targetEntity:t,filters:[{operation:"OR",predicates:[{type:(0,n.P)("project")},{type:(0,n.P)("initiative"),typekeywords:["hubInitiativeV2"]}]}]}}}}function g(e,t,r){const n=f(e=l(e),t);return((null==r?void 0:r.length)?r:["appAndMap","dataset","document","feedback","site","project"]).reduce(((e,t)=>(n[t]&&e.push(n[t]),e)),[])}function y(e,t,r){return f(e=l(e),t)[r]}},684243:(e,t,r)=>{"use strict";r.d(t,{g:()=>T});var n=r(61285),i=r(656110),s=r(934647),o=r(50950);const a={name:"",tags:[],typeKeywords:["Hub Site","hubSite"],catalog:{schemaVersion:0},permissions:[],schemaVersion:1,features:r(281488).oj};var c=r(615555),u=r(247576),l=r(302776),d=r(304360),p=r(344472),h=r(367186),m=r(273640),f=r(26264),g=r(329644),y=r(178749),b=r(79865),v=r(466674),w=r(85738),S=r(144219),E=r(741619);class T extends i.x{constructor(e,t){super(e,t),this._catalogCache={},this._catalog=n.g.fromJson(e.catalog,this.context)}get catalog(){return this._catalog}static fromJson(e,t){const r=this.applyDefaults(e,t);return new T(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=T.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,c.IN)(e,t.hubRequestOptions);return T.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Site not found."):e}}static applyDefaults(e,t){var r;e.orgUrlKey||(e.orgUrlKey=null===(r=t.portal)||void 0===r?void 0:r.urlKey);const n=Object.assign(Object.assign({},a),e);return n.type=t.isPortal?c.TX:c.qf,n}update(e){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e),e.catalog&&(this._catalog=n.g.fromJson(this.entity.catalog,this.context))}async save(){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.entity.catalog=this._catalog.toJson(),this.entity.id?this.entity=await(0,c.L3)(this.entity,this.context.hubRequestOptions):this.entity=await(0,c.UW)(this.entity,this.context.hubRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubSite is already destroyed.");this.isDestroyed=!0,await(0,c.xb)(this.entity.id,this.context.hubRequestOptions)}async contains(e,t=[]){t.forEach((e=>{this._catalogCache[e.id]&&(e.catalog=this._catalogCache[e.id])}));const r=[...t,{id:this.id,hubEntityType:"site",catalog:this._catalog.toJson()}],n=await(0,u.h)(e,"content",r,this.context);
29return Object.keys(n.catalogInfo).forEach((e=>{e!==this.id&&(this._catalogCache[e]=n.catalogInfo[e].catalog)})),n}async searchVersions(){return(0,l.A)(this.entity.id,this.context.userRequestOptions)}async getVersion(e){return(0,d.b)(this.entity.id,e,this.context.userRequestOptions)}async createVersion(e){const t=new y.c7((0,b.s)()).entityToStore(this.entity,{});return(0,p.h)(t,this.context.userRequestOptions,e)}async updateVersion(e){const t=new y.c7((0,b.s)()).entityToStore(this.entity,{});return(0,h.S)(t,e,this.context.userRequestOptions)}async updateVersionMetadata(e){return(0,m.V)(this.entity.id,e,this.entity.owner,this.context.userRequestOptions)}async deleteVersion(e){return(0,f.h)(this.entity.id,e,this.entity.owner,this.context.userRequestOptions)}async getEditorConfig(e,t){return(0,s.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){const r=t.length?await(0,o.t)((0,g.kI)(this.entity),t,this.context.hubRequestOptions):(0,g.kI)(this.entity);(0,v.t)("_followers.showFollowAction",this.entity.features["hub:site:feature:follow"],r),r._slug=(0,S.y)(this.entity);const n=await this.getFollowersGroup();if((0,v.t)("_followers.isDiscussable",(0,w.BV)(n),r),r._discussions=this.entity.features["hub:site:feature:discussions"],!r._urlInfo){const{url:e,subdomain:t,defaultHostname:n}=r;r._urlInfo={url:e,subdomain:t,defaultHostname:n}}return r}async fromEditor(e){var t,r,n;e._thumbnail&&(e._thumbnail.blob?this.thumbnailCache={file:e._thumbnail.blob,filename:e._thumbnail.fileName,clear:!1}:this.thumbnailCache={clear:!0}),delete e._thumbnail,(null===(t=e._followers)||void 0===t?void 0:t.isDiscussable)&&await this.setFollowersGroupIsDiscussable(e._followers.isDiscussable),(null===(r=e._followers)||void 0===r?void 0:r.groupAccess)&&await this.setFollowersGroupAccess(e._followers.groupAccess);const i=(0,E.i)(e,this.context.portal);i.features=Object.assign(Object.assign({},i.features),{"hub:site:feature:follow":null===(n=e._followers)||void 0===n?void 0:n.showFollowAction,"hub:site:feature:discussions":e._discussions});const{url:s,subdomain:o,defaultHostname:a}=e._urlInfo;return i.url=s,i.subdomain=o,i.defaultHostname=a,this.entity=i,await this.save(),this.entity}}},615555:(e,t,r)=>{"use strict";r.d(t,{TX:()=>W,qf:()=>B,cC:()=>Z,EP:()=>Q,UW:()=>K,xb:()=>Y,nK:()=>X,IN:()=>J,L3:()=>z});var n=r(170209),i=r(610924),s=r(487706),o=r(178749),a=r(625873),c=r(266243),u=r(330836),l=r(815985),d=r(295426),p=r(653609),h=r(329644),m=r(902815),f=r(721347),g=r(184488),y=r(281488),b=r(578506),v=r(389094);function w(e,t){const r=(0,v.g)(e,t);return Object.assign(Object.assign({},r),{self:e.url,layoutRelative:"/edit"})}var S=r(669932),E=r(79865),T=r(8238),I=r(407267),C=r(318820),A=r(408923),O=r(67869),_=r(973453),D=r(404091),P=r(822406),k=r(980018),x=r(76309),R=r(466674),U=r(85738),M=r(469803),N=r(551753),j=r(232413);function $(e){var t;const r={groups:[]};if(null===(t=e.scopes)||void 0===t?void 0:t.item){const t=(0,j.l8)(e.scopes.item);t&&(r.groups=(0,N.t)(t,"group.any",[]))}return r}var F=r(189075);const G=(e,t)=>{let r={};((0,a.W)(t,"data.values.capabilities")||[]).forEach((e=>{r[e]=!0}));const n=(0,a.W)(e,"data.settings.features")||{};r=F.c.reduce(((e,t)=>{const r=t.negate?!n[t.feature]:n[t.feature];return Object.assign(Object.assign({},e),{[t.capability]:r})}),r);const i=Object.entries(r).reduce(((e,[t,r])=>(r&&e.push(t),e)),[]);return(0,R.t)("data.values.capabilities",i,e),e};var L=r(923018),H=r(422985);const B="Hub Site Application",W="Site Application",q={name:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],legacyCapabilities:["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav","socialSharing"],catalog:{schemaVersion:1},subdomain:"",defaultHostname:"",customHostname:"",clientId:"",map:null,feeds:{},pages:[],theme:null,contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}},telemetry:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,title:"",headerType:"default",menuLinks:[],schemaVersion:3,showTitle:!0}}}}},V={item:{title:"",description:"",snippet:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],properties:{slug:"",orgUrlKey:"",defaultHostname:"",customHostname:"",clientId:"",subdomain:"",schemaVersion:1.5},url:""},data:{catalog:{groups:[]},feeds:{},values:{title:"",defaultHostname:"",customHostname:"",subdomain:"",faviconUrl:"",uiVersion:"2.4",clientId:"",map:{basemaps:{}},defaultExtent:{},pages:[],theme:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,iframeHeight:"150px",iframeUrl:"",links:[],logoUrl:"",title:"default site",markdown:"",headerType:"default",schemaVersion:3,showLogo:!0,showTitle:!0,logo:{display:{},state:"valid"},shortTitle:"",menuLinks:[],socialLinks:{facebook:{},twitter:{},instagram:{},youtube:{}}}},showEditor:!1},footer:{component:{name:"site-footer",settings:{footerType:"none",markdown:"",schemaVersion:2.1}},showEditor:!1}},contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}}}};async function K(e,t){const r=Object.assign(Object.assign({},q),e),n=t.portalSelf;r.type=t.isPortal?W:B,r.slug||(r.slug=(0,T.fU)(r.name,r.orgUrlKey)),await(0,L.E)(r,t),r.subdomain||(r.subdomain=(0,I.l)(r.name)),r.subdomain=await(0,C.Z)(r.subdomain,t),t.isPortal?(r.typeKeywords.push(`hubsubdomain|${r.subdomain}`.toLowerCase()),r.url=`${t.authentication.portal.replace("/sharing/rest",H.me)}/#/${r.subdomain}`):(r.defaultHostname=`${r.subdomain}-${n.urlKey}.${(0,A.G)((0,O.g)(t))}`,r.url=`https://${r.customHostname?r.customHostname:r.defaultHostname}`),r.orgUrlKey=n.urlKey||"",r.theme||(r.theme=(0,_.$)(n)),r.defaultExtent||(r.defaultExtent=n.defaultExtent),r.culture||(r.culture=n.culture),(0,a.W)(r,"map.basemaps.primary")||(0,R.t)("map.basemaps.primary",n.defaultBasemap,r),(0,a.W)(r,"layout.header.component.settings.title")||(0,R.t)("layout.header.component.settings.title",r.name,r),r.typeKeywords=(0,U.Wb)(r.typeKeywords,r.isDiscussable);const i=new o.c7((0,E.s)());let s=i.entityToStore(r,(0,h.kI)(V));(0,a.W)(s,"data.catalog.scopes")&&(s.data.catalog=$(s.data.catalog)),s=await(0,D.NY)(s,t);const c=await(0,P.j)(s,t);s.data.values.clientId=c[0].clientKey;const u=await(0,D.QB)(s,t);return i.storeToEntity(u,{})}async function z(e,t){var r,n,i,l;await(0,L.E)(e,t),e.typeKeywords=(0,U.Wb)(e.typeKeywords,e.isDiscussable);const d=await(0,s.X)(e.id,t);let p=new o.c7((0,E.s)()).entityToStore(e,d);return null===(n=null===(r=p.data)||void 0===r?void 0:r.values)||void 0===n||delete n.telemetry,null===(l=null===(i=p.item)||void 0===i?void 0:i.properties)||void 0===l||delete l.telemetry,await async function(e,t,r){const n={clientKey:e.data.values.clientId,orgId:r.portalSelf.id,orgTitle:r.portalSelf.name,orgKey:r.portalSelf.urlKey,siteId:e.item.id,siteTitle:e.item.title,sslOnly:!0},i={remove:[],add:[]};["customHostname","defaultHostname"].forEach((r=>{const n=(0,a.W)(t,`data.values.${r}`)||"",s=(0,a.W)(e,`data.values.${r}`)||"";s.toLowerCase()!==n.toLowerCase()&&(i.remove.push(n),i.add.push(s))}));const s=[];return i.add.map((e=>{const t=Object.assign({hostname:e},n);s.push((0,c.j)(t,r))})),i.remove.map((e=>{s.push((0,u.P)(e,r))})),Promise.all(s)}(p,d,t),p.data.catalogV2=e.catalog,p=function(e){const t=(0,h.kI)(e),r={dataset:M.z.DATA,site:M.z.SITES,appAndMap:M.z.APPS_AND_MAPS,document:M.z.DOCUMENTS},n={[M.z.DATA]:"Dataset",[M.z.SITES]:"Site",[M.z.APPS_AND_MAPS]:"App,Map",[M.z.DOCUMENTS]:"Document"},i=(0,S.h)(t).collections.filter((e=>!!r[e.key])).map((e=>{var t;const i=r[e.key],s={hidden:!!(null===(t=e.displayConfig)||void 0===t?void 0:t.hidden),key:i,queryParams:{collection:n[i]}};return e.label&&(s.overrideText=e.label),s}));return t.data.values.searchCategories=i,t}(p),p=function(e,t){const r=(0,h.kI)(e),n=$((0,S.h)(r));return Array.isArray(n.groups)?(r.data.catalog=n,r):(r.data.catalog=(0,h.kI)(t.data.catalog),r)}(p,d),p=G(p,d),Q(await(0,D.QB)(p,t),t)}async function Y(e,t){t.isPortal||await(0,k.r)(e,t);const r=Object.assign(Object.assign({},t),{id:e});await(0,n.cl)(r)}async function J(e,t){return Q(await(0,s.X)(e,t),t)}function Q(e,t){const r=function(e){const t=(0,h.kI)(e);return t.data.permissions=t.data.permissions||[],[{prop:"item.properties.contentGroupId",type:"group",permissions:["hub:project:create"]},{prop:"item.owner",type:"user",permissions:["hub:site:delete"]}
29].forEach((e=>{const r=(0,a.W)(t,e.prop);r&&e.permissions.forEach((n=>{t.data.permissions.find((e=>e.permission===n&&e.collaborationId===r))||t.data.permissions.push({permission:n,collaborationType:e.type,collaborationId:r})}))})),t}(e);return function(e,t,r){var n;let i;r.authentication&&(i=r.authentication.token),t=(0,b.k)(e.item,t);const s=(0,m.S)(e.item,r,i);return t.thumbnailUrl=s,t.links=w(e.item,r),t.features=(0,g.U)((null===(n=e.data.settings)||void 0===n?void 0:n.features)||{},y.oj),t.catalog=(0,S.h)(e),t.catalog=(0,f.c)(t.catalog),t}(e,new o.c7((0,E.s)()).storeToEntity(r,{}),t)}async function Z(e,t){return Q(await(0,D.UO)(e,t),t)}async function X(e,t,r){e.type="Web Mapping Application"===e.type?"Hub Site Application":e.type;const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,i._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented"},location:(0,p.jA)(e),rawResult:e},s=(t=[...t].filter(h.Tw)).map(d.u),o=(0,x.e)("enrichment",s).filter(h.Tw);let c={};
29return o.length&&(c=await(0,l.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,a.W)(c,e.path)})),n.links=w(e,r),n}},281488:(e,t,r)=>{"use strict";r.d(t,{Xm:()=>s,bx:()=>o,oj:()=>n,pK:()=>i});const n={"hub:site:events":!1,"hub:site:content":!0,"hub:site:discussions":!1,"hub:site:feature:follow":!0,"hub:site:feature:discussions":!0,"hub:feature:ai-assistant":!1},i=["hub:site","hub:site:create","hub:site:delete","hub:site:edit","hub:site:view","hub:site:owner","hub:site:canChangeAccess","hub:site:events","hub:site:content","hub:site:discussions","hub:site:feature:follow","hub:site:feature:discussions","hub:site:workspace","hub:site:workspace:overview","hub:site:workspace:dashboard","hub:site:workspace:details","hub:site:workspace:settings","hub:site:workspace:collaborators","hub:site:workspace:catalog","hub:site:workspace:catalog:content","hub:site:workspace:catalog:events","hub:site:workspace:metrics","hub:site:workspace:followers","hub:site:workspace:followers:member","hub:site:workspace:followers:manager","hub:site:workspace:followers:create","hub:site:workspace:discussion","hub:site:workspace:pages","hub:site:workspace:events","hub:site:workspace:projects","hub:site:workspace:initiatives","hub:site:manage","hub:site:workspace:feeds"],s=[{permission:"hub:site",services:["portal"],licenses:["hub-basic","hub-premium","enterprise-sites"]},{permission:"hub:site:create",dependencies:["hub:site"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:site:view",dependencies:["hub:site"],authenticated:!1},{permission:"hub:site:delete",dependencies:["hub:site"],authenticated:!0,entityDelete:!0},{permission:"hub:site:edit",entityEdit:!0,dependencies:["hub:site"],authenticated:!0},{permission:"hub:site:canChangeAccess",dependencies:["hub:site"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:site:events",dependencies:["hub:site:view"]},{permission:"hub:site:content",dependencies:["hub:site:edit"]},{permission:"hub:site:discussions",dependencies:["hub:site:view"]},{permission:"hub:site:feature:discussions",dependencies:["hub:site:view"],entityConfigurable:!0},{permission:"hub:site:feature:follow",dependencies:["hub:site:view"],entityConfigurable:!0},{permission:"hub:site:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:site:workspace:overview",availability:["alpha"],dependencies:["hub:site:workspace","hub:site:view"]},{permission:"hub:site:workspace:dashboard",dependencies:["hub:site:workspace","hub:site:view"]},{permission:"hub:site:workspace:details",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:settings",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:collaborators",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:catalog",dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:catalog:content",dependencies:["hub:site:workspace:catalog"]},{permission:"hub:site:workspace:catalog:events",licenses:["hub-premium"],dependencies:["hub:site:workspace:catalog","hub:event"]},{permission:"hub:site:workspace:pages",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:events",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:metrics",dependencies:["hub:site:workspace","hub:site:edit"],environments:["devext","qaext"]},{permission:"hub:site:workspace:followers",licenses:["hub-premium"],dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:followers:member",dependencies:["hub:site:workspace:followers"],assertions:[{property:"context:currentUser",type:"is-group-member",value:"entity:followersGroupId"}]},{permission:"hub:site:workspace:followers:manager",dependencies:["hub:site:workspace:followers"],assertions:[{property:"context:currentUser",type:"is-group-admin",value:"entity:followersGroupId"}]},{permission:"hub:site:workspace:followers:create",dependencies:["hub:site:workspace:followers","hub:group:create"],privileges:["portal:user:addExternalMembersToGroup"]},{permission:"hub:site:workspace:discussion",services:["discussions"],dependencies:["hub:site:workspace","hub:site:edit"]},{permission:"hub:site:workspace:projects",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:workspace:initiatives",dependencies:["hub:site:workspace","hub:site:edit"],availability:["alpha"]},{permission:"hub:site:manage",dependencies:["hub:site:edit"]},{permission:"hub:site:workspace:feeds",dependencies:["hub:site:workspace","hub:site:edit"],environments:["devext","qaext","production"]}],o=["data.values.layout","data.values.theme","data.values.headContent"]},810938:(e,t,r)=>{"use strict";r.d(t,{getSiteSchema:()=>o,r:()=>s});var n=r(255582),i=r(434164);
29const s=["hub:site:edit","hub:site:create","hub:site:followers","hub:site:discussions","hub:site:settings"],o=e=>Object.assign(Object.assign({$async:!0},i.N),{properties:Object.assign(Object.assign({},i.N.properties),{name:n.De,_discussions:n.PH,telemetry:n.Vh,_urlInfo:{type:"object",isUniqueDomain:{siteId:e},required:["subdomain"],properties:{subdomain:{type:"string",format:"slug"}}}})})},774109:(e,t,r)=>{"use strict";r.d(t,{B:()=>a});var n=r(936709),i=r(625873),s=r(466674),o=r(329644);function a(e){if((0,i.W)(e,"item.properties.schemaVersion")>=1.4)return e;const t=(0,o.kI)(e),r=(0,i.W)(t,"data.values.gacode");return t.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(r),id:r}}}},(0,n.f)(t,"data.values.gacode"),(0,s.t)("item.properties.schemaVersion",1.4,t),t}},806984:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(466674),i=r(329644);function s(e){var t;if((null===(t=e.item.properties)||void 0===t?void 0:t.schemaVersion)>=1.6)return e;const r=(0,i.kI)(e);return r.data.values.layout.sections.map((e=>Object.assign(Object.assign({},e),{rows:(e.rows||[]).map((e=>Object.assign(Object.assign({},e),{cards:(e.cards||[]).map((e=>("event-list-card"===e.component.name&&(e.component.settings.displayMode=e.component.settings.calendarEnabled?"calendar":"list",delete e.component.settings.calendarEnabled),e)))})))}))),(0,n.t)("item.properties.schemaVersion",1.6,r),r}},935899:(e,t,r)=>{"use strict";r.d(t,{j:()=>s});var n=r(625873),i=r(329644);function s(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.5)return e;const t=(0,i.kI)(e),r=t.data.values.dcatConfig;return t.data.feeds={},r&&(t.data.feeds.dcatUS11=function(e){let t=JSON.stringify(e);return Object.keys(o).forEach((e=>{const r=o[e];t=t.split(e).join(r)})),JSON.parse(t)}(r)),t.item.properties.schemaVersion=1.5,t}const o={"{{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:[email protected]}}":"{{orgContactEmail || mailto:[email protected]}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"}},822362:(e,t,r)=>{"use strict";r.d(t,{U:()=>s});var n=r(625873),i=r(329644);function s(e){const t=(0,i.kI)(e),r=(0,n.W)(e,"data.values.capabilities");return r&&(t.data.values.capabilities=r.filter((e=>"underlinedLinks"!==e))),t}},978701:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var n=r(625873),i=r(466674),s=r(329644);function o(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.8)return e;const t=(0,s.kI)(e);t.data.telemetry={};const r=((0,n.W)(e,"data.values.capabilities")||[]).includes("consentNotice");t.data.telemetry.consentNotice={allowPrivacyConfig:r,disclaimer:[{text:(0,n.W)(e,"data.values.telemetry.consentNotice.consentText")||"",default:!0}],policyURL:(0,n.W)(e,"data.values.telemetry.consentNotice.policyURL")||""};const o=(0,n.W)(e,"item.properties.telemetry.plugins");return o&&(t.data.telemetry.plugins=o),(0,i.t)("item.properties.schemaVersion",1.8,t),t}},750888:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(625873),i=r(466674),s=r(329644),o=r(669932);function a(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.9)return e;const t=(0,s.kI)(e),r=(0,o.h)(t);return t.data.catalogV2=r,(0,i.t)("item.properties.schemaVersion",1.9,t),t}},189075:(e,t,r)=>{"use strict";r.d(t,{c:()=>n});const n=[{capability:"hideFollow",feature:"hub:site:feature:follow",negate:!0},{capability:"disableDiscussions",feature:"hub:site:feature:discussions",negate:!0}]},79865:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"feeds",storeKey:"data.feeds"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),["pages","theme","subdomain","defaultHostname","customHostname","clientId","defaultExtent","map","headerSass","headContent","layout","isUmbrella"].forEach((t=>{e.push({entityKey:t,storeKey:`data.values.${t}`})})),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"initiatives",storeKey:"data.initiatives"}),e.push({entityKey:"projects",storeKey:"data.projects"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"slug",storeKey:"item.properties.slug"}),e.push({entityKey:"followersGroupId",storeKey:"item.properties.followersGroupId"}),e.push({entityKey:"legacyCapabilities",storeKey:"data.values.capabilities"}),e.push({entityKey:"orgUrlKey",storeKey:"item.properties.orgUrlKey"}),e.push({entityKey:"name",storeKey:"item.title"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"legacyTeams",storeKey:"item.properties.teams"}),e.push({entityKey:"isHubHome",storeKey:"item.properties.isHubHome"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"telemetry",storeKey:"data.telemetry"}),e}},358274:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(625873),i=r(329644);function s(e){if((0,n.W)(e,"data.values.map.basemaps"))return e;if((0,n.W)(e,"data.values.map.baseMapLayers")){const t=(0,i.kI)(e),r=(0,n.W)(e,"data.values.map.baseMapLayers"),s=(0,n.W)(e,"data.values.map.title");return delete t.data.values.map.baseMapLayers,delete t.data.values.map.title,t.data.values.map.basemaps={primary:{baseMapLayers:r,title:s}},t}return e}},797303:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var n=r(625873),i=r(551753);function s(e){const t="Web Mapping Application"===(0,n.W)(e,"item.type"),r=(0,i.t)(e,"item.typeKeywords",[]).includes("hubSite");return t&&r&&(e.item.type="Hub Site Application"),e}},469803:(e,t,r)=>{"use strict";var n;r.d(t,{z:()=>n}),function(e){e.DATA="components.search.category_tabs.data",e.SITES="components.search.category_tabs.sites",e.DOCUMENTS="components.search.category_tabs.documents",e.APPS_AND_MAPS="components.search.category_tabs.apps_and_maps",e.EVENTS="components.search.category_tabs.events",e.INITIATIVES="components.search.category_tabs.initiatives"}(n||(n={}))},420005:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});const n=["dataset","document","site","appAndMap"]},95134:(e,t,r)=>{"use strict";async function n(e){return e.status>
29=200&&e.status<300?e.json():e.json().then((t=>{if(t.error)throw new Error(`${t.error.title} :: ${t.error.detail} :: ${e.status}`);throw new Error(`Got ${e.status} ${e.statusText}`)}))}r.d(t,{a:()=>n})},700802:(e,t,r)=>{"use strict";r.d(t,{z:()=>s});var n=r(329644),i=r(872465);function s(e,t){let r=(0,n.kI)(e),s=63;return t&&(s-=t.length+1),r.length>s&&(r=`${r.slice(0,s-6)}-${(0,i.z)(5)}`),r}},74743:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(625873);function i(e){const t={},r=(0,n.W)(e,"authentication.token");return r&&(t.Authorization=r),t}},800530:(e,t,r)=>{"use strict";function n(e){return`${e||"https://hub.arcgis.com"}/api/v3/domains`}r.d(t,{l:()=>n})},587707:(e,t,r)=>{"use strict";r.d(t,{f:()=>s});var n=r(170209),i=r(620450);function s(e,t){let r=e;e.indexOf("#/")>-1&&(r=e.split("#/")[1]);const s=`hubsubdomain|${r}`,o=Object.assign({q:`typekeywords: ${s}`},t);return(0,n.KT)(o).then((e=>e.results.filter((e=>(0,i.q)(e.typeKeywords,s)))[0])).then((e=>{if(!e)throw new Error("site not found");return{hostname:e.url,siteId:e.id}}))}},266243:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(74743),i=r(800530),s=r(95134);function o(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}`,a=e.siteTitle;return"number"==typeof a&&(e.siteTitle=a.toString()),e.clientKey&&(e.clientKey=""),fetch(o,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(s.a)}},822406:(e,t,r)=>{"use strict";r.d(t,{j:()=>s});var n=r(625873),i=r(266243);function s(e,t){if(t.isPortal)return Promise.resolve([{clientKey:"arcgisonline"}]);{const r=["defaultHostname","customHostname"];return Promise.all(r.reduce(((r,s)=>{const o=(0,n.W)(e,`data.values.${s}`);if(o){const n={hostname:o,clientKey:e.data.values.clientId,orgId:t.portalSelf.id,orgTitle:t.portalSelf.name,orgKey:t.portalSelf.urlKey,siteId:e.item.id,siteTitle:e.item.title,sslOnly:!0};r.push((0,i.j)(n,t))}return r}),[]))}}},240636:(e,t,r)=>{"use strict";r.d(t,{j:()=>i});var n=r(587707);function i(e,t){return(0,n.f)(e,t).then((e=>!0)).catch((e=>!1))}},333068:(e,t,r)=>{"use strict";r.d(t,{B:()=>o});var n=r(800530),i=r(74743),s=r(408923);function o(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=(0,s.G)(e);const r=`${(0,n.l)(t.hubApiUrl)}/${e}`,o=(0,i.i)(t);return fetch(r,{method:"GET",headers:o,mode:"cors"}).then((e=>404!==e.status))}},318820:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(519851),i=r(505247),s=r(700802),o=r(408923),a=r(67869);function c(e,t){let r;if(t.isPortal)r=(0,n.g)(e,t);else{const n=`${t.portalSelf.urlKey}.${(0,o.G)((0,a.g)(t))}`;r=(0,i.Q)(e,n,t)}return r.then((e=>(0,s.z)(e,t.portalSelf.urlKey)))}},519851:(e,t,r)=>{"use strict";r.d(t,{g:()=>i});var n=r(240636);function i(e,t,r=0){let s=e;return r&&(s=e+"-"+r),(0,n.j)(s,t).then((n=>n?i(e,t,r+1):s))}},505247:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});var n=r(333068);function i(e,t,r,s=0){let o=e;s&&(o=e+"-"+s);const a=`${o}-${t}`;return(0,n.B)(a,r).then((n=>n?i(e,t,r,s+1):o))}},508127:(e,t,r)=>{"use strict";r.d(t,{ah:()=>n.a,zY:()=>S.z,i7:()=>i.i,lf:()=>s.l,fU:()=>o.f,jc:()=>a.j,jS:()=>T.j,B$:()=>c.B,jZ:()=>u.j,Zo:()=>E.Z,Y0:()=>l,Ql:()=>d.Q,g9:()=>p.g,d$:()=>m,q$:()=>g,hS:()=>y,FC:()=>f.F,$Z:()=>b.$,Pi:()=>I.P,r1:()=>v.r,gK:()=>w});var n=r(95134),i=r(74743),s=r(800530),o=r(587707),a=r(266243),c=r(333068),u=r(240636);function l(e,t){if(t.isPortal)return Promise.resolve([]);const r=`${(0,s.l)(t.hubApiUrl)}?siteId=${e}`,o=(0,i.i)(t);return fetch(r,{method:"GET",headers:o,mode:"cors"}).then(n.a).catch((e=>{throw Error(`Error in getDomainsForSite ${e}`)}))}var d=r(505247),p=r(519851),h=r(869787);function m(e){return!(0,h.k)(e.siteId)}var f=r(380459);function g(e,t,r){return(0,f.F)(e,r).then((e=>e.siteId!==t)).catch((()=>!1))}function y(e,t){if(t.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");const r=`${(0,s.l)(t.hubApiUrl)}/validate?hostname=${e}`,n=(0,i.i)(t);return fetch(r,{method:"GET",headers:n,mode:"cors"}).then((e=>e.json())).catch((t=>({success:!1,input:e,error:{code:400,detail:t,message:"lookupFailed"}})))}var b=r(32410),v=r(980018);function w(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,i.i)(t);r["Content-Type"]="application/json";const o=`${(0,s.l)(t.hubApiUrl)}/${e.id}`,a=e.siteTitle;return"number"==typeof a&&(e.siteTitle=a.toString()),e.clientKey&&(e.clientKey=""),fetch(o,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(n.a)}var S=r(700802),E=r(318820),T=r(822406),I=r(330836)},380459:(e,t,r)=>{"use strict";r.d(t,{F:()=>a});var n=r(587707),i=r(800530),s=r(74743),o=r(95134);function a(e,t){if(t.isPortal)return(0,n.f)(e,t);{const r=`${(0,i.l)(t.hubApiUrl)}/${e}`,n=(0,s.i)(t);return fetch(r,{method:"GET",headers:n,mode:"cors"}).then(o.a)}}},32410:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(74743),i=r(800530),s=r(95134);function o(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}/${e}`;return fetch(o,{method:"DELETE",headers:r,mode:"cors"}).then(s.a)}},980018:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(74743),i=r(800530),s=r(95134);function o(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");const r=(0,n.i)(t);r["Content-Type"]="application/json";const o=`${(0,i.l)(t.hubApiUrl)}/?siteId=${e}`;return fetch(o,{method:"DELETE",headers:r,mode:"cors"}).then(s.a)}},330836:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(380459),i=r(32410),s=r(625873);async function o(e,t){if(t.isPortal)throw new Error("removeDomainByHostname is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");try{const r=await(0,n.F)(e,t),o=(0,s.W)(r,"id");o&&await(0,i.$)(o,t)}catch(t){throw new Error(`Error removing domain entry for ${e}: ${t}`)}}},902188:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(689275);function i(e,t){return(0,n.P)(e,{},t)}},320213:(e,t,r)=>{"use strict";r.d(t,{E:()=>s,_:()=>i});var n=r(58844);function i(e,t,r){if("dcat-us"===t)return function(e,t){if("1"===(0,n.X)(t))return e.data.feeds.dcatUS1X||e.data.feeds.dcatUS11;throw new Error("Unsupported DCAT US version")}(e,r);if("dcat-ap"===t)return function(e,t){if("2"===(0,n.X)(t))return e.data.feeds.dcatAP2XX||e.data.feeds.dcatAP201;throw new Error("Unsupported DCAT AP version")}(e,r);if("rss"===t)return function(e,t){if("2"===(0,n.X)(t))return e.data.feeds.rss2;throw new Error("Unsupported RSS version")}(e,r);throw new Error("Unsupported feed format")}function s(e,t,r,i){if("dcat-us"!==t)if("dcat-ap"!==t){if("rss"!==t)throw new Error("Unsupported feed format");!function(e,t,r){if("2"!==(0,n.X)(t))throw new Error("Unsupported RSS Version");e.data.feeds.rss2=r}(e,r,i)}else!function(e,t,r){if("2"!==(0,n.X)(t))throw new Error("Unsupported DCAT AP Version");e.data.feeds.dcatAP2XX=r}(e,r,i);else!function(e,t,r){if("1"!==(0,n.X)(t))throw new Error("Unsupported DCAT US Version");e.data.feeds.dcatUS1X=r}(e,r,i)}},58844:(e,t,r)=>{"use strict";function n(e){return e.split(".")[0]}r.d(t,{X:()=>n})},784340:(e,t,r)=>{"use strict";r.d(t,{d:()=>u});var n=r(329644),i=r(58844);const s={title:"{{name}}",description:"{{description}}",keyword:"{{tags}}",issued:"{{created:toISO}}",modified:"{{modified:toISO}}",publisher:{name:"{{source}}"},contactPoint:{fn:"{{owner}}",hasEmail:"{{orgContactEmail}}"},spatial:"{{extent:computeSpatialProperty}}"},o={"dct:title":"{{ name}}","dct:description":"{{ description}}","dct:issued":{"@value":"{{ metadata.metadata.dataIdInfo.idCitation.date.pubDate:toISO || metadata.metadata.dataIdInfo.idCitation.date.createDate:toISO || created:toISO }}","@type":"xsd:dateTime"}},a={"dct:title":"{{name}}","dct:description":"{{description}}","dcat:contactPoint":{"vcard:fn":"{{owner}}","vcard:hasEmail":"{{orgContactEmail}}"}},c={channel:{title:"{{name}}",description:"{{searchDescription}}",link:"{{siteUrl}}",language:"{{culture}}",category:"{{categories}}",item:{title:"{{name}}",description:"{{searchDescription}}",author:"{{orgContactEmail}}",category:"{{categories}}",pubDate:"{{created:toUTC}}"}}};function u(e){const{feedsConfig:t,format:r,version:u}=e;let l;if("dcat-us"===r)l=function(e,t){if("1"===(0,i.X)(t)){const t=e.dcatUS1X||e.dcatUS11;return t&&"string"==typeof t.spatial&&"{{extent}}"===t.spatial.replace(/\s/g,"")&&(t.spatial="{{extent:computeSpatialProperty}}"),t}if("3"===(0,i.X)(t))return e.dcatUS3X;throw new Error("Unsupported DCAT US version")}(t,u);else if("dcat-ap"===r)l=function(e,t){if("2"===(0,i.X)(t))return e.dcatAP2XX||e.dcatAP201;throw new Error("Unsupported DCAT AP version")}(t,u);else{if("rss"!==r)throw new Error("Unsupported feed format");l=function(e,t){if("2"===(0,i.X)(t))return e.rss2;throw new Error("Unsupported RSS version")}(t,u)}return l||function(e,t){const r=(0,i.X)(t),u={"dcat-us":{1:s,3:o},"dcat-ap":{2:a},rss:{2:c}};return(0,n.kI)(u[e][r])}(r,u)}},750281:(e,t,r)=>{"use strict";async function n(e){const{format:t,version:r,previewHubId:n,context:i}=e,s=JSON.stringify(e.previewTemplate),o=`${i.hubUrl}/api/feed/${t}/${r}`,a=new URLSearchParams;a.set("id",n);const c="rss"===t;
29a.set(c?"rssConfig":"dcatConfig",s);const u=await fetch(`${o}?${a.toString()}`);if(!u.ok)throw new Error(`Failed to preview feed: ${u.statusText}`);let l;if(c){const e=await u.text();l=decodeURIComponent(e)}else{const e=await u.json();l=JSON.stringify(e,null,2)}return l}r.d(t,{x:()=>n})},4135:(e,t,r)=>{"use strict";r.d(t,{K:()=>s});var n=r(329644),i=r(58844);function s(e){const{feedsConfig:t,format:r,version:s,updatedTemplate:o}=e,a=(0,n.kI)(t);if("dcat-us"===r)!function(e,t,r){if("1"!==(0,i.X)(t)){if("3"!==(0,i.X)(t))throw new Error("Unsupported DCAT US Version");e.dcatUS3X=r}else e.dcatUS1X=r}(a,s,o);else if("dcat-ap"===r)!function(e,t,r){if("2"!==(0,i.X)(t))throw new Error("Unsupported DCAT AP Version");e.dcatAP2XX=r}(a,s,o);else{if("rss"!==r)throw new Error("Unsupported feed format");!function(e,t,r){if("2"!==(0,i.X)(t))throw new Error("Unsupported RSS Version");e.rss2=r}(a,s,o)}return a}},665593:()=>{},487706:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(408923),i=r(869787),s=r(380459),o=r(329709);function a(e,t){let r;if((0,i.k)(e))r=(0,o.D)(e,t);else{let i=e;i=(0,n.G)(i),i=i.split("/")[0],r=(0,s.F)(i,t).then((({siteId:e})=>(0,o.D)(e,t)))}return r}},669932:(e,t,r)=>{"use strict";r.d(t,{h:()=>u});var n=r(329644),i=r(551753),s=r(721347),o=r(625873),a=r(466674),c=r(964391);function u(e){if(e.data.catalogV2)return e.data.catalogV2;let t=(0,n.kI)(e);return t=function(e){const t=(0,i.t)(e,"data.catalog",{});if(!t.schemaVersion){const r=(0,n.kI)(e);return r.data.catalog=(0,s.c)(t),(0,o.W)(r,"data.values.isUmbrella")&&(r.data.catalog.scopes.item.filters=[{predicates:[{openData:!0}]}],r.data.catalog.scopes.event.filters=[]),r.data.catalog.title="Default Site Catalog",r}return e}(t),t=function(e){const t=(0,i.t)(e.data,"values.searchCategories",void 0),r=(0,c.n)(t);return(0,o.W)(e,"data.values.isUmbrella")&&r.forEach((e=>{e.displayConfig.hidden=!1})),(0,a.t)("data.catalog.collections",r,e),e}(t),t.data.catalog}},329709:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(404091),i=r(205438);function s(e,t){return(0,n.PD)(e,t).then(i.d)}},328948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DEFAULT_THEME:()=>b.t,ENTERPRISE_SITE_ITEM_TYPE:()=>g.TX,HUB_SITE_ITEM_TYPE:()=>g.qf,HubSite:()=>f.g,SITE_SCHEMA_VERSION:()=>y.w,_checkStatusAndParseJson:()=>d.ah,_ensureSafeDomainLength:()=>d.zY,_ensureTelemetry:()=>n.B,_getAuthHeader:()=>d.i7,_getDomainServiceUrl:()=>d.lf,_lookupPortal:()=>d.fU,_migrateEventListCardConfigs:()=>s.D,_migrateFeedConfig:()=>i.j,_migrateLinkUnderlinesCapability:()=>c.U,_migrateTelemetryConfig:()=>o.h,_migrateToV2Catalog:()=>l.k,addDomain:()=>d.jc,addSiteDomains:()=>d.jS,buildDraft:()=>p.n,convertItemToSite:()=>g.cC,convertModelToSite:()=>g.EP,createSite:()=>g.UW,defaultSiteCollectionKeys:()=>_.b,deleteSite:()=>g.xb,domainExists:()=>d.B$,domainExistsPortal:()=>d.jZ,enrichSiteSearchResult:()=>g.nK,ensureUniqueDomainName:()=>d.Zo,fetchSite:()=>g.IN,fetchSiteModel:()=>h.X,getCatalogFromSiteModel:()=>O.h,getDomainsForSite:()=>d.Y0,getFeedConfiguration:()=>w._,getFeedTemplate:()=>E.d,getOrgDefaultTheme:()=>b.$,getSiteById:()=>m.D,getUniqueDomainName:()=>d.Ql,getUniqueDomainNamePortal:()=>d.g9,isDomainForLegacySite:()=>d.d$,isDomainUsedElsewhere:()=>d.q$,isValidDomain:()=>d.hS,lookupDomain:()=>d.FC,migrateBadBasemap:()=>a.G,migrateWebMappingApplicationSites:()=>u.N,previewFeed:()=>I.x,reharvestSiteCatalog:()=>S.m,removeDomain:()=>d.$Z,removeDomainByHostname:()=>d.Pi,removeDomainsBySiteId:()=>d.r1,searchCategoriesToCollections:()=>D.n,setFeedConfiguration:()=>w.E,setFeedTemplate:()=>T.K,updateDomain:()=>d.gK,updateSite:()=>g.L3,upgradeSiteSchema:()=>v.d});var n=r(774109),i=r(935899),s=r(806984),o=r(978701),a=r(358274),c=r(822362),u=r(797303),l=r(750888),d=r(508127),p=r(902188),h=r(487706),m=r(329709),f=r(684243),g=r(615555),y=r(193258),b=r(973453),v=r(205438),w=r(320213),S=r(61247),E=r(784340),T=r(4135),I=r(750281),C=r(665593),A={};for(const e in C)["default","defaultSiteCollectionKeys","_ensureTelemetry","_migrateFeedConfig","_migrateEventListCardConfigs","_migrateTelemetryConfig","migrateBadBasemap","_migrateLinkUnderlinesCapability","migrateWebMappingApplicationSites","_migrateToV2Catalog","_checkStatusAndParseJson","_ensureSafeDomainLength","_getAuthHeader","_getDomainServiceUrl","_lookupPortal","addDomain","addSiteDomains","domainExists","domainExistsPortal","ensureUniqueDomainName","getDomainsForSite","getUniqueDomainName","getUniqueDomainNamePortal","isDomainForLegacySite","isDomainUsedElsewhere","
29isValidDomain","lookupDomain","removeDomain","removeDomainByHostname","removeDomainsBySiteId","updateDomain","buildDraft","fetchSiteModel","getSiteById","HubSite","ENTERPRISE_SITE_ITEM_TYPE","HUB_SITE_ITEM_TYPE","convertItemToSite","convertModelToSite","createSite","deleteSite","enrichSiteSearchResult","fetchSite","updateSite","SITE_SCHEMA_VERSION","DEFAULT_THEME","getOrgDefaultTheme","upgradeSiteSchema","getFeedConfiguration","setFeedConfiguration","reharvestSiteCatalog","getFeedTemplate","setFeedTemplate","previewFeed"].indexOf(e)<0&&(A[e]=()=>C[e]);r.d(t,A);var O=r(669932),_=r(420005),D=r(964391)},61247:(e,t,r)=>{"use strict";async function n(e,t){const r=`${t.hubUrl}/api/v3/jobs/site/${e}/harvest`,n={method:"POST",headers:{"content-type":"application/json",authorization:t.hubRequestOptions.authentication.token}};return fetch(r,n).then((e=>e.json())).then((e=>{const t={};return e.groups&&(t.groups=e.groups),e.message&&(t.error=e),t}))}r.d(t,{m:()=>n})},964391:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var n=r(469803),i=r(420005);function s(e){const t=i.b.reduce(((e,t)=>{const r="appAndMap"===t?[{type:{any:["$app","$map"]}}]:[{type:{any:[`$${t}`]}}];return e[t]={label:null,key:t,include:[],targetEntity:"item",scope:{targetEntity:"item",filters:[{predicates:r}]},displayConfig:{hidden:!1}},e}),{}),r={[n.z.DATA]:"dataset",[n.z.INITIATIVES]:"site",[n.z.SITES]:"site",[n.z.DOCUMENTS]:"document",[n.z.APPS_AND_MAPS]:"appAndMap"},s=[{key:n.z.SITES,hidden:!0},{key:n.z.DATA},{key:n.z.DOCUMENTS},{key:n.z.APPS_AND_MAPS}];return(e||s).filter((e=>e.key!==n.z.EVENTS)).filter((e=>!!r[e.key])).map((e=>{const n=r[e.key],i=t[n];return i.label=e.overrideText||null,i.displayConfig.hidden=!!e.hidden,i}))}},193258:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});const n=1.9},973453:(e,t,r)=>{"use strict";r.d(t,{$:()=>a,t:()=>o});var n=r(625873),i=r(538143),s=r(329644);const o={header:{background:"#fff",text:"#4c4c4c"},body:{background:"#fff",text:"#4c4c4c",link:"#0079c1"},button:{background:"#0079c1",text:"#fff"},logo:{small:""},fonts:{base:{url:"",family:"Avenir Next"},heading:{url:"",family:"Avenir Next"}}};function a(e){let t=(0,s.kI)(o),r=(0,n.W)(e,"portalProperties.sharedTheme");return r&&(r=(0,i.t)(r),t=(0,s.l7)(t,r)),t}},205438:(e,t,r)=>{"use strict";r.d(t,{d:()=>b});var n=r(625873),i=r(193258),s=r(329644),o=r(869787),a=r(774109),c=r(935899),u=r(806984),l=r(466674),d=r(189075);const p=e=>{const t={};let r={};((0,n.W)(e,"data.values.capabilities")||[]).forEach((e=>{t[e]=!0}));const i=(0,n.W)(e,"data.settings.features")||{};return r=d.c.reduce(((e,r)=>{const n=r.negate?!t[r.capability]:t[r.capability];return Object.assign(Object.assign({},e),{[r.feature]:n})}),i),(0,l.t)("data.settings.features",r,e),e};var h=r(978701),m=r(358274),f=r(797303),g=r(822362),y=r(750888);function b(e){return(0,n.W)(e,"item.properties.schemaVersion")!==i.w&&(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.3)return e;const t=(0,s.kI)(e),r=(0,n.W)(t,"data.catalog.groups")||[];return t.data.catalog.groups=r.filter(o.k),t.item.properties.schemaVersion=1.3,t}(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.2)return e;const t=(0,s.kI)(e),r=(0,n.W)(t,"data.catalog")||{};return(0,n.W)(t,"data.values.groups")&&(r.groups=(0,s.kI)(t.data.values.groups),delete t.data.values.groups),t.data.catalog=r,t.item.properties.schemaVersion=1.2,t}(e=function(e){if((0,n.W)(e,"item.properties.schemaVersion")>=1.1)return e;const t=(0,s.kI)(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach((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((0,n.W)(e,"item.properties.schemaVersion")>=1)return e;const t=(0,s.kI)(e);if(["groupId","title"].forEach((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)){const e=t.data.values.groups.map((e=>"object"==typeof e?e.id:e)).filter((e=>!!e));t.data.values.groups=e}return t}(e)))),e=(0,a.B)(e),e=(0,c.j)(e),e=(0,u.D)(e),e=p(e),e=(0,h.h)(e),e=(0,y.k)(e)),e=function(e){if((0,n.W)(e,"data.telemetry"))return e;const t=(0,s.kI)(e);return t.data.telemetry={},t}
29(e=(0,m.G)(e)),e=(0,f.N)(e),(0,g.U)(e)}},515084:(e,t,r)=>{"use strict";r.d(t,{V:()=>l});var n=r(656110),i=r(50950),s=r(934647);const o={schemaVersion:1,catalog:{schemaVersion:0},name:"",tags:[],typeKeywords:[]};var a=r(329644),c=r(681167),u=r(442730);class l extends n.x{static fromJson(e,t){const r=this.applyDefaults(e,t);return new l(r,t)}static async fetch(e,t){try{const r=await(0,u.g)(e,t.userRequestOptions);return l.fromJson(r,t)}catch(e){throw"CONT_0001: Item does not exist or is inaccessible."===e.message?new Error("Survey not found."):e}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},o),e)}update(e){if(this.isDestroyed)throw new Error("HubSurvey is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubSurvey is already destroyed.");this.entity.id&&(this.entity=await(0,c.e)(this.entity,this.context.userRequestOptions)),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubSurvey is already destroyed.");this.isDestroyed=!0,await(0,c.G)(this.entity.id,this.context.userRequestOptions)}getEditorConfig(e,t){return(0,s.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e,t=[]){return t.length?await(0,i.t)((0,a.kI)(this.entity),t,this.context.hubRequestOptions):(0,a.kI)(this.entity)}async fromEditor(e,t){var r,n;if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.fileName,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const i=(0,a.kI)(e)
30;return i.extent=null!==(n=null===(r=e.location)||void 0===r?void 0:r.extent)&&void 0!==n?n:[],this.entity=i,await this.save(),this.entity}}},491928:(e,t,r)=>{"use strict";r.d(t,{p:()=>n,w:()=>i});const n=["hub:survey","hub:survey:create","hub:survey:delete","hub:survey:edit","hub:survey:view","hub:survey:view:related","hub:survey:owner","hub:survey:canChangeAccess","hub:survey:workspace","hub:survey:workspace:dashboard","hub:survey:workspace:details","hub:survey:workspace:settings","hub:survey:workspace:collaborators","hub:survey:manage"],i=[{permission:"hub:survey",services:["portal"],licenses:["hub-basic","hub-premium"]},{permission:"hub:survey:view",dependencies:["hub:survey"]},{permission:"hub:survey:view:related",dependencies:["hub:survey:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:survey:create",authenticated:!0,dependencies:["hub:survey"],privileges:["features:user:edit","portal:publisher:publishFeatures","portal:user:createItem","portal:user:shareToGroup"]},{permission:"hub:survey:edit",authenticated:!0,dependencies:["hub:survey"],entityEdit:!0},{permission:"hub:survey:delete",authenticated:!0,dependencies:["hub:survey"],entityDelete:!0},{permission:"hub:survey:owner",dependencies:["hub:survey"],authenticated:!0,entityOwner:!0},{permission:"hub:survey:canChangeAccess",dependencies:["hub:survey"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:survey:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:survey:workspace:dashboard",dependencies:["hub:survey:workspace","hub:survey:view"]},{permission:"hub:survey:workspace:details",dependencies:["hub:survey:workspace","hub:survey:edit"]},{permission:"hub:survey:workspace:settings",dependencies:["hub:survey:workspace","hub:survey:edit"]},{permission:"hub:survey:workspace:collaborators",dependencies:["hub:survey:workspace","hub:survey:edit"]},{permission:"hub:survey:manage",dependencies:["hub:survey:edit"]}]},820824:(e,t,r)=>{"use strict";r.d(t,{M:()=>i,SurveySchema:()=>s});var n=r(434164);const i=["hub:survey:edit","hub:survey:settings"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign({displayMap:{type:"boolean",enum:[!0,!1],default:!1},hasMapQuestion:{type:"boolean",enum:[!0,!1],default:!1}},n.N.properties)})},314689:(e,t,r)=>{"use strict";r.d(t,{F:()=>a});var n=r(578506),i=r(902815),s=r(464765),o=r(871147);function a(e,t,r){var a;let c;return r.authentication&&(c=r.authentication.token),(t=(0,n.k)(e.item,t)).thumbnailUrl=(0,i.S)(e.item,r,c),t.hasMapQuestion=(0,s.I)((null===(a=e.formJSON)||void 0===a?void 0:a.questions)||[]),t.displayMap=(0,o.K)(e.item),t}},969982:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){return(0,n.f)()}},577104:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});const n="hubMapSurvey"},681167:(e,t,r)=>{"use strict";r.d(t,{G:()=>p,e:()=>d});
30var n=r(170209),i=r(178749),s=r(314689),o=r(969982),a=r(85738),c=r(831543),u=r(404091),l=r(594113);async function d(e,t){e.typeKeywords=(0,a.Wb)(e.typeKeywords,e.isDiscussable),e.typeKeywords=(0,c.s)(e.typeKeywords,e.displayMap);const r=await(0,n.rV)(e.id,t),d={item:r};d.formJSON=await(0,l.C)(r,t);const p=new i.c7((0,o.s)()),h=p.entityToStore(e,d),m=await(0,u.QB)(h,t);let f=p.storeToEntity(m,e);return f=(0,s.F)(d,f,t),f}async function p(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,n.cl)(r)}},442730:(e,t,r)=>{"use strict";r.d(t,{g:()=>l,m:()=>d});var n=r(170209),i=r(178749),s=r(314689),o=r(969982),a=r(594113),c=r(869787),u=r(8238);async function l(e,t){let r;return r=(0,c.k)(e)?(0,n.rV)(e,t):(0,u.QR)(e,t),r.then((e=>e?d(e,t):null))}async function d(e,t){const r={item:e};r.formJSON=await(0,a.C)(e,t);const n=new i.c7((0,o.s)()).storeToEntity(r,{});return(0,s.F)(r,n,t)}},465479:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HubSurvey:()=>n.V,MAP_SURVEY_TYPEKEYWORD:()=>o.a,convertItemToSurvey:()=>s.m,decodeForm:()=>u.OF,deleteSurvey:()=>i.G,fetchSurvey:()=>s.g,getFormInfoJson:()=>u.DA,getFormJson:()=>u.CD,getInputFeatureServiceModel:()=>u.Pc,getMapQuestion:()=>u.h4,getS123EditUrl:()=>u.Zj,getS123ShareUrl:()=>u.NL,getSourceFeatureServiceModelFromFieldworker:()=>u.MH,getStakeholderModel:()=>u.Rz,getSurveyModels:()=>u.mJ,hasMapQuestion:()=>u.IY,isDraft:()=>u.mv,isFieldworkerView:()=>u.nd,isMapQuestion:()=>u.E2,isPageQuestion:()=>u.C3,isSurvey123Connect:()=>u.Fr,setDisplayMapKeyword:()=>u.sC,shouldDisplayMap:()=>u.Km,updateSurvey:()=>i.e});var n=r(515084),i=r(681167),s=r(442730),o=r(577104),a=r(11302),c={};for(const e in a)["default","HubSurvey","deleteSurvey","updateSurvey","convertItemToSurvey","fetchSurvey","MAP_SURVEY_TYPEKEYWORD"].indexOf(e)<0&&(c[e]=()=>a[e]);r.d(t,c);var u=r(91192)},11302:()=>{},371910:(e,t,r)=>{"use strict";r.d(t,{O:()=>a});var n=r(625873),i=r(466674),s=r(329644),o=r(596187);const a=e=>{const t=(0,s.kI)(e);return["header.content","subHeader.content","footer.content","settings.thankYouScreenContent"].forEach((e=>{(0,n.W)(t,e)&&(0,i.t)(e,decodeURIComponent((0,n.W)(t,e)),t)})),Object.assign(Object.assign({},t),{questions:(t.questions||[]).map((e=>{const t=e=>(e.description&&(e.description=decodeURIComponent(e.description)),e);return(0,o.C)(e)?Object.assign(Object.assign({},e),{questions:e.questions.map(t)}):t(e)}))})}},863341:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(170209);const i=(e,t)=>(0,n.Tn)(e,Object.assign({fileName:"forminfo.json",readAs:"json"},t))},594113:(e,t,r)=>{"use strict";r.d(t,{C:()=>c});var n=r(170209),i=r(863341),s=r(832997),o=r(371910),a=r(433150);const c=async(e,t)=>{if((0,a.m)(e))return null;const{name:r}=await(0,i.D)(e.id,t);let c;return c=(0,s.F)(e)?Promise.all([(0,n.Tn)(e.id,Object.assign({fileName:`${r}.webform`,readAs:"json"},t)),(0,n.Tn)(e.id,Object.assign({fileName:`${r}.info`,readAs:"json"},t))]).then((([e,t])=>{const{surveyFormJson:r={}}=e,{webformInfo:n={settings:{openStatusInfo:{status:"open",schedule:{end:null,status:null}},multiSubmissionInfo:{maxAllowed:0}}}}=t,{settings:i}=n;return Object.assign(Object.assign({},r),{settings:i})})):(0,n.Tn)(e.id,Object.assign({fileName:`${r}.json`,readAs:"json"},t)),c.then((e=>(e&&(e=(0,o.O)(e)),e)))}},111666:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(611369),i=r(596187);const s=e=>{const[t,...r]=e;return o(t,r)},o=(e,t)=>{let r;if(e){if((0,n.E)(e))r=e;else if((0,i.C)(e)&&(r=s(e.questions)),!r&&t.length){const[e,...n]=t;r=o(e,n)}}else r=null;return r}},464765:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=r(111666);const i=e=>Boolean((0,n.h)(e))},91192:(e,t,r)=>{"use strict";r.d(t,{OF:()=>n.O,DA:()=>i.D,CD:()=>s.C,Pc:()=>a,h4:()=>c.h,Zj:()=>u,NL:()=>l,MH:()=>d,Rz:()=>p,mJ:()=>m,IY:()=>f.I,mv:()=>g.m,nd:()=>h,E2:()=>y.E,C3:()=>b.C,Fr:()=>v.F,sC:()=>w.s,Km:()=>S.K});var n=r(371910),i=r(863341),s=r(594113),o=r(170209);const a=(e,t)=>(0,o.oO)(Object.assign({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t}));var c=r(111666);function u(e,t){return`${t.survey123Url}/surveys/${e}?portalUrl=${encodeURIComponent(t.portalUrl)}`}function l(e,t){return`${t.survey123Url}/share/${e}?portalUrl=${encodeURIComponent(t.portalUrl)}`}const d=(e,t)=>(0,o.oO)(Object.assign({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t})),p=(e,t)=>(0,o.oO)(Object.assign({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then((({relatedItems:[e]})=>{let t;return e&&(t={item:e}),t}));function h(e){const t=t=>e.typeKeywords.indexOf(t)>-1;let r=t("FieldworkerView");return r||(r=["Survey123","Feature Service","View Service"].every(t)&&!t("StakeholderView")),r}const m=(e,t)=>
30{let r,n;return("string"==typeof e?(0,o.rV)(e,t):Promise.resolve(e)).then((e=>{const i=[a(e.id,t),p(e.id,t)];return Promise.all(i).then((([e,i])=>(n=i,e&&h(e.item)?(r=e,d(r.item.id,t)):e))).then((t=>({form:{item:e},featureService:t,fieldworker:r,stakeholder:n})))}))};var f=r(464765),g=r(433150),y=r(611369),b=r(596187),v=r(832997),w=r(831543),S=r(871147)},433150:(e,t,r)=>{"use strict";function n(e){return e.typeKeywords.indexOf("Draft")>-1}r.d(t,{m:()=>n})},611369:(e,t,r)=>{"use strict";r.d(t,{E:()=>n});const n=e=>{const{type:t,maps:r=[],defaultMap:n}=e;return["esriQuestionTypeGeoPoint","esriQuestionTypePolyline","esriQuestionTypePolygon"].includes(t)&&(r.length>0||Boolean(n))}},596187:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});const n=e=>"esriQuestionTypePage"===e.type},832997:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});const n=e=>{var t;return!!e&&(null!==(t=e.typeKeywords)&&void 0!==t?t:[]).includes("Survey123 Connect")}},831543:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(577104);function i(e,t){const r=(e||[]).filter((e=>e!==n.a));return t&&r.push(n.a),r}},871147:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(577104);const i=e=>"Form"===e.type&&e.typeKeywords.includes(n.a)},481133:(e,t,r)=>{"use strict";r.d(t,{P:()=>l});var n=r(934647),i=r(656110);const s={schemaVersion:1,catalog:{schemaVersion:0},name:"",tags:[],typeKeywords:["Solution"],view:{},permissions:[],features:r(249960).Eb};var o=r(444411),a=r(713907),c=r(50950),u=r(329644);class l extends i.x{constructor(e,t){super(e,t)}static fromJson(e,t){const r=this.applyDefaults(e,t);return new l(r,t)}static async create(e,t,r=!1){const n=this.applyDefaults(e,t),i=l.fromJson(n,t);return r&&await i.save(),i}static async fetch(e,t){try{const r=await(0,a.Dv)(e,t.requestOptions);return l.fromJson(r,t)}catch(t){throw"CONT_0001: Item does not exist or is inaccessible."===t.message?new Error(`Template ${e} not found.`):t}}static applyDefaults(e,t){return e.orgUrlKey||(e.orgUrlKey=t.portal.urlKey),Object.assign(Object.assign({},s),e)}async getEditorConfig(e,t){return(0,n.getEditorConfig)(e,t,this.entity,this.context)}async toEditor(e={},t=[]){return t.length?await(0,c.t)((0,u.kI)(this.entity),t,this.context.hubRequestOptions):(0,u.kI)(this.entity)}async fromEditor(e){if(e._thumbnail){const t=e._thumbnail;t.blob?this.thumbnailCache={file:t.blob,filename:t.filename,clear:!1}:this.thumbnailCache={clear:!0}}delete e._thumbnail;const t=(0,o.OH)(e,this.context.portal);return this.entity=t,await this.save(),this.entity}update(e){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.entity=Object.assign(Object.assign({},this.entity),e)}async save(){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.entity=this.entity.id?await(0,o.QB)(this.entity,this.context.userRequestOptions):await(0,o.Mn)(this.entity,this.context.userRequestOptions),await super.afterSave()}async delete(){if(this.isDestroyed)throw new Error("HubTemplate is already destroyed.");this.isDestroyed=!0,await(0,o.Xc)(this.entity.id,this.context.userRequestOptions)}}},249960:(e,t,r)=>{"use strict";r.d(t,{Eb:()=>n,Iy:()=>i,i:()=>s});const n={}
30,i=["hub:template","hub:template:create","hub:template:delete","hub:template:edit","hub:template:manage","hub:template:view","hub:template:view:related","hub:template:canChangeAccess","hub:template:workspace","hub:template:workspace:details","hub:template:workspace:dashboard","hub:template:workspace:collaborators","hub:template:workspace:settings"],s=[{permission:"hub:template",services:["portal"]},{permission:"hub:template:create",dependencies:["hub:template"],authenticated:!0,privileges:["portal:user:createItem"]},{permission:"hub:template:delete",dependencies:["hub:template"],authenticated:!0,entityDelete:!0},{permission:"hub:template:view",dependencies:["hub:template"]},{permission:"hub:template:view:related",dependencies:["hub:template:view"],services:["hub-search"],assertions:[{property:"entity:access",type:"eq",value:"public"}]},{permission:"hub:template:edit",dependencies:["hub:template"],authenticated:!0,entityEdit:!0},{permission:"hub:template:manage",dependencies:["hub:template:edit"]},{permission:"hub:template:canChangeAccess",dependencies:["hub:template"],authenticated:!0,assertions:[{property:"context:currentUser.privileges",type:"contains-some",value:["portal:admin:shareToPublic","portal:admin:shareToOrg","portal:user:shareToPublic","portal:user:shareToOrg"]},{property:"entity:itemControl",type:"eq",value:"admin"}]},{permission:"hub:template:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:template:workspace:details",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:dashboard",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:collaborators",dependencies:["hub:template:workspace","hub:template:manage"]},{permission:"hub:template:workspace:settings",dependencies:["hub:template:workspace","hub:template:manage"]}]},394379:(e,t,r)=>{"use strict";r.d(t,{I:()=>i,TemplateSchema:()=>s});var n=r(434164);const i=["hub:template:edit"],s=Object.assign(Object.assign({},n.N),{properties:Object.assign(Object.assign({},n.N.properties),{previewUrl:{type:"string",if:{minLength:1},then:{format:"url"}}})})},463335:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(389094);function i(e,t){var r;const i=(0,n.g)(e,t),s=null===(r=e.typeKeywords)||void 0===r?void 0:r.includes("Deployed"),{self:o,siteRelative:a,workspaceRelative:c}=i,u=`${a.split("/").slice(0,-1).join("/")}/edit/advanced`;return Object.assign(Object.assign({},i),{workspaceRelative:s?o:c,advancedEditRelative:u})}},202633:(e,t,r)=>{"use strict";r.d(t,{F:()=>u});var n=r(184488),i=r(249960),s=r(463335),o=r(625873),a=r(774268),c=r(578506);function u(e,t,r){return(t=(0,c.k)(e.item,t)).links=(0,s.E)(e.item,r),t.thumbnailUrl=t.links.thumbnail,t.features=(0,n.U)((0,o.W)(e,"data.settings.features")||{},i.Eb),t.isDeployed=((0,o.W)(e,"item.typeKeywords")||[]).includes("Deployed"),t.deployedType=(0,a.Z)(e.item),t}},54687:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(551076);function i(){const e=(0,n.f)();return e.push({entityKey:"previewUrl",storeKey:"item.properties.previewUrl"}),e}},444411:(e,t,r)=>{"use strict";r.d(t,{Mn:()=>d,OH:()=>h,QB:()=>p,Xc:()=>m});var n=r(85738),i=r(178749),s=r(329644),o=r(404091),a=r(54687),c=r(202633),u=r(170209),l=r(923018);function d(e,t){throw new Error("Template creation is not currently supported from the context of Hub")}async function p(e,t){await(0,l.E)(e,t),e.typeKeywords=(0,n.Wb)(e.typeKeywords,e.isDiscussable);const r=await(0,o.PD)(e.id,t),s=new i.c7((0,a.s)()),u=s.entityToStore(e,r),d=await(0,o.QB)(u,t),p=s.storeToEntity(d,e);return e=(0,c.F)(r,p,t),p}function h(e,t){const r=(0,s.kI)(e);return r.orgUrlKey=e.orgUrlKey?e.orgUrlKey:t.urlKey,r}async function m(e,t){const r=Object.assign(Object.assign({},t),{id:e});await(0,u.cl)(r)}},713907:(e,t,r)=>{"use strict";r.d(t,{Dv:()=>v,Gb:()=>S,xe:()=>w});var n=r(869787),i=r(76309),s=r(170209),o=r(8238),a=r(404091),c=r(178749),u=r(54687),l=r(202633),d=r(610924),p=r(329644),h=r(295426),m=r(815985),f=r(625873),g=r(463335),y=r(774268),b=r(653609);async function v(e,t){let r;return r=(0,n.k)(e)?(0,s.rV)(e,t):(0,o.QR)(e,t),r.then((e=>e?w(e,t):null))}async function w(e,t){const r=await(0,a.UO)(e,t),n=new c.c7((0,u.s)()).storeToEntity(r,{});return(0,l.F)(r,n,t)}async function S(e,t,r){const n={access:e.access,id:e.id,type:e.type,name:e.title,owner:e.owner,typeKeywords:e.typeKeywords,tags:e.tags,categories:e.categories,summary:e.snippet||e.description,createdDate:new Date(e.created),createdDateSource:"item.created",updatedDate:new Date(e.modified),updatedDateSource:"item.modified",family:(0,d._)(e.type),links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:"not-implemented",workspaceRelative:"not-implemented"},location:(0,b.jA)(e),rawResult:e},s=(t=[...t].filter(p.Tw)).map(h.u),o=(0,i.e)("enrichment",s).filter(p.Tw);let a={};
30return o.length&&(a=await(0,m.Z)(e,o,r)),s.forEach((e=>{n[e.prop]=(0,f.W)(a,e.path)})),n.links=(0,g.E)(e,r),n.deployedType=(0,y.Z)(e),n}},706608:(e,t,r)=>{"use strict";r.d(t,{Pp:()=>n.P,xe:()=>l.xe,Mn:()=>d.Mn,Xc:()=>d.Xc,OH:()=>d.OH,Gb:()=>l.Gb,Dv:()=>l.Dv,ZU:()=>c,ek:()=>a,QB:()=>d.QB});var n=r(481133),i=r(610924),s=r(653609),o=r(60844);const a=(e,t,r)=>{const{actionLinks:n=[],baseUrl:i="",locale:s="en-US",target:a="self"}=r||{},c=(0,o.m)(e,t,a,i);return Object.assign(Object.assign(Object.assign({},u(e,s)),{actionLinks:n,titleUrl:c}),e.thumbnailUrl&&{thumbnailUrl:e.thumbnailUrl})},c=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",locale:i="en-US",target:s="self"}=t||{},a=(0,o.D)(e,s,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u(e,i)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},u=(e,t)=>{var r,n;const o=[{i18nKey:"type",value:e.type},{i18nKey:"dateUpdated",value:e.updatedDate.toLocaleDateString(t)},...(null===(r=e.tags)||void 0===r?void 0:r.length)?[{i18nKey:"tags",value:e.tags.join(", ")}]:[],...(null===(n=e.categories)||void 0===n?void 0:n.length)?[{i18nKey:"categories",value:(0,s.kd)(e.categories).join(", ")}]:[],{i18nKey:"dateCreated",value:e.createdDate.toLocaleDateString(t)}];return{access:e.access,badges:[],id:e.id,family:(0,i._)(e.type),source:e.owner,summary:e.summary,title:e.name,type:e.type,additionalInfo:o}};var l=r(713907),d=r(444411)},774268:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(783228),i=r(329644);const s=e=>{let t="Solution";const r=e.typeKeywords.find((e=>e.startsWith("hubSolutionType|")));if(r){const e=r.split("|")[1];t=(0,n.H)(e).split("-").map((e=>(0,i.kC)(e))).join(" ");const s={storyMap:"StoryMap"};s[e]&&(t=s[e])}return t}},443393:()=>{},550180:()=>{},224229:()=>{},702561:()=>{},355601:()=>{},493612:()=>{},596019:(e,t,r)=>{"use strict";r.r(t);var n=r(443393),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(550180);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(224229);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i);var a=r(702561);i={};for(const e in a)"default"!==e&&(i[e]=()=>a[e]);r.d(t,i);var c=r(355601);i={};for(const e in c)"default"!==e&&(i[e]=()=>c[e]);r.d(t,i);var u=r(493612);i={};for(const e in u)"default"!==e&&(i[e]=()=>u[e]);r.d(t,i)},756035:(e,t,r)=>{"use strict";function n(e){let 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}r.d(t,{k:()=>n})},260495:(e,t,r)=>{"use strict";function n(e){const{host:t,path:r,query:n}=e,i=t.endsWith("/")?t:`${t}/`,s=new URL(r,i);return s.search=function(e={}){const t=Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,r)=>(t[r]=e[r],t)),{});return new URLSearchParams(t).toString()}(n),s.toString()}r.d(t,{Q:()=>n})},95589:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(e,t="v")=>{if(!e)return e;const r=e.indexOf("?")>-1?"&":"?";return e+`${r}${t}=${(new Date).getTime()}`}},150092:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var n=r(163044),i=r(422985);function s(e,t){const r=(0,n.a)(t);let s;s=/(devext|mapsdevext)\.arcgis\.com/.test(r)?"https://hubdevcdn.arcgis.com/opendata-ui/assets":/(qaext|mapsqa)\.arcgis\.com/.test(r)?"https://hubqacdn.arcgis.com/opendata-ui/assets":/(www|maps)\.arcgis\.com/.test(r)?"https://hubcdn.arcgis.com/opendata-ui/assets":`${r}${i.me}`;const o=e.startsWith("/")?"":"/";return[s,e].join(o)}},663384:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(163044),i=r(319339),s=r(422985);function o(e){if(e.isPortal)return`${(0,n.a)(e)}${s.me}`;{const t=e.portalHostname.split(".")[0];return`${i.P[t]||i.P.www}/opendata-ui/assets`}}},322446:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(756035);function i(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return(0,n.k)(e.portalHostname)}},825190:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(16933);const i=(e,t,r)=>{const{id:i,access:s}=e,o=`${(0,n.i)(t)}/content/items/${i}`,a=new URLSearchParams({f:"json"});return"public"!==s&&r&&a.append("token",r),`${o}?${a.toString()}`}},717423:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(825190);const i=(e,t,r)=>{const i=(0,n.p)(e,t,r),s=`\\/${e.id}\\?f=json`,o=new RegExp(s);return i&&i.replace(o,`/${e.id}/data`).replace(/\&token/,"?token")}},881554:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(163044);function i(e,t){return`${(0,n.a)(t)}/home/item.html?id=${e}`}},16933:(e,t,r)=>{"use strict";r.d(t,{i:()=>i});var n=r(163044);function i(e){return`${(0,n.a)(e)}/sharing/rest`}},163044:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(170209);function i(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){const t=e.portalSelf||e,{portalHostname:r,urlKey:n,customBaseUrl:i}=t;if(r||n&&i)return t.isPortal?`https://${t.portalHostname}`:`https://${t.urlKey}.${t.customBaseUrl}`}return i((0,n.al)(e))}},60844:(e,t,r)=>{"use strict";function n(e,t,r){var n,i,s,o,a,c;let u;return u="event"===t?"#":"none"===t?void 0:"Hub Site Application"===e.type?null===(c=e.links)||void 0===c?void 0:c.self:{self:null===(n=e.links)||void 0===n?void 0:n.self,siteRelative:r?`${r}${(null===(i=e.links)||void 0===i?void 0:i.siteRelative)||""}`:null===(s=e.links)||void 0===s?void 0:s.siteRelative,workspaceRelative:r?`${r}${(null===(o=e.links)||void 0===o?void 0:o.workspaceRelative)||""}`:null===(a=e.links)||void 0===a?void 0:a.workspaceRelative}[t],u}function i(e,t,r,n){var i,s,o,a,c,u;let l;return l="event"===r?"#":"none"===r?void 0:"Hub Site Application"===e.type?null===(u=e.links)||void 0===u?void 0:u.self:{self:null===(i=e.links)||void 0===i?void 0:i.self,siteRelative:n?`${n}${(null===(s=e.links)||void 0===s?void 0:s.siteRelative)||""}`:null===(o=e.links)||void 0===o?void 0:o.siteRelative,workspaceRelative:n?`${n}${(null===(a=e.links)||void 0===a?void 0:a.workspaceRelative)||""}`:null===(c=e.links)||void 0===c?void 0:c.workspaceRelative}[r],l}r.d(t,{D:()=>n,m:()=>i})},286455:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(163044);function i(e,t){return`${(0,n.a)(t)}/home/group.html?id=${e}`}},696286:(e,t,r)=>{"use strict";function n(e){let t;
30return 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}r.d(t,{G:()=>n})},347322:(e,t,r)=>{"use strict";function n(e){let 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}r.d(t,{D:()=>n})},957322:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(163044);function i(e,t){return`${(0,n.a)(t)}/home/user.html?user=${e}`}},319339:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n={devext:"https://hubdevcdn.arcgis.com",qaext:"https://hubqacdn.arcgis.com",www:"https://hubcdn.arcgis.com"}},634250:(e,t,r)=>{"use strict";r.d(t,{PF:()=>c.P,mT:()=>d,G:()=>p,Q2:()=>i.Q,ZP:()=>x.Z,wV:()=>b,CX:()=>O,dW:()=>R.d,gp:()=>S,tV:()=>E.t,GG:()=>v.G,dD:()=>m,ls:()=>s.l,Vb:()=>h.V,pK:()=>g.p,mP:()=>y.m,$:()=>f.$,ik:()=>o.i,Dw:()=>w.D,al:()=>a.a,Gb:()=>N,n5:()=>T.n,TD:()=>M,v8:()=>k,G1:()=>l.G,Ue:()=>u});var n=r(329644),i=r(260495),s=r(663384),o=r(16933),a=r(163044),c=r(319339);function u(e){return-1===e.indexOf("http")?`https://${e}`:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e}var l=r(408923);function d(e){if(!e)return[];const t=e.replace(/^http(s?):\/\//,"");return[`http://${t}`,`https://${t}`]}function p(){if(window)return window.location}var h=r(322446);function m(e){return`${(0,h.V)(e)}/api/v3`}var f=r(881554),g=r(825190),y=r(717423);function b(e){const t=e.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return t&&t.forEach((function(t){e=e.replace(t,'<a target="_blank" href="'+t+'">'+t+"</a>")})),e.replace("(","<br/>(")}var v=r(696286),w=r(347322);function S(e){return`${(0,a.a)(e)}/home/content.html`}var E=r(286455),T=r(957322),I=r(282526),C=r(899415),A=r(756035);function O(e){const{portal:t}=e,r=(0,I._T)(e,["portal"]),n=(0,a.a)(t),i=(0,A.k)(n),s=new URL(`${i}/c`),o=(0,C.btoa)(JSON.stringify(r));return s.searchParams.set("d",o),s.toString()}var _=r(333068);const D=new RegExp("^https?:\\/\\/([a-z0-9-]+\\.)*(arcgis|esri)\\.com"),P=new RegExp("^https?:$");async function k(e){const{url:t}=e,r=(0,I._T)(e,["url"]);let n;try{if(n=D.test(t),!n){const{protocol:e,hostname:i}=new URL(t);if(!P.test(e))throw new Error("invalid protocol");n=await(0,_.B)(i,r)}}catch(e){n=!1}return n}var x=r(95589),R=r(150092);const U=/\/(map|feature)server/i,M=e=>U.test(e),N=e=>{const t=e.match(U),r=t&&t[1];return r&&`${(0,n.kC)(r)} Service`}},408923:(e,t,r)=>{"use strict";function n(e){return(e=e.toLowerCase()).includes("//")&&(e=e.split("//")[1]),e}r.d(t,{G:()=>n})},447694:(e,t,r)=>{"use strict";r.d(t,{gU:()=>v,RG:()=>w,W6:()=>S});var n=r(170209),i=r(288285),s=r(815985),o=r(597633),a=r(347322),c=r(477448);const u={org:e=>{const{data:t,stack:r,requestOptions:n}=e,o=r.start("enrichUserOrg");if(t.user.orgId){const c=Object.assign(Object.assign({},n),{portal:`${(0,a.D)(n.portal)}/sharing/rest`});return(0,i.T)(t.user.orgId,c).then((e=>(r.finish(o),{data:Object.assign(Object.assign({},t),{org:e}),stack:r,requestOptions:n}))).catch((t=>((e,t,r)=>{const{data:n,stack:i,requestOptions:o}=t;return i.finish(r,{error:e}),{data:Object.assign(Object.assign({},n),{errors:(0,s.g)(e,n.errors)}),stack:i,requestOptions:o}})(t,e,o)))}return r.finish(o),Promise.resolve({data:Object.assign(Object.assign({},t),{org:null}),stack:r,requestOptions:n})}};var l=r(625873),d=r(232413),p=r(295426),h=r(957322),m=r(329644),f=r(76309),g=r(348753),y=r(609205);function b(e){const t=`${(0,n.al)(e.requestOptions)}/portals/self/signinSettings`,r=Object.assign(Object.assign({},e.requestOptions),{httpMethod:"GET"});return(0,g.WY)(t,r)}const v=e=>{const t=e.hasOwnProperty("description")?e.description:void 0;return{access:e.access,id:e.username,name:e.fullName,description:t,summary:t,createdDate:new Date(e.created),createdDateSource:"user.created",orgId:e.orgId,owner:e.username,updatedDate:new Date(e.modified),updatedDateSource:"user.modified",tags:e.tags,thumbnail:e.thumbnail,type:"User",typeKeywords:[],links:{self:"not-implemented",siteRelative:"not-implemented",thumbnail:null}}};async function w(e,t,r){var n;const i=v(e),s=Object.assign(Object.assign({},i),{family:"people",rawResult:e});e.memberType&&(s.memberType=e.memberType,s.isGroupOwner=e.isGroupOwner);const a=t.filter(m.Tw).map(p.u),g=(0,f.e)("enrichment",a).filter(m.Tw);let y={};g.length&&(y=await function(e,t,r){const n=t.reduce(((e,t)=>{const r=u[t];return r&&e.push(r),e}),[]);return(0,c.G)(n)({data:{user:e},stack:new o.Z,requestOptions:r}).then((e=>e.data))}(e,g,r)),a.forEach((e=>{s[e.prop]=(0,l.W)(y,e.path)}));const b=null===(n=r.authentication)||void 0===n?void 0:n.token;return e.thumbnail&&(s.links.thumbnail=(0,d.Fz)(r.portal,e,b)),s.links.self=(0,h.n)(s.id,r),s.links.siteRelative=`/people/${s.id}`,s}const S=async(e,t)=>{let r;r="self"===e?t.currentUser:await(0,n.PR)(Object.assign(Object.assign({},t.hubRequestOptions),{username:e}));let i=v(r);return i=await async function(e,t,r){var i,s,o;t.settings=r.userHubSettings;const a=(0,y.D)(b,{}),c=await a(r),u=(0,y.D)(n.AW,{}),l=await u(r.requestOptions);return t.hubOrgSettings={showInformationalBanner:!!(null===(o=null===(s=null===(i=l.portalProperties)||void 0===i?void 0:i.hub)||void 0===s?void 0:s.settings)||void 0===o?void 0:o.informationalBanner),enableTermsAndConditions:!!c.termsAndConditions,termsAndConditions:c.termsAndConditions,enableSignupText:!!c.signupText,signupText:c.signupText},t}(0,i,t),i}},113426:(e,t,r)=>{"use strict";r.d(t,{G:()=>n,l:()=>i});
30const n=["hub:user","hub:user:view","hub:user:edit","hub:user:owner","hub:user:workspace","hub:user:workspace:overview","hub:user:workspace:settings","hub:user:workspace:content","hub:user:workspace:groups","hub:user:workspace:events","hub:user:workspace:shared-with-me","hub:user:manage"],i=[{permission:"hub:user",services:["portal"]},{permission:"hub:user:view",dependencies:["hub:user"],authenticated:!1},{permission:"hub:user:owner",dependencies:["hub:user"],authenticated:!0,entityOwner:!0},{permission:"hub:user:edit",dependencies:["hub:user:owner"]},{permission:"hub:user:workspace",dependencies:["hub:feature:workspace"]},{permission:"hub:user:workspace:overview",dependencies:["hub:user:workspace"]},{permission:"hub:user:workspace:content",dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:workspace:groups",dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:workspace:events",services:["events"],dependencies:["hub:user:workspace","hub:user:owner"],licenses:["hub-premium"]},{permission:"hub:user:workspace:settings",environments:["devext","qaext","production"],dependencies:["hub:user:workspace","hub:user:owner"]},{permission:"hub:user:manage",dependencies:["hub:user:edit"]}]},296796:(e,t,r)=>{"use strict";r.d(t,{UserSchema:()=>i,q:()=>n});const n=["hub:user:settings"],i={type:"object",properties:{settings:{type:"object",properties:{features:{type:"object",properties:{workspace:{type:"boolean",default:!0}}}}},hubOrgSettings:{type:"object",properties:{showInformationalBanner:{type:"boolean",default:!1},enableTermsAndConditions:{type:"boolean",default:!1},termsAndConditions:{type:"string",default:""},enableSignupText:{type:"boolean",default:!1},signupText:{type:"string",default:""}}}}}},968194:(e,t,r)=>{"use strict";r.d(t,{gU:()=>n.gU,RG:()=>n.RG,W6:()=>n.W6,HL:()=>s});var n=r(447694),i=r(60844);const s=(e,t)=>{const{actionLinks:r=[],baseUrl:n="",target:s="self"}=t||{},a=(0,i.D)(e,s,n);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o(e)),{actionLinks:r}),!isNaN(e.index)&&{index:e.index}),{titleUrl:a}),e.links.thumbnail&&{thumbnailUrl:e.links.thumbnail})},o=e=>{const t=[],r=e.memberType;return r&&(e.isGroupOwner?t.push({icon:"user-key",color:"gray",i18nKey:"badges.members.owner",hideLabel:!0,tooltip:{i18nKey:"badges.members.owner"}}):"admin"===r?t.push({icon:"user-up",color:"gray",i18nKey:"badges.members.admin",hideLabel:!0,tooltip:{i18nKey:"badges.members.admin"}}):t.push({icon:"user",color:"gray",i18nKey:"badges.members.member",hideLabel:!0,tooltip:{i18nKey:"badges.members.member"}})),{access:e.access,badges:t,family:e.family,id:e.id,source:e.name?`@${e.id}`:void 0,summary:e.summary,title:e.name||`@${e.id}`,type:e.type}}},329644:(e,t,r)=>{"use strict";r.d(t,{E4:()=>v,F3:()=>w,FB:()=>s,JJ:()=>o,Mc:()=>l,Tw:()=>m,VF:()=>T,Yp:()=>p,Z$:()=>g,_A:()=>h,fE:()=>d,j:()=>y,kC:()=>E,kI:()=>i,kK:()=>S,l7:()=>b,qC:()=>u,uw:()=>f,zP:()=>a,zu:()=>c});var n=r(625873);function i(e){let t={};if(Array.isArray(e))t=e.map(i);else if("object"==typeof e){if(null===e)return e;for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];null!=n&&"object"==typeof n?n instanceof Date?t[r]=new Date(n.getTime()):"undefined"!=typeof Blob&&n instanceof Blob?t[r]=new Blob([n],{type:n.type}):t[r]=i(n):t[r]=n}}else t=e;return t}function s(e,t){return e.reduce(((e,r)=>(e[(0,n.W)(r,t)]=r,e)),{})}function o(e,t="id"){return Object.keys(e).reduce(((r,n)=>(e[n][t]=n,r.push(i(e[n])),r)),[])}function a(e,t,r){return e?e.reduce(((e,i)=>((0,n.W)(i,t)===r&&(e=i),e)),null):null}function c(e,t){return e.filter((e=>e!==t))}function u(...e){return e.reduce(((e,t)=>(...r)=>e(t(...r))))}function l(e="i"){return`${e}${Math.random().toString(36).substr(2,8)}`}function d(e,t,r){return null!=t&&((r=i(r))[e]=t),r}function p(e,t){return null!=e&&(t=i(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 f(e,t){return e.reduce(((e,r)=>p(e.find((e=>(0,n.W)(e,t)===(0,n.W)(r,t)))?null:r,e)),[])}function g(e){return e[e.length-1]}function y(e,t,r){return e.filter((e=>(0,n.W)(e,t)===r))}function b(e,t,r=!0){const n=i(e);return Object.keys(t).reduce(((e,n)=>{if(null!==t[n]&&void 0!==t[n]){const s=i(t[n]);Array.isArray(s)?e[n]=s:e[n]=r&&"object"==typeof s?b(e[n]||{},s,r):s}return e}),n)}function v(e,t){try{const r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}}function w(e,t){const r=[];let n=0;for(;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}const S=e=>null==e,E=e=>{const t=Array.from(e);return t.length&&(t[0]=t[0].toUpperCase()),t.join("")};function T(e){return e.reduce(((e,t)=>e.concat(t)),[])}},149019:()=>{},28116:()=>{},480479:()=>{},570900:(e,t,r)=>{"use strict";r.d(t,{D:()=>i,q:()=>n});const n=e=>{const t=[].concat.apply([],e.filter(Array.isArray));return t.length?t:void 0};function i(e,t){return e.reduce(((e,r)=>{let n=e[e.length-1];return n&&n.length!==t||(n=[],e.push(n)),n.push(r),e}),[])}},407070:(e,t,r)=>{"use strict";async function n(e,t){for(let r=0;r<e.length;r++)await t(e[r],r,e)}r.d(t,{M:()=>n})},595727:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(570900);function i(e,t,r=5){return(0,n.D)(e,r).reduce(((e,r)=>e.then((e=>{const n=r.map((e=>t(e)));return Promise.all(n).then((t=>e.concat(t)))}))),Promise.resolve([]))}},477448:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(276242);const i=e=>t=>e.reduce(((e,r)=>e.then(r).catch((e=>{if("OperationError"===e.name)return Promise.reject(e);{const e=`IPipeableFn did not reject with an OperationError \n Operation Stack: \n ${t.stack.toString()}`,r=new n.Z("pipeline execution error",e);return r.operationStack=t.stack.serialize(),Promise.reject(r)}}))),Promise.resolve(t))},783228:(e,t,r)=>{"use strict";function n(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")}r.d(t,{H:()=>n})},545381:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(746886);function i(e,t){const r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:null!=t?t:(0,n.W)()}).formatToParts(new Date(e));return[r[4].value,r[0].value,r[2].value].join("-")}},650542:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(746886);function i(e,t){const r=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:null!=t?t:(0,n.W)(),hourCycle:"h23"}).formatToParts(new Date(e));return[r[0].value,r[2].value,r[4].value].join(":")}},746886:(e,t,r)=>{"use strict";function n(){return Intl.DateTimeFormat().resolvedOptions().timeZone}r.d(t,{W:()=>n})},738495:(e,t,r)=>{"use strict";r.d(t,{W9:()=>s.W,XP:()=>n.X,zi:()=>i.z});var n=r(545381),i=r(650542),s=r(746886)},282713:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,z:()=>s});var n=r(899415);function i(e){return function(e){const t=Array.from(e,(e=>String.fromCodePoint(e))).join("");return(0,n.btoa)(t)}((new TextEncoder).encode(e))}function s(e){return(new TextDecoder).decode(function(e){const t=(0,n.atob)(e);return Uint8Array.from(t,(e=>e.codePointAt(0)))}(e))}},959064:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(620450);function i(e,t){let r=!1,i=0,s=t;for(;!r;)(0,n.q)(e,s)?(i++,s=`${t}-${i}`):r=!0;return s}},609205:(e,t,r)=>{"use strict";function n(e,t={}){return(...r)=>e(...r).catch((e=>t))}r.d(t,{D:()=>n})},872465:(e,t,r)=>{"use strict";function n(e){let t=(new Date).getTime();return Array(e).fill(0).reduce((function(e){const r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),`${e}${r.toString(16)}`}),"")}r.d(t,{z:()=>n})},730816:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(625873);function i(e){let t=(0,n.W)(e,"portalProperties.hub.enabled")?"premium":"basic";return e.isPortal&&"singletenant"===e.portalMode&&(t="portal"),t}},445234:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(551753);const i=e=>(0,n.t)(e,"subscriptionInfo.type","Enterprise")},213256:(e,t,r)=>{"use strict";function n(e){let t="enterprise";return e.includes("arcgis.com")&&(t="production"),(e.includes("qaext.arcgis.com")||e.includes("mapsqa.arcgis.com"))&&(t="qaext"),(e.includes("devext.arcgis.com")||e.includes("mapsdev.arcgis.com"))&&(t="devext"),t}r.d(t,{G:()=>n})},991845:(e,t,r)=>{"use strict";function n(){return"https://hubcdn.arcgis.com/opendata-ui/assets/ember-arcgis-opendata-components/
30assets/images/placeholders/event.png"}r.d(t,{P:()=>n})},261072:(e,t,r)=>{"use strict";function n(e){const t=2*JSON.stringify(e).length,r=t/1024;return{bytes:t,kilobytes:r,megabytes:r/1024}}r.d(t,{U:()=>n})},130527:(e,t,r)=>{"use strict";r.d(t,{Xb:()=>p,qB:()=>l,zL:()=>d,p7:()=>u});const n="self",i="hub-site-settings.json";var s=r(405279),o=r(138796),a=r(719045),c=r(126186);async function u(e,t,r=!1){const s=t.tokenFor(n);if(s){e.updated=(new Date).getTime(),e.username=t.currentUser.username;const n={key:i,data:e,access:"userappprivate"};return(0,a.iV)(n,t.currentUser.username,t.portalUrl,s,r)}throw new Error("No user-app-resource token available to store Site Settings")}async function l(e){const t=e.tokenFor(n);if(t){const r=await(0,a.JP)(e.currentUser.username,i,e.portalUrl,t);return(0,o.F)(r)}return Promise.resolve(null)}async function d(e,t,r=!1){const n=t.tokenFor(s.bR);if(n){e.updated=(new Date).getTime(),e.username=t.currentUser.username;const i={key:s.$k,data:e,access:"userappprivate"};return(0,a.iV)(i,t.currentUser.username,t.portalUrl,n,r)}throw new Error("No user-app-resource token available to store Site Settings")}async function p(e){const t=e.tokenFor(s.bR);return t?await(0,c.Z)(e.currentUser.username,e.portalUrl,t):Promise.resolve(null)}},620450:(e,t,r)=>{"use strict";function n(e,t){return-1!==e.indexOf(t)}r.d(t,{q:()=>n})},915400:(e,t,r)=>{"use strict";function n(e){const t=e.match(/-\s(\d+$)/);if(t){const r=parseInt(t[1],10),n=r+1;e=e.replace(`- ${r}`,`- ${n}`)}else e+=" - 1";return e}r.d(t,{X:()=>n})},60348:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Logger:()=>E.Y,asyncForEach:()=>s.M,base64ToUnicode:()=>a.z,batch:()=>o.d,clearMemoizedCache:()=>O.M,createOperationPipeline:()=>u.G,dasherize:()=>C.H,ensureUniqueString:()=>c.c,failSafe:()=>l.D,fetchUserHubSettings:()=>k.Xb,fetchUserSiteSettings:()=>k.qB,generateRandomString:()=>d.z,getDatePickerDate:()=>R.XP,getEnvironmentFromPortalUrl:()=>_.G,getEventThumbnail:()=>D.P,getHubProduct:()=>p.q,getObjectSize:()=>x.U,getSubscriptionType:()=>h.f,getTimePickerTime:()=>R.zi,guessTimeZone:()=>R.W9,includes:()=>m.q,incrementString:()=>S.X,isComboboxItemSelected:()=>U.V,isCuid:()=>g.l,isGuid:()=>f.k,isUpdateGroup:()=>T.A,mapBy:()=>y.e,memoize:()=>O.H,poll:()=>P.$,processRevertableTasks:()=>I.U,propifyString:()=>w.w,runRevertableTask:()=>I.O,slugify:()=>b.l,titleize:()=>A.M,unicodeToBase64:()=>a.J,updateUserHubSettings:()=>k.zL,updateUserSiteSettings:()=>k.p7,wait:()=>M.D,withoutByProp:()=>v.r});var n=r(480479),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(407070),o=r(595727),a=r(282713),c=r(959064),u=r(477448),l=r(609205),d=r(872465),p=r(730816),h=r(445234),m=r(620450),f=r(869787),g=r(769418),y=r(76309),b=r(407267),v=r(906737),w=r(294099),S=r(915400),E=r(656252),T=r(252628),I=r(51341),C=r(783228),A=r(139138),O=r(634055),_=r(213256),D=r(991845),P=r(991762),k=r(130527),x=r(261072),R=r(738495),U=r(9864),M=r(279671),N=r(149019);i={};for(const e in N)["default","asyncForEach","batch","base64ToUnicode","unicodeToBase64","ensureUniqueString","createOperationPipeline","failSafe","generateRandomString","getHubProduct","getSubscriptionType","includes","isGuid","isCuid","mapBy","slugify","withoutByProp","propifyString","incrementString","Logger","isUpdateGroup","processRevertableTasks","runRevertableTask","dasherize","titleize","clearMemoizedCache","memoize","getEnvironmentFromPortalUrl","getEventThumbnail","poll","fetchUserHubSettings","fetchUserSiteSettings","updateUserHubSettings","updateUserSiteSettings","getObjectSize","getDatePickerDate","getTimePickerTime","guessTimeZone","isComboboxItemSelected","wait"].indexOf(e)<0&&(i[e]=()=>N[e]);r.d(t,i);var j=r(28116);i={};for(const e in j)["default","asyncForEach","batch","base64ToUnicode","unicodeToBase64","ensureUniqueString","createOperationPipeline","failSafe","generateRandomString","getHubProduct","getSubscriptionType","includes","isGuid","isCuid","mapBy","slugify","withoutByProp","propifyString","incrementString","Logger","isUpdateGroup","processRevertableTasks","runRevertableTask","dasherize","titleize","clearMemoizedCache","memoize","getEnvironmentFromPortalUrl","getEventThumbn
30ail","poll","fetchUserHubSettings","fetchUserSiteSettings","updateUserHubSettings","updateUserSiteSettings","getObjectSize","getDatePickerDate","getTimePickerTime","guessTimeZone","isComboboxItemSelected","wait"].indexOf(e)<0&&(i[e]=()=>j[e]);r.d(t,i)},405279:(e,t,r)=>{"use strict";r.d(t,{$k:()=>i,bR:()=>n});const n="hubforarcgis",i="hub-settings.json"},126186:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(609205),i=r(405279),s=r(138796),o=r(719045);async function a(e,t,r){const a=(0,n.D)(o.JP,function(e){return{schemaVersion:1.1,username:e,updated:(new Date).getTime(),features:{workspace:!0}}}(e)),c=await a(e,i.$k,t,r);return(0,s.c)(c)}},861588:(e,t,r)=>{"use strict";function n(e,t){const r=e.filter((e=>!e.startsWith("status|")));return r.push(`status|${t}`),r}r.d(t,{o:()=>n})},138796:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,F:()=>i});var n=r(329644);function i(e){return(0,n.kI)(e)}function s(e){let t=(0,n.kI)(e);return t=function(e){var t;return e.schemaVersion<1.1&&(e.schemaVersion=1.1,t=e,Object.prototype.hasOwnProperty.call(t,"preview")&&(e.features=(0,n.kI)(e.preview),delete e.preview,delete e.features.workspace),e.features||(e.features={})),e}(t),t}},719045:(e,t,r)=>{"use strict";r.d(t,{JP:()=>a,iV:()=>o});var n=r(348753),i=r(609205),s=r(261072);async function o(e,t,r,o,c=!1){if((0,s.U)(e.data).megabytes>4.95)throw new Error("User Resource is too large to store. Please ensure it is less than 5MB in size");let u=e.data;if(!c){const n=(0,i.D)(a,{}),s=await n(t,e.key,r,o);u=Object.assign(Object.assign({},s),e.data)}const l={portal:r,httpMethod:"POST",params:{text:JSON.stringify(u),access:e.access,key:e.key,token:o}};return(0,n.WY)(`${r}/sharing/rest/community/users/${t}/addResource`,l)}function a(e,t,r,i){const s={portal:r};return(0,n.WY)(`${r}/sharing/rest/community/users/${e}/resources/${t}?token=${i}`,s)}},769418:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e&&/^c[a-z0-9]{24}$/.test(e)}r.d(t,{l:()=>n})},869787:(e,t,r)=>{"use strict";function n(e){return"{"===e[0]&&(e=e.substring(1,e.length-1)),/^(\{){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)}r.d(t,{k:()=>n})},252628:(e,t,r)=>{"use strict";function n(e){return e.capabilities.includes("updateitemcontrol")}r.d(t,{A:()=>n})},9864:(e,t,r)=>{"use strict";function n(e,t,r){var i;let s=t.includes(e.value);return"ancestors"===r&&(s=s||!!(null===(i=e.children)||void 0===i?void 0:i.length)&&e.children.some((e=>n(e,t,r)))),s}r.d(t,{V:()=>n})},656252:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=Object.assign(Object.assign({},{logLevel:"error"}),globalThis.arcgisHubConfig).logLevel;var i;!function(e){e[e.all=0]="all",e[e.debug=1]="debug",e[e.info=2]="info",e[e.warn=3]="warn",e[e.error=4]="error",e[e.off=5]="off"}(i||(i={}));class s{static log(e,...t){this.isLevelPermitted(i.debug)&&console.log(e,...t)}static debug(e,...t){this.isLevelPermitted(i.debug)&&console.debug(e,...t)}static info(e,...t){this.isLevelPermitted(i.info)&&console.info(e,...t)}static warn(e,...t){this.isLevelPermitted(i.warn)&&console.warn(e,...t)}static error(e,...t){this.isLevelPermitted(i.error)&&console.error(e,...t)}static isLevelPermitted(e){return i[n]<=e}}},76309:(e,t,r)=>{"use strict";function n(e,t=[]){return t.map((t=>t[e]))}r.d(t,{e:()=>n})},634055:(e,t,r)=>{"use strict";r.d(t,{H:()=>i,M:()=>s});let n={};const i=e=>{if(!n[`_${e.name}`]){const t={},r=(...r)=>{const n=(e=>e.reduce(((t,r)=>t+`_${"object"==typeof r?JSON.stringify(e):`${r}`}_`),""))(r);if(t[n])return t[n];const i=e.call(void 0,...r);return t[n]=i,i};n[`_${e.name}`]=r}return n[`_${e.name}`]},s=e=>{e?delete n[`_${e}`]:n={}}},991762:(e,t,r)=>{"use strict";async function n(e,t,r){const n=e=>!isNaN(e)&&e>0,i=n(null==r?void 0:r.maxAttempts)?r.maxAttempts:7,s=n(null==r?void 0:r.initialRetryDelay)?r.initialRetryDelay:500;return async function r(n,o){if(n>i)throw new Error(`Polling failed after ${i} attempts`);const a=await new Promise((t=>{setTimeout((async()=>{const r=await e();t(r)}),o)}));return t(a)?a:await r(n+1,1===n?s:2*o)}(1,0)}r.d(t,{$:()=>n})},294099:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(329644);function i(e){let t=e;return t=t.replace(/^[0-9]*/g,""),t=t.replace(/[^\w\s]/g,""),t=(0,n._A)(t),t}},51341:(e,t,r)=>{"use strict";r.d(t,{O:()=>n,U:()=>i});const n=(e,t)=>e().then((e=>({status:"fullfilled",results:e,revert:t}))).catch((e=>({status:"rejected",error:e}))),i=e=>Promise.all(e).then((e=>{const t=e=>"fullfilled"===e.status,r=e.filter(t),n=e.filter((e=>!t(e)));if(n.length){const e=r.map((e=>e.revert()));throw Promise.all(e).catch((()=>{})),n[0].error}return r.map((e=>e.results))}))},407267:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?e.trim().toLowerCase().replace(/ +/g,"-").replace(/[^\w-]/g,"").replace(/-+/g,"-"):e}r.d(t,{l:()=>n})},139138:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(329644);function i(e){return e.split(" ").map((e=>(0,n.kC)(e))).join(" ")}},279671:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});const n=e=>new Promise((t=>setTimeout(t,e)))},906737:(e,t,r)=>{"use strict";function n(e,t,r){return r.filter((r=>r[e]!==t))}r.d(t,{r:()=>n})},979171:(e,t,r)=>{"use strict";r.d(t,{M:()=>n,V:()=>i});const n="version.json",i=["created","creator","description","id","name","parent","updated"]},72990:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var n=r(803754),i=r(653609),s=r(281488),o=r(849870);function a(e){let t;if((0,n.Z6)(e.item.type,e.item.typeKeywords))t=s.bx;else{if(!(0,i.r9)(e.item.type,e.item.typeKeywords))throw TypeError("Entity type does not support versioning");t=o.bS}return t}},434842:(e,t,r)=>{"use strict";function n(e){return`hubVersion_${e}`}r.d(t,{G:()=>n})},551870:(e,t,r)=>{"use strict";r.d(t,{s:()=>s});var n=r(434842),i=r(979171);function s(e){return(0,n.G)(`${e}/${i.M}`)}},174561:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(689275);function i(e,t){return(0,n.P)(e,{},t)}},344472:(e,t,r)=>{"use strict";r.d(t,{h:()=>p});var n=r(72990),i=r(174561),s=r(434842),o=r(625873),a=r(689275),c=r(646979),u=r(329644),l=r(979171),d=r(170209);async function p(e,t,r){const p=(0,n.n)(e),h=(0,i.h)(e,p),m=null==r?void 0:r.name,f=null==r?void 0:r.description,g=null==r?void 0:r.parentId,y=(0,u.Mc)(),b=(0,s.G)(y),v=Date.now(),w={created:v,creator:(0,o.W)(t,"authentication.username"),data:h,description:f,id:y,name:m,parent:g,path:`${b}/${l.M}`,updated:v},S=(0,c.O)(w),E=(0,a.P)(w,{},l.V);return await(0,d.zJ)(Object.assign(Object.assign({},t),{id:(0,o.W)(e,"item.id"),name:l.M,owner:(0,o.W)(e,"item.owner"),params:{properties:E},prefix:b,resource:S})),w.size=S.size,w}},26264:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(551870),i=r(170209);async function s(e,t,r,s){return(0,i.ug)(Object.assign(Object.assign({},s),{id:e,owner:r,resource:(0,n.s)(t)}))}},304360:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(170209),i=r(551870);async function s(e,t,r){return(0,n.AA)(e,Object.assign(Object.assign({},r),{fileName:(0,i.s)(t),readAs:"json"}))}},364724:(e,t,r)=>{"use strict";r.r(t),r.d(t,{applyVersion:()=>d.M,checkForStaleVersion:()=>d.P,createVersion:()=>n.h,deleteVersion:()=>i.h,getVersion:()=>s.b,searchVersions:()=>c.A,updateVersion:()=>u.S,updateVersionMetadata:()=>l.V});var n=r(344472),i=r(26264),s=r(304360),o=r(793357),a={};for(const e in o)["default","createVersion","deleteVersion","getVersion"].indexOf(e)<0&&(a[e]=()=>o[e]);r.d(t,a);var c=r(302776),u=r(367186),l=r(273640),d=r(610338)},302776:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(170209);function i(e){const{access:t,resource:r,size:n}=e;let i;const s=e.properties||"{}";try{i=JSON.parse(s)}catch(e){i={}}return Object.assign(Object.assign({},i),{access:t,path:r,size:n})}async function s(e,t){return(await(0,n.C)(e,Object.assign(Object.assign({},t),{params:{sortField:"created",sortOrder:"desc"}}))).resources.filter((e=>e.resource.match(/^hubVersion_[a-zA-Z0-9_\s]*\/version.json/))).map(i)}},261937:()=>{},544486:()=>{},530994:()=>{},793357:(e,t,r)=>{"use strict";r.r(t);var n=r(261937),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i);var s=r(544486);i={};for(const e in s)"default"!==e&&(i[e]=()=>s[e]);r.d(t,i);var o=r(530994);i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);r.d(t,i)},367186:(e,t,r)=>{"use strict";r.d(t,{S:()=>h});var n=r(625873),i=r(689275),s=r(646979),o=r(434842),a=r(174561),c=r(979171),u=r(7299
300),l=r(170209),d=r(610338);class p extends Error{constructor(e,t){super(`Version ${e} is stale. Use force to overwrite.`),this.updated=t,this.name="StaleVersionError"}}async function h(e,t,r,h){if(!h){const n=await(0,d.P)(e.item.id,t,r);if(n.isStale)throw new p(t.id,n.updated)}const m=(0,u.n)(e);t.data=(0,a.h)(e,m);const f=(0,o.G)(t.id);t.updated=Date.now();const g=(0,s.O)(t),y=(0,i.P)(t,{},c.V);return await(0,l.zy)(Object.assign(Object.assign({},r),{id:(0,n.W)(e,"item.id"),name:c.M,owner:(0,n.W)(e,"item.owner"),params:{properties:y},prefix:f,resource:g})),t}},273640:(e,t,r)=>{"use strict";r.d(t,{V:()=>u});var n=r(689275),i=r(646979),s=r(434842),o=r(979171),a=r(304360),c=r(170209);async function u(e,t,r,u){const l=(0,s.G)(t.id),d=(0,n.P)(t,{},o.V),p=await(0,a.b)(e,t.id,u);(0,n.P)(t,p,o.V);const h=(0,i.O)(p);return await(0,c.zy)(Object.assign(Object.assign({},u),{id:e,name:o.M,owner:r,params:{properties:d},prefix:l,resource:h})),t}},610338:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,P:()=>c});var n=r(329644),i=r(689275),s=r(304360),o=r(72990);function a(e,t,r){return r||(r=(0,o.n)(e)),(0,i.P)(t.data,(0,n.kI)(e),r)}
31async function c(e,t,r){const n=await(0,s.b)(e,t.id,r);return{isStale:n.updated>t.updated,updated:n.updated}}},282526:(e,t,r)=>{"use strict";function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}r.d(t,{_T:()=>n})},457278:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(625873),i=r(622656);function s(e,t){const r=(0,n.W)(e,"item.properties.parentInitiativeId");if(r){const n=Object.assign({id:r,owner:e.item.owner},t);return(0,i.$)(n)}return Promise.resolve()}},805579:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(849287);function i(e,t){return t.isPortal?Promise.resolve([]):(0,n.removeDomainsBySiteId)(e,t).then((e=>e))}},264893:(e,t,r)=>{"use strict";r.d(t,{e:()=>i});var n=r(67869);function i(e,t){if(t.isPortal)return Promise.resolve();{const r=`${(0,n.g)(t)}/api/v3/${e.item.id}`,i={method:"DELETE",mode:"cors",headers:{Authorization:t.authentication.token}};return fetch(r,i).then((e=>e.json())).then((e=>({success:!0}))).catch((e=>{throw Error(`_removeSiteFromIndex: Error removing site from index: ${e}`)}))}}},552865:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});var n=r(329644),i=r(625873),s=r(849287);function o(e,t){const r=["collaborationGroupId","contentGroupId","followersGroupId"].reduce(((t,r)=>(0,n.Yp)((0,i.W)(e,`item.properties.${r}`),t)),[]).map((e=>{const r=Object.assign({id:e},t);return(0,s._unprotectAndRemoveGroup)(r)}));return Promise.all(r)}},910238:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DEFAULT_THEME:()=>n.DEFAULT_THEME,PAGE_DRAFT_INCLUDE_LIST:()=>i,PAGE_TEMPLATE_KEYWORD:()=>ve,PAGE_TYPE_KEYWORD:()=>ye,SITE_DRAFT_INCLUDE_LIST:()=>s,UNPUBLISHED_CHANGES_KW:()=>o,_createSiteInitiative:()=>at,_ensureOptionalGroupsTemplating:()=>He,_ensurePortalDomainKeyword:()=>S,_ensureTypeAndTags:()=>We,_getDraftResourceNames:()=>D,_getImageCropIdsFromLayout:()=>G,_getMostRecentDraftName:()=>R,_getPortalDomainTypeKeyword:()=>w,_getSecondPassSharingOptions:()=>Et,_getSharingEligibleModels:()=>Tt,_getSiteDataById:()=>St,_includeListFromItemType:()=>l,_removeParentInitiative:()=>Fe.k,_removeSiteDomains:()=>Le.v,_removeSiteFromIndex:()=>Ge.e,_removeSiteGroups:()=>$e.N,_secondPassAdlibPages:()=>Ct,_updatePages:()=>At,_updateTeamTags:()=>ct,addDomain:()=>n.addDomain,applyDraft:()=>$,buildDraft:()=>n.buildDraft,convertCard:()=>z,convertLayoutToTemplate:()=>te,convertPageToTemplate:()=>De,convertRow:()=>J,convertSection:()=>X,convertSiteToTemplate:()=>wt,createPage:()=>Ie,createPageModelFromTemplate:()=>xe,createSite:()=>et,createSiteModelFromTemplate:()=>bt,deleteDraft:()=>P,domainExists:()=>n.domainExists,domainExistsPortal:()=>n.domainExistsPortal,ensureOptionalGroupsTemplating:()=>Je,ensurePageHasSiteEntry:()=>Re,ensureRequiredPageProperties:()=>be,ensureRequiredSiteProperties:()=>Ze,ensureUniqueDomainName:()=>n.ensureUniqueDomainName,extractAssets:()=>Z,fetchAndApplyDraft:()=>F,fetchDraft:()=>j,getCardDependencies:()=>re,getDataForSiteItem:()=>_t,getDomain:()=>je,getDomains:()=>Ne,getDomainsForSite:()=>n.getDomainsForSite,getDraftDate:()=>x,getLayoutDependencies:()=>se,getMembers:()=>Pt,getPageDependencies:()=>fe,getPageEditUrl:()=>me,getPageItemType:()=>ge,getPortalSiteHostname:()=>tt,getPortalSiteUrl:()=>rt,getRowDependencies:()=>ne,getSectionDependencies:()=>ie,getSiteById:()=>n.getSiteById,getSiteDependencies:()=>_e,getSiteEditUrl:()=>qe,getSiteItemType:()=>Be,getUniqueDomainName:()=>n.getUniqueDomainName,getUniqueDomainNamePortal:()=>n.getUniqueDomainNamePortal,hasUnpublishedChanges:()=>d,interpolateSite:()=>yt,isDomainForLegacySite:()=>n.isDomainForLegacySite,isDomainUsedElsewhere:()=>n.isDomainUsedElsewhere,isPage:()=>u,isSite:()=>c,isValidDomain:()=>n.isValidDomain,linkSiteAndPage:()=>Te,lookupDomain:()=>n.lookupDomain,markPublished:()=>h,markUnpublished:()=>m,removeDomain:()=>n.removeDomain,removePage:()=>he,removeSite:()=>Qe.$,removeSiteFromPage:()=>le,removeUnusedResources:()=>oe,saveDraft:()=>k,savePublishedStatus:()=>A,shareItemsToSiteGroups:()=>It,siteSecondPass:()=>Ot,unlinkPagesFromSite:()=>Ye.f,unlinkSiteAndPage:()=>pe.L,updateAppRedirectUris:()=>ze,updateDomain:()=>n.updateDomain,updatePage:()=>C,updateSite:()=>T,updateSiteApplicationUris:()=>Ve,upgradeDraftSchema:()=>N,upgradeSiteSchema:()=>n.upgradeSiteSchema});var n=r(849287);const i=["data.values.layout"],s=["item.properties.schemaVersion","data.values.layout","data.values.theme","data.values.headerCss","data.values.headerSass","data.values.footerSass","data.values.footerCss"],o="state:hasUnpublishedChanges";var a=r(803754);function c(e){return"Hub Site Application"===(0,a.KF)(e)}function u(e){return"Hub Page"===(0,a.KF)(e)}function l(e){let t;if(c(e))t=s;else{if(!u(e))throw TypeError("@esri/hub-sites: drafts only belong to a site or a page item model");t=i}return t}function d(e){return(0,n.includes)(e.item.typeKeywords,o)}var p=r(329644);function h(e){const t=(0,p.kI)(e);return t.item.typeKeywords=t.item.typeKeywords.filter((e=>e!==o)),t}function m(e){const t=(0,p.kI)(e);return(0,n.includes)(t.item.typeKeywords,o)||t.item.typeKeywords.push(o),t}var f=r(422897),g=r(625873),y=r(689275),b=r(621922);const v="2.4";function w(e){return`hubsubdomain|${e}`.toLowerCase()}function S(e,t=[]){const r=w(e);return(0,n.includes)(t,r)?t:t.reduce(((e,t)=>(/^hubsubdomain/.test(t)||e.push(t),e)),[r])}var E=r(170209);function T(e,t){const r=t.allowList||[],{updateVersions:i=!0}=t;let s;return(0,f.q)(e,"data.values.uiVersion",v),(0,f.q)(e,"data.values.updatedAt",(new Date).toISOString()),(0,f.q)(e,"data.values.updatedBy",t.authentication.username),r.length&&(r.push("data.values.updatedAt"),r.push("data.values.updatedBy"),i&&(r.push("data.values.uiVersion"),r.push("item.properties.schemaVersion"))),t.isPortal&&(e.item.typeKeywords=S((0,g.W)(e,"data.values.subdomain"),e.item.typeKeywords),r.length&&r.push("item.typeKeywords")),s=r.length?(0,n.getSiteById
31)(e.item.id,t):Promise.resolve(e),s.then((n=>(r.length&&(e=(0,y.P)(e,n,r)),(0,E.$G)({item:(0,b.S)(e),authentication:t.authentication,params:{clearEmptyFields:!0}})))).catch((e=>{throw Error(`updateSite: Error updating site: ${e}`)}))}var I=r(404091);function C(e,t){const r=Array.isArray(t.allowList)?t.allowList:[];e.data.values.updatedAt=(new Date).toISOString(),e.data.values.updatedBy=t.authentication.username,e.item.url="";let n=Promise.resolve(e);return r.length&&(n=(0,I.PD)((0,g.W)(e,"item.id"),t)),n.then((n=>{r.length&&(e=(0,y.P)(e,n,r));const i=Object.assign({item:(0,b.S)(e)},t);return i.params={clearEmptyFields:!0},(0,E.$G)(i)}))}function A(e,t){const r=["item.typeKeywords"],{item:n}=e;let i;if(c(n)){const n=d(e);i=T(e,Object.assign(Object.assign({},t),{allowList:r,updateVersions:!n}))}else{if(!u(n))throw TypeError("@esri/hub-sites: only page or site models have a published state");i=C(e,Object.assign(Object.assign({},t),{allowList:r}))}return i}var O=r(646979);const _=/^draft-(\d+).json$/;function D(e,t){return(0,E.C)(e,{portal:t.portal,authentication:t.authentication}).then((e=>e.resources.map((({resource:e})=>e)).filter((e=>-1!==e.search(_)))))}function P(e,t){const{item:{id:r,owner:n}}=e;return D(r,t).then((e=>Promise.all(e.map((e=>(0,E.ug)({id:r,owner:n,resource:e,portal:t.portal,authentication:t.authentication}))))))}function k(e,t){const r=l(e.item),i=(0,n.buildDraft)(e,r),s=(0,O.O)(i),o=`draft-${Date.now()}.json`,a=(0,g.W)(e,"item.id");return P(e,t).then((r=>(0,E.zJ)({id:a,owner:(0,g.W)(e,"item.owner"),resource:s,name:o,private:!1,portal:t.portal,authentication:t.authentication}))).then((e=>i))}function x(e){const t=_.exec(e);let r;try{r=new Date(parseInt(t[1],10))}catch(e){r=null}return r}function R(e,t){return D(e,t).then((e=>{if(!e.length)return null;const t=e.map((e=>[e,x(e)]));return t.sort((([e,t],[r,n])=>n>t?1:t>n?-1:0)),t[0][0]}))}const U="item.properties.schemaVersion",M=1.3;function N(e){if(void 0===(0,g.W)(e,"item.properties.schemaVersion")&&(0,f.q)(e,U,M),e=(0,n.migrateBadBasemap)(e),e=(0,n.migrateWebMappingApplicationSites)(e),(0,g.W)(e,"item.properties.schemaVersion")===n.SITE_SCHEMA_VERSION)return e;{let t=e;return t=(0,n._ensureTelemetry)(e),t=(0,n._migrateFeedConfig)(e),t=(0,n._migrateEventListCardConfigs)(e),t=(0,n._migrateTelemetryConfig)(e),t=(0,n._migrateToV2Catalog)(e),t}}function j(e,t){return R(e,t).then((r=>{let n=null;return r&&(n=(0,E.AA)(e,{fileName:r,readAs:"json",authentication:t.authentication,portal:t.portal})),n})).then((e=>(e&&function(e){return void 0!==(0,g.W)(e,"data.values.capabilities")&&void 0!==(0,g.W)(e,"data.values.theme")}(e)&&(e=N(e)),e)))}function $(e,t){if(!t)return e;const r=l(e.item);return(0,y.P)(t,(0,p.kI)(e),r)}function F(e,t){return j((0,g.W)(e,"item.id"),t).then((t=>$(e,t)))}function G(e){const t=[],r=(0,g.W)(e,"header.component.settings.logo");return r&&r.cropId&&t.push(r),((0,g.W)(e,"sections")||[]).reduce(L,t).filter(q).map(V)}function L(e,t){const r=t.rows.reduce(H,[]).filter(B).map(W);return(0,g.W)(t,"style.background.cropSrc")&&r.unshift(t.style.background),e.concat(r)}function H(e,t){return e.concat(t.cards)}function B(e){return["image-card","jumbotron-card"].indexOf(e.component.name)>-1}function W(e){return e.component.settings}function q(e){return!!e.cropId}function V(e){return e.cropId}const K={"event-list-card":function(e){return e.component.settings.initiativeIds=["{{initiative.item.id}}"],{card:e,assets:[]}},"follow-initiative-card":function(e){return e.component.settings.initiativeId="{{initiative.item.id}}",{card:e,assets:[]}},"items/gallery-card":function(e){const t=e.component.settings,r=(0,g.W)(t,"version");return(0,g.W)(t,"groups")&&r<4&&(t.groups=[{title:"{{solution.title}}",id:"{{teams.contentGroupId}}"}]),(0,g.W)(t,"query.groups")&&(t.query.groups=r>=4?["{{teams.contentGroupId}}"]:[{title:"{{solution.title}}",id:"{{teams.contentGroupId}}"}]),(0,g.W)(t,"query.orgId")&&(t.query.orgId="{{organization.id}}"),(0,g.W)(t,"orgId")&&(t.orgId="{{organization.id}}"),t.siteId&&(t.siteId="{{appid}}"),{card:e,assets:[]}},"image-card":Y,"jumbotron-card":Y};function z(e){const t=(0,p.kI)(e),r=K[t.component.name];return r?r(t):{card:t,assets:[]}}function Y(e){const t={card:e,assets:[]};return(0,g.W)(e,"component.settings.fileSrc")&&t.assets.push(e.component.settings.fileSrc),(0,g.W)(e,"component.settings.cropSrc")&&t.assets.push(e.component.settings.cropSrc),t}function J(e){return e.cards.reduce(Q,{assets:[],cards:[]})}function Q(e,t){const r=z(t);return e.assets=e.assets.concat(r.assets),e.cards.push(r.card),e}function Z(e){const t=[];
31return e.fileSrc&&t.push(e.fileSrc),e.cropSrc&&t.push(e.cropSrc),t}function X(e){const{rows:t,assets:r}=e.rows.reduce(ee,{assets:[],rows:[]}),n={section:(0,p.kI)(e),assets:r};var i;return n.section.rows=t,i=e,(0,g.W)(i,"style.background.fileSrc")&&n.assets.push(...Z(e.style.background)),n}function ee(e,t){const{assets:r,cards:n}=J(t);return e.assets.push(...r),e.rows.push({cards:n}),e}function te(e){if(!e)return null;const t=e.sections.reduce(((e,t)=>{const r=X(t);return e.assets=e.assets.concat(r.assets),e.sections.push(r.section),e}),{assets:[],sections:[]}),r={assets:t.assets,layout:{sections:t.sections}};return e.header&&(r.layout.header=(0,p.kI)(e.header)),e.footer&&(r.layout.footer=(0,p.kI)(e.footer)),r}function re(e){return function(e){switch(e){case"webmap-card":return["component.settings.webmap"];case"survey-card":return["component.settings.surveyId"];case"app-card":case"summary-statistic-card":return["component.settings.itemId"];case"items/gallery-card":return["component.settings.ids"];default:return[]}}((0,g.W)(e,"component.name")).reduce(function(e){return(t,r)=>{const n=(0,g.W)(e,r);return n?Array.isArray(n)?t.concat(n):t.concat([n]):t}}(e),[])}function ne(e){return e.cards.reduce(((e,t)=>{const r=re(t);return r.length&&(e=e.concat(r)),e}),[])}function ie(e){return e.rows.reduce(((e,t)=>e.concat(ne(t))),[])}function se(e){return e.sections.reduce(((e,t)=>e.concat(ie(t))),[])}function oe(e,t,r){const i=G(t);return(0,E.C)(e,r).then((t=>{const s=(t.resources||[]).map(ae).filter(ce);delete r.params;const o=function(e,t){return function(e){return e.length>0}(e)?t.filter(function(e){const t=new RegExp(`-crop-(${e.join("|")}).png$`);return e=>!e.match(t)}(e)):t}(i,s);return function(e,t,r){const i=(0,n.failSafe)(E.ug,{success:!0});return Promise.all(t.map((t=>i({id:e,resource:t,authentication:r}))))}(e,o,r.authentication)}))}function ae(e){return e.resource}function ce(e){return 0===e.indexOf("hub-image-card-crop-")}var ue=r(551753);function le(e,t){return(0,ue.t)(t,"data.values.sites",[]).filter((t=>t.id!==e))}var de=r(59625),pe=r(409450);function he(e,t){let r,i=Promise.resolve(e);return"string"==typeof e&&(i=(0,I.PD)(e,t)),i.then((e=>{r=e;const i=(0,n.mapBy)("id",(0,ue.t)(r,"data.values.sites",[])),s=(0,n.failSafe)(pe.L);return Promise.all(i.map((e=>{const n=Object.assign({pageModel:r,siteId:e},t);return s(n)})))})).then((()=>(0,de.v)(r,t))).then((()=>{const e=Object.assign({id:r.item.id},t);return(0,E.cl)(e)}))}function me(e,t,r){let n="";return t&&(n=r),`${n}/edit?pageId=${e.id}`}function fe(e){return se((0,ue.t)(e,"data.values.layout",{}))}function ge(e){let t="Hub Page";return e&&(t="Site Page"),t}const ye="hubPage";function be(e,t){const r=(0,p.kI)(e);return r.item.owner=t.username,r.item.access="private",r.data.values||(r.data.values={}),r.data.values.updatedAt=(new Date).toISOString(),r.data.values.updatedBy=t.username,r.data.values.sites||(r.data.values.sites=[]),r.item.url&&(r.item.url=""),r.item.type=ge(t.isPortal),-1===r.item.typeKeywords.indexOf(ye)&&r.item.typeKeywords.push(ye),r}const ve="hubPageTemplate";var we=r(130939),Se=r(964033),Ee=r(932818);function Te(e){let t=[];const r=[];let i,s;const o={authentication:e.authentication};return Promise.all([(0,Se.G)("page",e),(0,Se.G)("site",e)]).then((a=>{if([i,s]=a,s.isMissing||i.isMissing){let e=`The Page item (${i.item.id}) is inaccessible.`;throw s.isMissing&&(e=i.isMissing?`Both the Page item (${i.item.id}) and the Site item (${s.item.id}) are inaccssible`:`The Site item (${s.item.id}) is inaccessible.`),new Error(`Linking Failed: ${e}`)}{if(!c(s.item)||!(0,n.includes)(["Hub Page","Site Page"],i.item.type))return Promise.resolve([]);const a={id:s.item.id,title:s.item.title};(0,g.W)(i,"data.values.sites")||(0,f.q)(i,"data.values.sites",[]);const u=(0,g.W)(i,"data.values.sites");if(!(0,n.includes)(u.map((e=>e.id)),a.id)){i.data.values.sites.push(a);const e=Object.assign({item:(0,b.S)(i)},o);r.push((0,E.$G)(e))}const l={id:i.item.id,title:i.item.title};(0,g.W)(s,"data.values.pages")||(0,f.q)(s,"data.values.pages",[]);const d=(0,g.W)(s,"data.values.pages");if(!(0,n.includes)(d.map((e=>e.id)),l.id)){const t=(0,n.mapBy)("slug",d);l.slug=e.pageSlug||(0,n.ensureUniqueString)(t,(0,n.slugify)(l.title)),s.data.values.pages.push(l);const i=Object.assign({item:(0,b.S)(s)},o);
31r.push((0,E.$G)(i))}t=(0,p.Yp)((0,g.W)(s,"item.properties.collaborationGroupId"),t),t=(0,p.Yp)((0,g.W)(s,"item.properties.contentGroupId"),t);const h=(0,n.failSafe)(Ee.L);return r.push(h(l.id,t,o)),Promise.all(r)}})).then((()=>({pageModel:i,siteModel:s}))).catch((e=>{throw Error(`Error occured linking site ${s.item.id} with ${i.item.id}: ${e}`)}))}function Ie(e,t,r){if(!r.authentication)throw new Error("createPage must be passed hubRequestOptions.authentication");const n=be(e,{username:r.authentication.username,isPortal:r.isPortal}),i=(0,b.S)(n);return(0,E.fC)({item:i,owner:n.item.owner,authentication:r.authentication}).then((e=>(n.item.id=e.id,(0,E.Q4)({id:n.item.id,owner:n.item.owner,authentication:r.authentication})))).then((e=>{let i=[];return Array.isArray(t.shareTo)&&t.shareTo.length&&(i=t.shareTo.map((e=>(0,E.Ju)({id:n.item.id,groupId:e.id,authentication:r.authentication,confirmItemControl:e.confirmItemControl||!1}))),n.item.access="shared"),Promise.all(i)})).then((e=>{const t=(0,ue.t)(n,"data.values.sites",[]),i={authentication:r.authentication};return Promise.all(t.map((e=>Te(Object.assign({siteId:e.id,pageModel:n},i)))))})).then((e=>{const i=(0,ue.t)(t,"assets",[]);return(0,we.x)(n,i,r)})).then((()=>n)).catch((e=>{throw Error(`createPage: Error creating page: ${e}`)}))}var Ce=r(201985),Ae=r(865999),Oe=r(517815);function _e(e){const t=((0,g.W)(e,"data.values.pages")||[]).map((e=>e.id));return se((0,g.W)(e,"data.values.layout")||{}).concat(t)}function De(e,t){const r=(0,p.kI)(e);r.type=ge(t.isPortal),r.key=`${(0,n.propifyString)(e.item.title)}_${(0,p.Mc)("i")}`,r.itemId=e.item.id,r.item=(0,Ce.y)(r.item),r.data.values.sites=[],["source","updatedAt","updatedBy","folderId","slug"].forEach((e=>{delete r.data.values[e]}));const i=te(r.data.values.layout);return r.data.values.layout=i.layout,r.dependencies=_e(e),r.data=(0,Ae.P)(r.data,r.itemId),r.item.properties||(r.item.properties={}),(0,Oe.t)(e.item,t).then((e=>(r.assets=e.filter((e=>-1===e.name.search(_))),r)))}var Pe=r(194479),ke=r(723717);function xe(e,t,r,i){e.assets=(0,Pe.l)(e,i);const s=(0,ke.s)(e,t,r);s.item.properties||(s.item.properties={});const o=(0,g.W)(t,"initiative.id");return o&&(0,f.q)(s,"item.properties.parentInitiativeId",o),(0,f.q)(s,"data.values.slug",(0,n.slugify)(s.item.title)),Promise.resolve(s)}function Re(e,t){const r=e.item.id,n=(0,g.W)(e,"item.properties.parentInitiativeId");if(n){const e=(0,g.W)(t,"data.values.sites").find((e=>e.id===n));e&&(e.id=r)}return(0,g.W)(t,"data.values.sites").find((e=>e.id===r))||t.data.values.sites.push({id:r,title:"Current Site to ensure clean removal"}),t}var Ue=r(348753),Me=r(67869);function Ne(e,t){const r=(0,n._getDomainServiceUrl)((0,Me.g)(t)),i=Object.assign({params:{siteId:e},httpMethod:"GET"},t);return(0,Ue.WY)(r,i)}function je(e,t){return Ne(e,t).then((e=>{if(e.length>1){const t=e.reduce(((e,t)=>(t.hostname.includes("arcgis.com")||(e=t),e)),null);return t?t.hostname:e[0].hostname}return e[0].hostname}))}var $e=r(552865),Fe=r(457278),Ge=r(264893),Le=r(805579);function He(e){const t=(0,p.kI)(e);return["collaborationGroupId","contentGroupId","followersGroupId"].forEach((e=>{const r=(0,g.W)(t,`properties.${e}`);r&&(r.match(/^\{\{.*\}\}$/)?r.match(/:optional\}\}$/g)||(t.properties[e]=r.replace("}}",":optional}}")):delete t.properties[e])})),t}function Be(e){let t="Hub Site Application";return e&&(t="Site Application"),t}function We(e,t){return(e=(0,p.kI)(e)).item.type=Be(t),Array.isArray(e.item.typeKeywords)||(e.item.typeKeywords=[]),(0,n.includes)(e.item.typeKeywords,"hubSite")||e.item.typeKeywords.push("hubSite"),e}function qe(e){return`${e.url}/edit`}function Ve(e,t,r){return r.isPortal?Promise.resolve({}):(0,n.getDomainsForSite)(e.item.id,r).then((i=>{const s=i.filter((e=>!(0,n.includes)(t,e.hostname))),o=i.map((e=>e.hostname)),a=t.filter((e=>!(0,n.includes)(o,e))),c=[];return s.forEach((e=>c.push((0,n.removeDomain)(e.id,r)))),a.forEach((t=>c.push((0,n.addDomain)({orgKey:r.portalSelf.urlKey,orgId:r.portalSelf.id,orgTitle:r.portalSelf.name,hostname:t,siteId:e.item.id,siteTitle:e.item.title,clientKey:e.data.values.clientId,sslOnly:!i[0]||!!i[0].sslOnly},r)))),Promise.all(c)}))}var Ke=r(16933);function ze(e,t,r){const n=`${(0,Ke.i)(r)}/oauth2/apps/${e}/update`,i={method:"POST",authentication:r.authentication,params:{client_id:e,redirect_uris:JSON.stringify(t)}};return(0,Ue.WY)(n,i)}var Ye=r(43499);function Je(e){const t=(0,p.kI)(e);return["collaborationGroupId","contentGroupId","followersGroupId"].forEach((e=>{const r=(0,g.W)(t,`properties.${e}`);r&&(r.match(/^\{\{.*\}\}$/)?r.match(/:optional\}\}$/g)||(t.properties[e]=r.replace("}}",":optional}}")):delete t.properties[e])})),t}var Qe=r(593922);function Ze(e,t,r=!1){if((e=(0,p.kI)(e)).item.owner=t,e.item.access="private",Array.isArray(e.item.typeKeywords)||(e.item.typeKeywords=[]),e.data.values.updatedAt=(new Date).toISOString(),e.data.values.updatedBy=t,r&&e.item.typeKeywords.push(w(e.data.values.subdomain)),!e.item.url){const t=(0,g.W)(e,"data.values.customHostname")||(0,g.W)(e,"data.values.defaultHostname");let r="https";e.data.values.customHostname&&(r="http"),e.item.url=`${r}://${t}`}Array.isArray((0,g.W)(e,"data.values.pages"))||(0,f.q)(e,"data.values.pages",[]),(0,f.q)(e,"data.values.uiVersion",v);const n=((e=We(e,r)).data.values.capabilities||[]).reduce(((e,t)=>e.includes(t)?e:[...e,t]),["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav"]);return r||n.includes("socialSharing")||n.push("socialSharing"),(0,f.q)(e,"data.values.capabilities",n),(0,g.W)(e,"data.telemetry")||(0,f.q)(e,"data.telemetry",{}),e}var Xe=r(243767);function et(e,t,r){return e=Ze(e,r.authentication.username,r.isPortal),(0,E.fC)({item:(0,b.S)(e),owner:e.item.owner,authentication:r.authentication}).then((t=>
31(e.item.id=t.id,(0,E.Q4)({id:e.item.id,owner:e.item.owner,authentication:r.authentication})))).then((t=>(0,n.addSiteDomains)(e,r))).then((t=>{e.data.values.clientId=t[0].clientKey;const n=(0,p.kI)(e.data.values.dcatConfig);return delete e.data.values.dcatConfig,e=(0,Xe.V)(e),n&&(e.data.values.dcatConfig=n),(0,E.$G)({item:(0,b.S)(e),authentication:r.authentication})})).then((n=>(0,we.x)(e,t.assets||[],r))).then((t=>{let n=Promise.resolve({success:!0});const i=(0,g.W)(e,"item.properties.collaborationGroupId");return i&&(n=(0,E.Ju)({id:e.item.id,groupId:i,authentication:r.authentication,confirmItemControl:!0})),n})).then((t=>{const i=(0,g.W)(e,"item.properties.parentInitiativeId");return i?function(e,t,r){let i=Promise.resolve(e);if("string"==typeof e){if(!(0,n.isGuid)(e))return Promise.reject(new Error("updateInitiativeSiteId was passed a string that is not a GUID."));i=(0,E.rV)(e,{authentication:r.authentication})}else if((0,g.W)(e,"item.id")){const t=e;i=Promise.resolve(t.item)}return i.then((e=>(e.properties||(e.properties={}),e.properties.siteId=t,(0,E.$G)({item:e,authentication:r.authentication}))))}(i,e.item.id,r):Promise.resolve(!0)})).then((t=>e)).catch((e=>{throw Error(`site-utils::createSite - Error creating site ${JSON.stringify(e)}`)}))}function tt(e,t){let r;r=t.allSSL?443!==t.httpsPort?`:${t.httpsPort}`:"":80!==t.httpPort?`:${t.httpPort}`:"";const n=t.portalHostname.split("/"),i=n[0];let s="/";return n[1]&&(s=`/${n[1]}/`),`${i}${r}${s}apps/sites/#/${e}`}function rt(e,t){let r="http:";return t.allSSL&&(r="https:"),`${r}//${tt(e,t)}`}var nt=r(568486),it=r(917544),st=r(364885);const ot={item:{title:"{{solution.title}}",snippet:"{{solution.snippet}}",description:"{{solution.snippet}}",type:"Hub Initiative",typeKeywords:["Hub","hubInitiative"],tags:[],extent:"{{organization.defaultExtentBBox}}",culture:"{{user.culture}}",properties:{},url:""},data:{assets:[],indicators:[],recommendedTemplates:[]}};function at(e,t,r,n){const i={};return function(e,t){let r;const n=(0,g.W)(e,"properties.initiativeTemplate");return r=n?Promise.resolve(n):function(e){const t=(0,nt.D)(e),r=(0,it.a)(t);return(0,st.Z)(r,e.portalSelf).then((e=>{const t=(0,p.kI)(ot);return t.item.description=(0,g.W)(e,"addons.services.templates.customInitiative.item.description"),t.item.snippet=(0,g.W)(e,"addons.services.templates.customInitiative.item.snippet"),t.item.culture=r,t}))}(t),r}(e,n).then((e=>(e.item.url=t.solution.url,e.item.title=t.solution.title,e.item.owner=n.authentication.username,e.item.typeKeywords=(0,p.zu)(e.item.typeKeywords,"Hub Initiative Template"),e.item.type="Hub Initiative",Object.assign(e.item.properties,t.teams),function(e,t){return function(e,t){const r=(0,p.kI)(e),n=function(e,t){const r=(0,p.kI)(e.item);return r.data=(0,p.kI)(e.data),Object.assign({item:r},t)}(r,t);return(0,E.fC)(n).then((e=>(r.item.id=e.id,r)))}(e,t)}((0,ke.s)(e,t,r),n)))).then((e=>{i.model=e;let r=Promise.resolve({success:!0});const s=(0,g.W)(t,"teams.collaborationGroupId");return s&&(r=(0,E.Ju)({id:e.item.id,groupId:s,authentication:n.authentication,confirmItemControl:!0})),r})).then((e=>i.model)).catch((e=>{throw Error(`site-utils::_createSiteInitiative Error ${e}`)}))}function ct(e,t,r){let n=Promise.resolve({success:!0});if((0,g.W)(t,"props.followersGroupId")){const i=t.groups.find((e=>e.id===t.props.followersGroupId));i.tags.push(`hubInitiativeFollowers|${e.item.id}`),n=(0,E.mD)({group:i,authentication:r.authentication})}return n}var ut=r(408923);const lt=[{config:{groupType:"Hub Collaboration Group",type:"core",availableIn:["premium"],propertyName:"collaborationGroupId",requiredPrivs:["portal:admin:createUpdateCapableGroup"],titleI18n:"collaborationTitle",descriptionI18n:"collaborationDesc",snippetI18n:"collaborationSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:"collaboration"}]},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",_edit_privacy:"on",_edit_contributors:"on",tags:["Hub Group","Hub Initiative Group","Hub Site Group","Hub Core Team Group","Hub Team Group"]},{config:{groupType:"Hub Collaboration Group",type:"core",availableIn:["basic"],propertyName:"collaborationGroupId",requiredPrivs:["portal:admin:createUpdateCapableGroup"],titleI18
31n:"collaborationTitleBasic",descriptionI18n:"collaborationDescBasic",snippetI18n:"collaborationSnippetBasic",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:"collaboration"}]},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",_edit_privacy:"on",_edit_contributors:"on",tags:["Hub Group","Hub Site Group","Hub Core Team Group","Hub Team Group"]},{config:{groupType:"Portal Collaboration Group",type:"core",availableIn:["portal"],propertyName:"collaborationGroupId",requiredPrivs:["portal:user:createGroup","portal:admin:createUpdateCapableGroup"],titleI18n:"collaborationTitlePortal",descriptionI18n:"collaborationDescPortal",snippetI18n:"collaborationSnippetPortal"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",_edit_privacy:"on",_edit_contributors:"on",tags:["Sites Group","Sites Core Team Group"]},{config:{groupType:"Hub Content Group",type:"content",availableIn:["premium"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitle",descriptionI18n:"contentDesc",snippetI18n:"contentSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:""}]},access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"org",tags:["Hub Group","Hub Content Group","Hub Site Group","Hub Initiative Group"]},{config:{groupType:"Hub Content Group",type:"content",availableIn:["basic"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitleBasic",descriptionI18n:"contentDescBasic",snippetI18n:"contentSnippetBasic",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:""}]},access:"public",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"org",tags:["Hub Group","Hub Content Group","Hub Site Group"]},{config:{groupType:"Portal Content Group",type:"content",availableIn:["portal"],propertyName:"contentGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"contentTitle",descriptionI18n:"contentDescPortal",snippetI18n:"contentSnippetPortal"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Sites Group","Sites Content Group"]},{config:{groupType:"Hub Followers Group",type:"followers",availableIn:["premium"],propertyName:"followersGroupId",requiredPrivs:["portal:user:createGroup"],titleI18n:"followersTitle",descriptionI18n:"followersDesc",snippetI18n:"followersSnippet",privPropValues:[{priv:"portal:user:addExternalMembersToGroup",prop:"membershipAccess",value:""}]},access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!0,notificationsEnabled:!0,sortField:"title",sortOrder:"asc",membershipAccess:"org",tags:["Hub Group","Hub Initiative Followers Group","Hub Initiative Group"]},{config:{groupType:"Generic AGO Site Team",type:"team",availableIn:["basic"],requiredPrivs:["portal:user:createGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Site Team Group"]},{config:{groupType:"Generic AGO Initiative Team",type:"team",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",membershipAccess:"",tags:["Hub Team Group"]},{config:{groupType:"Generic AGO Edit Supporting Team",type:"edit",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"teamTitle",descriptionI18n:"editTeamDesc",snippetI18n:"editTeamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",tags:["Hub Team Group"],typekeyword:["Hub Team","Hub Edit Supporting Team"]},{config:{groupType:"Generic Portal Edit Supporting Team",type:"edit",availableIn:["portal"],requiredPrivs:["portal:user:createGroup"],titleI18
31n:"teamTitle",descriptionI18n:"editTeamDesc",snippetI18n:"editTeamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",capabilities:"updateitemcontrol",membershipAccess:"org",tags:["Site Team Group"],typekeyword:["Site Team","Site Edit Supporting Team"]},{config:{groupType:"Generic Portal Team",type:"team",availableIn:["portal"],requiredPrivs:["portal:user:createGroup"],titleI18n:"teamTitle",descriptionI18n:"teamDesc",snippetI18n:"teamSnippet"},access:"org",autoJoin:!1,isInvitationOnly:!1,isViewOnly:!1,sortField:"modified",sortOrder:"desc",tags:["Site Team Group"]},{config:{groupType:"Generic Event Team",type:"event",availableIn:["premium"],requiredPrivs:["portal:user:createGroup","portal:user:addExternalMembersToGroup"],titleI18n:"eventTeamTitle",descriptionI18n:"eventTeamDesc",snippetI18n:"eventTeamSnippet"},access:"public",autoJoin:!0,isInvitationOnly:!1,isViewOnly:!1,sortField:"title",sortOrder:"asc",membershipAccess:"",tags:["Hub Group","Hub Event Group","Hub Initiative Group"]}];function dt(e,t){let r=!1;return Array.isArray(t)&&(r=t.every((t=>e.privileges.indexOf(t)>-1))),r}const pt={default:512,mJaJSax0KPHoCNB6:700,q5DTBtIqgaEcBe1j:700,z6hI6KRjKHvhNO0r:700,Xj56SBi2udA78cC9:700,"7ldwmV3MFwjrElY8":700},ht=["Demo & Marketing","Demo and Marketing","Organizational Plan","Community","In House","ConnectED","ELA","Education Site License","Education","HUP Online"];function mt(e,t,r=0){let n=e;return r&&(n=`${e} ${r}`),function(e,t){const r={q:`(title:"${e}" accountid:${t.portalSelf.id})`,authentication:t.authentication};return(0,E.td)(r).then((e=>e.results.length>0)).catch((e=>{throw Error(`Error in team-utils::doesGroupExist ${e}`)}))}(n,t).then((i=>i?(r++,mt(e,t,r)):n)).catch((e=>{throw Error(`Error in team-utils::getUniqueGroupTitle ${e}`)}))}const ft={public:["portal:user:createGroup","portal:user:shareGroupToPublic"],org:["portal:user:createGroup","portal:user:shareGroupToOrg"],private:["portal:user:createGroup"]};function gt(e,t,r){return t.access=function(e,t,r){const n=!!(0,g.W)(r,"canSharePublic")&&dt(t,ft.public),i=dt(t,ft.org);let s=e;return"public"!==e||n?"org"!==e||i||(s="private"):(s="org",i||(s="private")),s}(t.access,e,r.portalSelf),mt(t.title,r).then((e=>(t.title=e,(0,E.sS)({group:t,authentication:r.authentication})))).then((e=>(t.id=e.group.id,(0,E.Et)({id:t.id,authentication:r.authentication})))).then((()=>(t.userMembership={username:e.username,memberType:"owner",applications:0},t))).catch((e=>{throw Error(`Error in team-utils::_createTeamGroup ${e}`)}))}function yt(e,t,r){const n=(0,p.kI)(e),i=(0,p.kI)(n.data.values.dcatConfig),s=(0,p.kI)(n.data.feeds);delete n.data.values.dcatConfig,delete n.data.feeds;const o=(0,ke.s)(n,t,r);return i&&(o.data.values.dcatConfig=i),s&&(o.data.feeds=s),o}function bt(e,t,r,i){e.assets=(0,Pe.l)(e,i),e.item.properties||(e.item.properties={}),["customHostname","externalUrl","contentGroupId","followersGroupId","collaborationGroupId","parentInitiativeId"].forEach((t=>{delete e.data.values[t]}));let s=(0,g.W)(t,"solution.title")||"New Site";"number"==typeof s&&(s=s.toString(),(0,f.q)(t,"solution.title",s));const o={};return function(e){const{title:t,types:r,hubRequestOptions:i}=e,s=(0,n.getHubProduct)(i.portalSelf),o=(0,n.getSubscriptionType)(i.portalSelf),a=function(e,t,r=""){const i=lt,s=function(e,t){const r=(0,p.kI)(e),i=ht;return(0,n.includes)(i,t)||(r.privileges=(0,p.zu)(r.privileges,"portal:user:addExternalMembersToGroup")),r}(e,r);return(0,p.kI)(i).reduce(((e,r)=>{const i=function(e,t){const r=(0,p.kI)(t);return(0,ue.t)(t,"config.privPropValues",[]).forEach((t=>{(0,n.includes)(e.privileges,t.priv)&&(r[t.prop]=t.value)})),r}(s,r);return function(e,t,r){let i=!1;const s=(o=e.orgId,(pt[o]||pt.default)-5);var o;return((0,g.W)(e,"groups")||[]).length<=s&&(0,n.includes)(r.config.availableIn,t)&&(i=dt(e,r.config.requiredPrivs)),i}(s,t,i)&&e.push(i),e}),[])}(i.portalSelf.user,s,o).filter((e=>r.indexOf(e.config.type)>-1)),c=(0,nt.D)(i),u=(0,it.a)(c);return(0,st.Z)(u,i.portalSelf).then((e=>function(e,t,r,n){const i=t.map((t=>
31function(e,t,r){return["titleI18n","descriptionI18n","snippetI18n"].forEach((n=>{const i=e.config[n],s=n.replace("I18n",""),o=(0,g.W)(r,`addons.services.teams.groups.${i}`);e[s]=o.replace(/{title}/g,t)})),e}(t,e,r)));return Promise.all(i.map((e=>gt(n.portalSelf.user,e,n)))).then((e=>{const t=e.reduce(((e,t)=>(t.config.propertyName&&(e[t.config.propertyName]=t.id),e)),{});return e.forEach((e=>delete e.config)),{props:t,groups:e}})).catch((e=>{throw Error(`Error in team-utils::_createTeamGroups ${e}`)}))}(t,a,e,i))).catch((e=>{throw Error(`Error in team-utils::createHubTeams ${e}`)}))}({title:s,types:["core","content","followers"],hubRequestOptions:i}).then((r=>{t.teams=(0,p.kI)(r.props),o.teams=r,Object.assign(e.item.properties,r.props),(0,g.W)(r,"props.contentGroupId")&&(0,f.q)(e,"data.catalog.groups",[r.props.contentGroupId]);let a=s;return function(e){return e.charCodeAt(0)>255||vt.test(e)}(a)&&(a="site"),(0,n.ensureUniqueDomainName)((0,n.slugify)(a),i)})).then((e=>{const r=i.portalSelf;if(t.solution.theme=(0,n.getOrgDefaultTheme)(r),t.solution.subdomain=e,i.isPortal)t.solution.defaultHostname=tt(e,r),t.solution.url=rt(e,r);else{const n=(0,ut.G)((0,Me.g)(i));t.solution.defaultHostname=`${e}-${r.urlKey}.${n}`,t.solution.url=`https://${e}-${r.urlKey}.${n}`}})).then((n=>{const i=yt(e,t,r);return"number"==typeof i.item.title&&(i.item.title=(0,g.W)(t,"solution.title"),i.data.values.title=(0,g.W)(t,"solution.title")),i})).catch((e=>{throw Error(`site-utils::createSiteModelFromTemplate Error ${e}`)}))}const vt=/[^\u0000-\u00ff]/;function wt(e,t){const r=(0,p.kI)(e);r.type=Be(t.isPortal),r.key=`${(0,n.propifyString)(e.item.title)}_${(0,p.Mc)("i")}`,r.itemId=e.item.id,r.item=(0,Ce.y)(r.item),delete r.item.url,r.item.properties={schemaVersion:n.SITE_SCHEMA_VERSION,children:[]},r.item.title="{{solution.title}}",r.data.values.subdomain="{{solution.subdomain}}",r.data.values.defaultHostname="{{solution.defaultHostname}}",r.data.values.title="{{solution.title}}",r.data.values.subdomain="{{solution.subdomain}}",r.data.values.defaultHostname="{{solution.defaultHostname}}",delete r.data.catalog,delete r.data.values.collaborationGroupId,["updatedAt","updatedBy","clientId","siteId"].forEach((e=>{r.data.values[e]=""})),["customHostname","externalUrl","contentGroupId","followersGroupId","groups"].forEach((e=>{delete r.data.values[e]})),(0,g.W)(r,"data.values.defaultExtent")&&(r.data.values.defaultExtent="{{organization.defaultExtent}}"),(0,g.W)(r,"data.values.map.basemaps.primary.extent")&&(r.data.values.map.basemaps.primary.extent="{{organization.defaultExtent}}");const i=te(r.data.values.layout);return r.data.values.layout=i.layout,r.data=(0,Ae.P)(r.data,r.itemId),r.dependencies=_e(e),(0,Oe.t)(e.item,t).then((e=>(r.assets=e.filter((e=>-1===e.name.search(_))),r)))}function St(e,t){return(0,E.m_)(e,t).then((e=>(e.values.groupId&&!e.values.collaborationGroupId&&(e.values.collaborationGroupId=e.values.groupId,delete e.values.groupId),e)))}function Et(e){return[{prop:"item.properties.contentGroupId",itemControl:!1},{prop:"item.properties.collaborationGroupId",itemControl:!0}].reduce(((t,r)=>{const n=(0,g.W)(e,r.prop);return n&&t.push({id:n,confirmItemControl:r.itemControl}),t}),[])}function Tt(e,t,r){return function(e,t,r){const i=e=>(0,n.getSurveyModels)(e.item,r).then((({form:e,featureService:t,fieldworker:r,stakeholder:n})=>[e,t,r,n].filter(Boolean))),s=t.reduce(((e,t)=>"Form"===t.item.type?[...e,i(t)]:e),[Promise.resolve([e])]);return Promise.all(s).then((e=>e.reduce(((e,t)=>[...e,...t]),[])))}(e,t,r).then((e=>t.reduce(((t,r)=>e.find((({item:{id:e}})=>r.item.id===e))?t:[...t,r]),[])))}function It(e,t,r){const i=(0,n.failSafe)(E.Ju,{success:!0}),s=Et(e);return Tt(e,t,r).then((e=>Promise.all(e.reduce(((e,t)=>{const n=s.map((e=>{const n={id:t.item.id,groupId:e.id,confirmItemControl:e.confirmItemControl,authentication:r.authentication};return i(n)}));return e.concat(n)}),[]))))}function Ct(e,t){const r={teams:["collaborationGroupId","followersGroupId","contentGroupId"].reduce(((t,r)=>{const n=(0,g.W)(e,`item.properties.${r}`);return n&&(t[r]=n),t}),{}),siteId:(0,g.W)(e,"item.id"),siteUrl:(0,g.W)(e,"item.url"),initiative:{item:{id:(0,g.W)(e,"item.properties.parentInitiativeId")}}};return r[e.key]=e,(0,ke.s)(t,r)}function At(e,t,r){const i=t.filter((e=>e.item.type.indexOf("Page")>-1)),s=(0,n.failSafe)(E.$G,{success:!0}),o={id:e.item.id,title:e.item.title};return Promise.all(i.map((t=>(t.data.values.sites.push(o),t=Ct(e,t),s({item:(0,b.S)(t),authentication:r.authentication})))))}function Ot(e,t,r){let n=[];return n=n.concat(It(e,t,r)),n=n.concat(At(e,t,r)),Promise.all(n)}function _t(e,t){return(0,E.m_)(e.id,t).then((t=>(0,n.upgradeSiteSchema)({item:e,data:t})))}var Dt=r(163044);function Pt(e,t){return t.authentication?function(e,t){const r=`${(0,Dt.a)(t)}/sharing/rest/community/users`,i=[];for(let t=0;t<e.length;t+=100)i.push(e.slice(t,t+100));const s=i.map((e=>{const n=e.map((e=>`username:"${e}"`)).join(" OR ");return{urlPath:r,requestOptions:Object.assign({params:{filter:n,num:e.length}},t)}}));return(0,n.batch)(s,kt).then((e=>e.reduce(((e,t)=>e.concat(t)),[])))}(e,t):function(e,t){return Promise.all(e.map((e=>(0,E.PR)(Object.assign({username:e},t)).then((e=>{if(e.firstName||e.lastName||e.fullName)return e})).catch((t=>(n.Logger.error(`Error fetching user, ${e}, from AGO user endpoint, ${t}`),null)))))).then((e=>e.filter(Boolean)))}(e,t)}function kt(e){return(0,Ue.WY)(e.urlPath,e.requestOptions).then((e=>e.results)).catch((e=>(n.Logger.error(`Error fetching members from AGO user search endpoint: ${e}`),[])))}},593922:(e,t,r)=>{"use strict";r.d(t,{$:()=>d});var n=r(404091),i=r(849287),s=r(622656),o=r(43499),a=r(552865),c=r(457278),u=r(805579),l=r(264893);function d(e,t){let r,d;return r="string"==typeof e?(0,n.PD)(e,t):Promise.resolve(e),r.then((e=>(d=e,(0,o.f)(d,t)))).then((()=>(0,a.N)(d,t))).then((()=>(0,c.k)(d,t))).then((()=>(0,u.v)(d.item.id,t))).then((()=>(0,i.failSafe)(l.e,{success:!0})(d,t))).then((()=>{const e=Object.assign({id:d.item.id,owner:d.item.owner},t);return(0,s.$)(e)})).catch((e=>{throw Error(`removeSite: Error removing site: ${e}`)}))}},43499:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var n=r(849287),i=r(551753),s=r(409450);function o(e,t){const r=(0,n.mapBy)("id",(0,i.t)(e,"data.values.pages",[])),o=(0,n.failSafe)(s.L);return Promise.all(r.map((r=>{const n=Object.assign({siteModel:e,pageId:r},t);return o(n)})))}},409450:(e,t,r)=>{"use strict";r.d(t,{L:()=>l});var n=r(964033),i=r(551753),s=r(849287),o=r(329644),a=r(625873),c=r(526996),u=r(540702);function l(e){let t=[];const r=[];let l,d;const p={authentication:e.authentication};return Promise.all([(0,n.G)("page",e),(0,n.G)("site",e)]).then((e=>{if([l,d]=e,!d.isMissing){const e=(0,i.t)(d,"data.values.pages",[]);d.data.values.pages=(0,s.withoutByProp)("id",l.item.id,e),t=(0,o.Yp)((0,a.W)(d,"item.properties.collaborationGroupId"),t),t=(0,o.Yp)((0,a.W)(d,"item.properties.contentGroupId"),t),r.push((0,c.A)(d,p))}if(!l.isMissing){const e=(0,i.t)(l,"data.values.sites",[]);l.data.values.sites=(0,s.withoutByProp)("id",d.item.id,e),r.push((0,c.A)(l,p));const n=(0,s.failSafe)(u.z);r.push(n(l.item.id,t,p))}return Promise.all(r)})).then((()=>({pageModel:l,siteModel:d})))}},963333:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>s,__asyncDelegator:()=>w,__asyncGenerator:()=>v,__asyncValues:()=>S,__await:()=>b,__awaiter:()=>l,__classPrivateFieldGet:()=>C,__classPrivateFieldSet:()=>A,__createBinding:()=>p,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>I,__importStar:()=>
vendor: 4,184 bytes, line 31
31T,__makeTemplateObject:()=>E,__metadata:()=>u,__param:()=>c,__read:()=>f,__rest:()=>o,__spread:()=>g,__spreadArrays:()=>y,__values:()=>m});var n=function(e,t){return n=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])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function p(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function h(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){
31s.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(c,u):l(s[0][2],r)}catch(e){l(s[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function I(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},321442:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AdobeAnalytics:()=>s});var n=r(785913);function i(){function e(e){var t=this;t.version="2.23.0";var r=window;r.s_c_in||(r.s_c_il=[],r.s_c_in=0),t._il=r.s_c_il,t._in=r.s_c_in,t._il[t._in]=t,r.s_c_in++,t._c="s_c";var n=r.AppMeasurement.mc;n||(n=null);var i,s,o,a=r;try{for(i=a.parent,s=a.location;i&&i.location&&s&&""+i.location!=""+s&&a.location&&""+i.location!=""+a.location&&i.location.host===s.host;)i=(a=i).parent}catch(e){}t.log=function(e){try{console.log(e)}catch(e){}},t.Sa=function(e){return""+parseInt(e)==""+e},t.replace=function(e,t,r){return!e||0>e.indexOf(t)?e:e.split(t).join(r)},t.escape=function(e){var r,n;if(!e)return e;for(e=encodeURIComponent(e),r=0;7>r;r++)n="+~!*()'".substring(r,r+1),0<=e.indexOf(n)&&(e=t.replace(e,n,"%"+n.charCodeAt(0).toString(16).toUpperCase()));return e},t.unescape=function(e){if(!e)return e;e=0<=e.indexOf("+")?t.replace(e,"+"," "):e;try{return decodeURIComponent(e)}catch(e){}return unescape(e)},t.Rb=function(){var e,n=r.location.hostname,i=t.fpCookieDomainPeriods;if(i||(i=t.cookieDomainPeriods),n&&!t.La&&!/^[0-9.]+$/.test(n)&&(i=2<(i=i?parseInt(i):2)?i:2,0<=(e=n.lastIndexOf(".")))){for(;0<=e&&1<i;)e=n.lastIndexOf(".",e-1),i--;t.La=0<e?n.substring(e):n}return t.La},t.c_r=t.cookieRead=function(e){e=t.escape(e);var r=" "+t.d.cookie,n=r.indexOf(" "+e+"="),i=0>n?n:r.indexOf(";",n);return"[[B]]"!=(e=0>n?"":t.unescape(r.substring(n+2+e.length,0>i?r.length:i)))?e:""},t.c_w=t.cookieWrite=function(e,r,n){var i,s=t.Rb(),o=t.cookieLifetime;return r=""+r,o=o?(""+o).toUpperCase():"",n&&"SESSION"!=o&&"NONE"!=o&&((i=""!=r?parseInt(o||0):-60)?(n=new Date).setTime(n.getTime()+1e3*i):1===n&&(i=(n=new Date).getYear(),n.setYear(i+2+(1900>i?1900:0)))),e&&"NONE"!=o?(t.d.cookie=t.escape(e)+"="+t.escape(""!=r?r:"[[B]]")+"; path=/;"+(n&&"SESSION"!=o?" expires="+n.toUTCString()+";":"")+(s?" domain="+s+";":"")+(t.writeSecureCookies?" secure;":""),t.cookieRead(e)==r):0},t.Ob=function(){var e=t.Util.getIeVersion();"number"==typeof e&&10>e&&(t.unsupportedBrowser=!0,t.Bb(t,(function(){})))},t.za=function(){var e=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName||0<=e.indexOf("MSIE ")||0<=e.indexOf("Trident/")&&0<=e.indexOf("Windows NT 6")},t.Bb=function(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&"function"==typeof e[r]&&(e[r]=t)},t.K=[],t.fa=function(e,r,n){if(t.Ma)return 0;t.maxDelay||(t.maxDelay=250);var i=0,s=(new Date).getTime()+t.maxDelay,o=t.d.visibilityState,a=["webkitvisibilitychange","visibilitychange"];if(o||(o=t.d.webkitVisibilityState),o&&"prerender"==o){if(!t.ga)for(t.ga=1,n=0;n<a.length;n++)t.d.addEventListener(a[n],(function(){var e=t.d.visibilityState;e||(e=t.d.webkitVisibilityState),"visible"==e&&(t.ga=0,t.delayReady())}));i=1,s=0}else n||t.u("_d")&&(i=1);return i&&(t.K.push({m:e,a:r,t:s}),t.ga||setTimeout(t.delayReady,t.maxDelay)),i},t.delayReady=function(){var e,r=(new Date).getTime(),n=0;for(t.u("_d")?n=1:t.Ba();0<t.K.length;){if(e=t.K.shift(),n&&!e.t&&e.t>r){t.K.unshift(e),setTimeout(t.delayReady,parseInt(t.maxDelay/2));break}t.Ma=1,
32t[e.m].apply(t,e.a),t.Ma=0}},t.setAccount=t.sa=function(e){var r,n;if(!t.fa("setAccount",arguments))if(t.account=e,t.allAccounts)for(r=t.allAccounts.concat(e.split(",")),t.allAccounts=[],r.sort(),n=0;n<r.length;n++)0!=n&&r[n-1]==r[n]||t.allAccounts.push(r[n]);else t.allAccounts=e.split(",")},t.foreachVar=function(e,r){var n,i,s,o,a="";for(s=i="",t.lightProfileID?(n=t.O,(a=t.lightTrackVars)&&(a=","+a+","+t.la.join(",")+",")):(n=t.g,(t.pe||t.linkType)&&(a=t.linkTrackVars,i=t.linkTrackEvents,t.pe&&(s=t.pe.substring(0,1).toUpperCase()+t.pe.substring(1),t[s]&&(a=t[s].ic,i=t[s].hc))),a&&(a=","+a+","+t.D.join(",")+","),i&&a&&(a+=",events,")),r&&(r=","+r+","),i=0;i<n.length;i++)s=n[i],(o=t[s])&&(!a||0<=a.indexOf(","+s+","))&&(!r||0<=r.indexOf(","+s+","))&&e(s,o)},t.l=function(e,r,n,i,s){var o,a,c,u,l="",d=0;if("contextData"==e&&(e="c"),"clientHints"==e&&(e="h"),r){for(o in r)if(!(Object.prototype[o]||s&&o.substring(0,s.length)!=s)&&r[o]&&(!n||
320<=n.indexOf(","+(i?i+".":"")+o+","))){if(c=!1,d)for(a=0;a<d.length;a++)if(o.substring(0,d[a].length)==d[a]){c=!0;break}if(!c&&(""==l&&(l+="&"+e+"."),a=r[o],s&&(o=o.substring(s.length)),0<o.length))if(0<(c=o.indexOf(".")))c=(s||"")+(a=o.substring(0,c))+".",d||(d=[]),d.push(c),l+=t.l(a,r,n,i,c);else if("boolean"==typeof a&&(a=a?"true":"false"),a){if("retrieveLightData"==i&&0>s.indexOf(".contextData."))switch(c=o.substring(0,4),u=o.substring(4),o){case"transactionID":o="xact";break;case"channel":o="ch";break;case"campaign":o="v0";break;default:t.Sa(u)&&("prop"==c?o="c"+u:"eVar"==c?o="v"+u:"list"==c?o="l"+u:"hier"==c&&(o="h"+u,a=a.substring(0,255)))}l+="&"+t.escape(o)+"="+t.escape(a)}}""!=l&&(l+="&."+e)}return l},t.usePostbacks=0,t.Ub=function(){var e,r,i,s,o,a,c,u,l="",d="",p="",h=s="",m=t.T();if(t.lightProfileID?(e=t.O,(d=t.lightTrackVars)&&(d=","+d+","+t.la.join(",")+",")):(e=t.g,(t.pe||t.linkType)&&(d=t.linkTrackVars,p=t.linkTrackEvents,t.pe&&(s=t.pe.substring(0,1).toUpperCase()+t.pe.substring(1),t[s]&&(d=t[s].ic,p=t[s].hc))),d&&(
32d=","+d+","+t.D.join(",")+","),p&&(p=","+p+",",d&&(d+=",events,")),t.events2&&(h+=(""!=h?",":"")+t.events2)),m&&m.getCustomerIDs){if(s=n,o=m.getCustomerIDs())for(r in o)Object.prototype[r]||"object"==typeof(i=o[r])&&(s||(s={}),i.id&&(s[r+".id"]=i.id),i.authState&&(s[r+".as"]=i.authState));s&&(l+=t.l("cid",s))}for(t.AudienceManagement&&t.AudienceManagement.isReady()&&(l+=t.l("d",t.AudienceManagement.getEventCallConfigParams())),r=0;r<e.length;r++){if(s=e[r],o=t[s],i=s.substring(0,4),a=s.substring(4),o||("events"==s&&h?(o=h,h=""):"marketingCloudOrgID"==s&&m&&t.V("ECID")&&(o=m.marketingCloudOrgID)),o&&(!d||0<=d.indexOf(","+s+","))){switch(s){case"customerPerspective":s="cp";break;case"marketingCloudOrgID":s="mcorgid";break;case"supplementalDataID":s="sdid";break;case"timestamp":s="ts";break;case"dynamicVariablePrefix":s="D";break;case"visitorID":s="vid";break;case"marketingCloudVisitorID":s="mid";break;case"analyticsVisitorID":s="aid";break;case"audienceManagerLocationHint":s="aamlh";break;case"audienceManagerBlob":s="aamb";break;case"authState":s="as";break;case"pageURL":s="g",255<o.length&&(t.pageURLRest=o.substring(255),o=o.substring(0,255));break;case"pageURLRest":s="-g";break;case"referrer":s="r";break;case"vmk":case"visitorMigrationKey":s="vmt";break;case"visitorMigrationServer":s="vmf",t.ssl&&t.visitorMigrationServerSecure&&(o="");break;case"visitorMigrationServerSecure":s="vmf",!t.ssl&&t.visitorMigrationServer&&(o="");break;case"charSet":s="ce";break;case"visitorNamespace":s="ns";break;case"cookieDomainPeriods":s="cdp";break;case"cookieLifetime":s="cl";break;case"variableProvider":s="vvp";break;case"currencyCode":s="cc";break;case"channel":s="ch";break;case"transactionID":s="xact";break;case"campaign":s="v0";break;case"latitude":s="lat";break;case"longitude":s="lon";break;case"resolution":s="s";break;case"colorDepth":s="c";break;case"javascriptVersion":s="j";break;case"javaEnabled":s="v";break;case"cookiesEnabled":s="k";break;case"browserWidth":s="bw";break;case"browserHeight":s="bh";break;case"connectionType":s="ct";break;case"homepage":s="hp";break;case"events":if(h&&(o+=(""!=o?",":"")+h),p)for(a=o.split(","),o="",i=0;i<a.length;i++)0<=(u=(c=a[i]).indexOf("="))&&(c=c.substring(0,u)),0<=(u=c.indexOf(":"))&&(c=c.substring(0,u)),0<=p.indexOf(","+c+",")&&(o+=(o?",":"")+a[i]);break;case"events2":o="";break;case"contextData":l+=t.l("c",t[s],d,s),o="";break;case"clientHints":l+=t.l("h",t[s],d,s),o="";break;case"lightProfileID":s="mtp";break;case"lightStoreForSeconds":s="mtss",t.lightProfileID||(o="");break;case"lightIncrementBy":s="mti",t.lightProfileID||(o="");break;case"retrieveLightProfiles":s="mtsr";break;case"deleteLightProfiles":s="mtsd";break;case"retrieveLightData":t.retrieveLightProfiles&&(l+=t.l("mts",t[s],d,s)),o="";break;default:t.Sa(a)&&("prop"==i?s="c"+a:"eVar"==i?s="v"+a:"list"==i?s="l"+a:"hier"==i&&(s="h"+a,o=o.substring(0,255)))}o&&(l+="&"+s+"="+("pev"!=s.substring(0,3)?t.escape(o):o))}"pev3"==s&&t.e&&(l+=t.e)}return t.ka&&(l+="&lrt="+t.ka,t.ka=null),l},t.B=function(e){var t=e.tagName;return"undefined"!=""+e.pc||"undefined"!=""+e.cc&&"HTML"!=(""+e.cc).toUpperCase()?"":("SHAPE"==(t=t&&t.toUpperCase?t.toUpperCase():"")&&(t=""),t&&(("INPUT"==t||"BUTTON"==t)&&e.type&&e.type.toUpperCase?t=e.type.toUpperCase():!t&&e.href&&(t="A")),t)},t.Oa=function(e){var t,n,i,s=r.location,o=e.href?e.href:"";return"string"!=typeof o&&(o=""),t=o.indexOf(":"),n=o.indexOf("?"),i=o.indexOf("/"),o&&(0>t||0<=n&&t>n||0<=i&&t>i)&&(n=e.protocol&&1<e.protocol.length?e.protocol:s.protocol?s.protocol:"",t=s.pathname.lastIndexOf("/"),o=(n?n+"//":"")+(e.host?e.host:s.host?s.host:"")+("/"!=o.substring(0,1)?s.pathname.substring(0,0>t?0:t)+"/":"")+o),o},t.L=function(e){var r,n,i=t.B(e),s="",o=0;
32return i&&(r=e.protocol,n=e.onclick,!e.href||"A"!=i&&"AREA"!=i||n&&r&&!(0>r.toLowerCase().indexOf("javascript"))?n?(s=t.replace(t.replace(t.replace(t.replace(""+n,"\r",""),"\n",""),"\t","")," ",""),o=2):"INPUT"==i||"SUBMIT"==i?(e.value?s=e.value:e.innerText?s=e.innerText:e.textContent&&(s=e.textContent),o=3):"IMAGE"==i&&e.src&&(s=e.src):s=t.Oa(e),s)?{id:s.substring(0,100),type:o}:0},t.nc=function(e){for(var r=t.B(e),n=t.L(e);e&&!n&&"BODY"!=r;)(e=e.parentElement?e.parentElement:e.parentNode)&&(r=t.B(e),n=t.L(e));return n&&"BODY"!=r||(e=0),e&&(0<=(r=e.onclick?""+e.onclick:"").indexOf(".tl(")||0<=r.indexOf(".trackLink("))&&(e=0),e},t.bc=function(){var e,n,i,s,o=t.linkObject,a=t.linkType,c=t.linkURL;if(t.ma=1,o||(t.ma=0,o=t.clickObject),o){for(e=t.B(o),n=t.L(o);o&&!n&&"BODY"!=e;)(o=o.parentElement?o.parentElement:o.parentNode)&&(e=t.B(o),n=t.L(o));if(n&&"BODY"!=e||(o=0),o&&!t.linkObject){var u=o.onclick?""+o.onclick:"";(0<=u.indexOf(".tl(")||0<=u.indexOf(".trackLink("))&&(o=0)}}else t.ma=1;if(!c&&o&&(c=t.Oa(o)),c&&!t.linkLeaveQueryString&&0<=(i=c.indexOf("?"))&&(c=c.substring(0,i)),!a&&c){var l,d=0,p=0;if(t.trackDownloadLinks&&t.linkDownloadFileTypes)for(i=(u=c.toLowerCase()).indexOf("?"),s=u.indexOf("#"),0<=i?0<=s&&s<i&&(i=s):i=s,0<=i&&(u=u.substring(0,i)),i=t.linkDownloadFileTypes.toLowerCase().split(","),s=0;s<i.length;s++)(l=i[s])&&u.substring(u.length-(l.length+1))=="."+l&&(a="d");if(t.trackExternalLinks&&!a&&(u=c.toLowerCase(),t.Ra(u)&&(t.linkInternalFilters||(t.linkInternalFilters=r.location.hostname),i=0,t.linkExternalFilters?(i=t.linkExternalFilters.toLowerCase().split(","),d=1):t.linkInternalFilters&&(i=t.linkInternalFilters.toLowerCase().split(",")),i))){for(s=0;s<i.length;s++)l=i[s],0<=u.indexOf(l)&&(p=1);p?d&&(a="e"):d||(a="e")}}t.linkObject=o,t.linkURL=c,t.linkType=a,(t.trackClickMap||t.trackInlineStats)&&(t.e="",o&&(a=t.pageName,c=1,o=o.sourceIndex,a||(a=t.pageURL,c=0),r.s_objectID&&(n.id=r.s_objectID,o=n.type=1),a&&n&&n.id&&e&&(t.e="&pid="+t.escape(a.substring(0,255))+(c?"&pidt="+c:"")+"&oid="+t.escape(n.id.substring(0,100))+(n.type?"&oidt="+n.type:"")+"&ot="+e+(o?"&oi="+o:""))))},t.Vb=function(){var e=t.ma,r=t.linkType,n=t.linkURL,i=t.linkName;if(r&&(n||i)&&("d"!=(r=r.toLowerCase())&&"e"!=r&&(r="o"),t.pe="lnk_"+r,t.pev1=n?t.escape(n):"",t.pev2=i?t.escape(i):"",e=1),t.abort&&(e=0),t.trackClickMap||t.trackInlineStats||t.Yb()){r={},n=0;var s,o,a,c=(u=t.vb())?u.split("&"):0,u=0;if(c)for(s=0;s<c.length;s++)o=c[s].split("="),i=t.unescape(o[0]).split(","),r[o=t.unescape(o[1])]=i;for(a in i=t.account.split(","),s={},t.contextData)a&&!Object.prototype[a]&&"a.activitymap."==a.substring(0,14)&&(s[a]=t.contextData[a],t.contextData[a]="");if(t.e=t.l("c",s)+(t.e?t.e:""),e||t.e){for(o in e&&!t.e&&(u=1),r)if(!Object.prototype[o])for(a=0;a<i.length;a++)for(u&&(c=r[o].join(","))==t.account&&(t.e+=("&"!=o.charAt(0)?"&":"")+o,r[o]=[],n=1),s=0;s<r[o].length;s++)(c=r[o][s])==i[a]&&(u&&(t.e+="&u="+t.escape(c)+("&"!=o.charAt(0)?"&":"")+o+"&u=0"),r[o].splice(s,1),n=1);if(e||(n=1),n){for(o in u="",s=2,!e&&t.e&&(u=t.escape(i.join(","))+"="+t.escape(t.e),s=1),r)!Object.prototype[o]&&0<s&&0<r[o].length&&(u+=(u?"&":"")+t.escape(r[o].join(","))+"="+t.escape(o),s--);t.Db(u)}}}return e},t.vb=function(){return t.useLinkTrackSessionStorage?t.Fa()?r.sessionStorage.getItem(t.P):void 0:t.cookieRead(t.P)},t.Fa=function(){return!!r.sessionStorage},t.Db=function(e){t.useLinkTrackSessionStorage?t.Fa()&&r.sessionStorage.setItem(t.P,e):t.cookieWrite(t.P,e)},t.Wb=function(){if(!t.gc){var e,r,n,i,s=new Date,o=a.location,c=r=e="",u="1.2",l=t.cookieWrite("s_cc","true",0)?"Y":"N",d="",p="";if(s.setUTCDate&&(u="1.3",(0).toPrecision&&(u="1.5",(s=[]).forEach))){u="1.6",r=0,e={};try{(r=new Iterator(e)).next&&(u="1.7",s.reduce&&(u="1.8").trim&&(u="1.8.1",Date.parse&&(u="1.8.2",Object.create&&(u="1.8.5"))))}catch(e){}}e=screen.width+"x"+screen.height,c=navigator.javaEnabled()?"Y":"N",r=screen.pixelDepth?screen.pixelDepth:screen.colorDepth,n=t.w.innerWidth?t.w.innerWidth:t.d.documentElement.offsetWidth,i=t.w.innerHeight?t.w.innerHeight:t.d.documentElement.offsetHeight;try{t.b.addBehavior("#default#homePage"),d=t.b.oc(o)?"Y":"N"}catch(e){}try{t.b.addBehavior("#default#clientCaps"),p=t.b.connectionType}catch(e){}t.resolution=e,t.colorDepth=r,t.javascriptVersion=u,t.javaEnabled=c,t.cookiesEnabled=l,t.browserWidth=n,t.browserHeight=i,t.connectionType=p,t.homepage=d,t.gc=1}},t.ib=function(){if(t.collectHighEntropyUserAgentHints&&!t.H&&t.cb()){t.H=!0;try{navigator.userAgentData.getHighEntropyValues(t.ta).then((function(e){t.clientHints={},t.ta.forEach((function(r){Object.prototype.hasOwnProperty.call(e,r)&&(t.clientHints[r]=e[r])}))})).catch((function(e){t.H=!1,t.clientHints={},t.debugTracking&&t.log(e.message)}))}catch(e){t.H=!1,t.clientHints={},t.debugTracking&&t.log(e.message)}}else t.clientHints={}},t.cb=function(){return void 0!==navigator.userAgentData},t.Q={},t.loadModule=function(e,n){var i=t.Q[e];if(!i){i=r["AppMeasurement_Module_"+e]?new r["AppMeasurement_Module_"+e](t):{},t.Q[e]=t[e]=i,i.ob=function(){return i.yb},i.Eb=function(r){(i.yb=r)&&(t[e+"_onLoad"]=r,t.fa(e+"_onLoad",[t,i],1)||r(t,i))};try{Object.defineProperty?Object.defineProperty(i,"onLoad",{get:i.ob,set:i.Eb}):i._olc=1}catch(e){i._olc=1}}n&&(t[e+"_onLoad"]=n,t.fa(e+"_onLoad",[t,i],1)||n(t,i))},t.u=function(e){var r,n;for(r in t.Q)if(!Object.prototype[r]&&(n=t.Q[r])&&(n._olc&&n.onLoad&&(n._olc=0,n.onLoad(t,n)),n[e]&&n[e]()))return 1;return 0},t.Yb=function(){return!(!t.ActivityMap||!t.ActivityMap._c)},t.Zb=function(){var e=Math.floor(1e13*Math.random()),r=t.visitorSampling,n=t.visitorSamplingGroup,i=(n="s_vsn_"+(t.visitorNamespace?t.visitorNamespace:t.account)+(n?"_"+n:""),t.cookieRead(n));if(r){if(r*=100,i&&(i=parseInt(i)),!i){if(!t.cookieWrite(n,e))return 0;i=e}if(i%1e4>r)return 0}return 1},t.S=function(e,r){var n,i,s,o,a,c,u;for(u={},n=0;2>n;n++)for(i=0<n?t.Ha:t.g,s=0;s<i.length;
32s++)if((a=e[o=i[s]])||e["!"+o]){if(a&&!r&&("contextData"==o||"retrieveLightData"==o)&&t[o])for(c in t[o])a[c]||(a[c]=t[o][c]);t[o]||(u["!"+o]=1),u[o]=t[o],t[o]=a}return u},t.lc=function(e){var r,n,i,s;for(r=0;2>r;r++)for(n=0<r?t.Ha:t.g,i=0;i<n.length;i++)e[s=n[i]]=t[s],e[s]||"prop"!==s.substring(0,4)&&"eVar"!==s.substring(0,4)&&"hier"!==s.substring(0,4)&&"list"!==s.substring(0,4)&&"channel"!==s&&"events"!==s&&"eventList"!==s&&"products"!==s&&"productList"!==s&&"purchaseID"!==s&&"transactionID"!==s&&"state"!==s&&"zip"!==s&&"campaign"!==s&&"events2"!==s&&"latitude"!==s&&"longitude"!==s&&"ms_a"!==s&&"contextData"!==s&&"supplementalDataID"!==s&&"tnt"!==s&&"timestamp"!==s&&"abort"!==s&&"useBeacon"!==s&&"linkObject"!==s&&"clickObject"!==s&&"linkType"!==s&&"linkName"!==s&&"linkURL"!==s&&"bodyClickTarget"!==s&&"bodyClickFunction"!==s||(e["!"+s]=1)},t.Qb=function(e){var t,r,n,i,s,o,a=0,c="",u="";if(e&&255<e.length&&0<(r=(t=""+e).indexOf("?"))&&(o=t.substring(r+1),n=0,"http://"==(i=(t=t.substring(0,r)).toLowerCase()).substring(0,7)?n+=7:"https://"==i.substring(0,8)&&(n+=8),0<(r=i.indexOf("/",n))&&(i=i.substring(n,r),s=t.substring(r),t=t.substring(0,r),0<=i.indexOf("google")?a=",q,ie,start,search_key,word,kw,cd,":0<=i.indexOf("yahoo.co")?a=",p,ei,":0<=i.indexOf("baidu.")&&(a=",wd,word,"),a&&o))){if((e=o.split("&"))&&1<e.length){for(n=0;n<e.length;n++)0<(r=(i=e[n]).indexOf("="))&&0<=a.indexOf(","+i.substring(0,r)+",")?c+=(c?"&":"")+i:u+=(u?"&":"")+i;c&&u?o=c+"&"+u:u=""}e=t+(0<(r=253-(o.length-u.length)-t.length)?s.substring(0,r):"")+"?"+o}return e},t.gb=function(e){var r=t.d.visibilityState,n=["webkitvisibilitychange","visibilitychange"];if(r||(r=t.d.webkitVisibilityState),r&&"prerender"==r){if(e)for(r=0;r<n.length;r++)t.d.addEventListener(n[r],(function(){var r=t.d.visibilityState;r||(r=t.d.webkitVisibilityState),"visible"==r&&e()}));return!1}return!0},t.ca=!1,t.G=!1,t.Gb=function(){t.G=!0,t.p()},t.I=!1,t.Hb=function(e){t.marketingCloudVisitorID=e.MCMID,t.visitorOptedOut=e.MCOPTOUT,t.analyticsVisitorID=e.MCAID,t.audienceManagerLocationHint=e.MCAAMLH,t.audienceManagerBlob=e.MCAAMB,t.I=!1,t.p()},t.fb=function(e){return t.maxDelay||(t.maxDelay=250),!t.u("_d")||(e&&setTimeout((function(){e()}),t.maxDelay),!1)},t.aa=!1,t.F=!1,t.Ba=function(){t.F=!0,t.p()},t.isReadyToTrack=function(){var e=!0;return!(!t.sb()||!t.qb())&&(t.ub()||(e=!1),t.xb()||(e=!1),t.hb()||(e=!1),e)},t.sb=function(){return t.ca||t.G||(t.gb(t.Gb)?t.G=!0:t.ca=!0),!(t.ca&&!t.G)},t.qb=function(){var e=t.xa();if(e){if(!t.ua&&!t.ba)return e.fetchPermissions(t.zb,!0),t.ba=!0,!1;if(!t.ua)return!1;if(!e.isApproved(e.Categories.ANALYTICS))return!1}return!0},t.V=function(e){var r=t.xa();return!(r&&!r.isApproved(r.Categories[e]))},t.xa=function(){return r.adobe&&r.adobe.optIn?r.adobe.optIn:null},t.Y=!0,t.ub=function(){var e=t.T();return!e||!e.getVisitorValues||(t.Y&&(t.Y=!1,t.I||(t.I=!0,e.getVisitorValues(t.Hb))),!t.I)},t.T=function(){var e=t.visitor;return e&&!e.isAllowed()&&(e=null),e},t.xb=function(){return t.aa||t.F||(t.fb(t.Ba)?t.F=!0:t.aa=!0),!(t.aa&&!t.F)},t.hb=function(){return t.H||t.clientHints||t.ib(),t.clientHints},t.ba=!1,t.zb=function(){t.ba=!1,t.ua=!0},t.j=n,t.q=0,t.callbackWhenReadyToTrack=function(e,r,i){var s;(s={}).Lb=e,s.Kb=r,s.Ib=i,t.j==n&&(t.j=[]),t.j.push(s),0==t.q&&(t.q=setInterval(t.p,100))},t.p=function(){var e;if(t.isReadyToTrack()&&(t.Fb(),t.j!=n))for(;0<t.j.length;)(e=t.j.shift()).Kb.apply(e.Lb,e.Ib)},t.Fb=function(){t.q&&(clearInterval(t.q),t.q=0)},t.va=function(e){var r,i={};if(t.lc(i),e!=n)for(r in e)i[r]=e[r];t.callbackWhenReadyToTrack(t,t.Ga,[i]),t.Ea()},t.Sb=function(){var e,r=t.cookieRead("s_fid"),n="",i="";e=8;var s=4;if(!r||0>r.indexOf("-")){for(r=0;16>r;r++)e=Math.floor(Math.random()*e),n+="0123456789ABCDEF".substring(e,e+1),e=Math.floor(Math.random()*s),i+="0123456789ABCDEF".substring(e,e+1),e=s=16;r=n+"-"+i}return t.cookieWrite("s_fid",r,1)||(r=0),r},t.Ga=function(e){var n,i=new Date,s="s"+Math.floor(i.getTime()/108e5)%10+Math.floor(1e13*Math.random()),o=i.getYear(),c=(o="t="+t.escape(i.getDate()+"/"+i.getMonth()+"/"+(1900>o?o+1900:o)+" "+i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+" "+i.getDay()+" "+i.getTimezoneOffset()),t.T());e&&(n=t.S(e,1)),t.Zb()&&!t.visitorOptedOut&&(t.ya()||(t.fid=t.Sb()),t.bc(),t.usePlugins&&t.doPlugins&&t.doPlugins(t),t.account&&(t.abort||(t.trackOffline&&!t.timestamp&&(t.timestamp=Math.floor(i.getTime()/1e3)),e=r.location,t.pageURL||(t.pageURL=e.href?e.href:e),t.referrer||t.ab||(e=t.Util.getQueryParam("adobe_mc_ref",null,null,!0),t.referrer=e||void 0===e?void 0===e?"":e:a.document.referrer),t.ab=1,!t.referrer&&t.Z&&(t.referrer=t.Z),t.Z=0,t.referrer=t.Qb(t.referrer),t.u("_g")),t.Vb()&&!t.abort&&(c&&t.V("TARGET")&&!t.supplementalDataID&&c.getSupplementalDataID&&(t.supplementalDataID=c.getSupplementalDataID("AppMeasurement:"+t._in,!t.expectSupplementalData)),t.V("AAM")||(t.contextData["cm.ssf"]=1),t.Wb(),t.Ab(),o+=t.Ub(),t.wb(s,o),t.u("_t"),t.referrer="",t.contextData&&t.contextData.excCodes&&(t.contextData.excCodes=0)))),t.referrer&&(t.Z=t.referrer),t.Ea(),n&&t.S(n,1)},t.t=t.track=function(e,r){r&&t.S(r),t.Y=!0,t.isReadyToTrack()?null!=t.j&&0<t.j.length?(t.va(e),t.p()):t.Ga(e):t.va(e)},t.Ab=function(){t.writeSecureCookies&&!t.ssl&&t.bb()},t.bb=function(){t.contextData.excCodes=t.contextData.excCodes||[],t.contextData.excCodes.push(1)},t.Ea=function(){t.abort=t.supplementalDataID=t.timestamp=t.pageURLRest=t.linkObject=t.clickObject=t.linkURL=t.linkName=t.linkType=r.s_objectID=t.pe=t.pev1=t.pev2=t.pev3=t.e=t.lightProfileID=t.useBeacon=t.referrer=0},t.Da=[],t.registerPreTrackCallback=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);"function"==typeof e?t.Da.push([e,r]):t.debugTracking&&t.log("Warning, Non function type passed to registerPreTrackCallback")},t.lb=function(e){t.wa(t.Da,e)},t.Ca=[],t.registerPostTrackCallback=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);"function"==typeof e?t.Ca.push([e,r]):t.debugTracking&&t.log("Warning, Non function type passed to registerPostTrackCallback")},t.kb=function(e){t.wa(t.Ca,e)},t.wa=function(e,r){if("object"==typeof e)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1].slice();if(s.unshift(r),"function"==typeof i)try{i.apply(null,s)}catch(e){t.debugTracking&&t.log(e.message)}}},t.tl=t.trackLink=function(e,r,n,i,s){return t.linkObject=e,t.linkType=r,t.linkName=n,s&&(t.bodyClickTarget=e,t.bodyClickFunction=s),t.track(i)},t.trackLight=function(e,r,n,i){return t.lightProfileID=e,t.lightStoreForSeconds=r,t.lightIncrementBy=n,t.track(i)},t.clearVars=function(){var e,r;for(e=0;e<t.g.length;e++)("prop"==(r=t.g[e]).substring(0,4)||"eVar"==r.substring(0,4)||"hier"==r.substring(0,4)||"list"==r.substring(0,4)||"channel"==r||"events"==r||"eventList"==r||"products"==r||"productList"==r||"purchaseID"==r||"transactionID"==r||"state"==r||"zip"==r||"campaign"==r)&&(t[r]=void 0)},t.tagContainerMarker="",t.wb=function(e,r){var n=t.mb()+"/"+e+"?AQB=1&ndh=1&pf=1&"+(t.Aa()?"callback=s_c_il["+t._in+"].doPostbacks&et=1&":"")+r+"&AQE=1";t.lb(n),t.jb(n),t.U()},t.mb=function(){var e=t.nb();return"http"+(t.ssl?"s":"")+"://"+e+"/b/ss/"+t.account+"/"+(t.mobile?"5.":"")+(t.Aa()?"10":"1")+"/JS-"+t.version+(t.fc?"T":"")+(t.tagContainerMarker?"-"+t.tagContainerMarker:"")},t.Aa=function(){return t.AudienceManagement&&t.AudienceManagement.isReady()||0!=t.usePostbacks},t.nb=function(){var e=t.dc,r=t.trackingServer;return r?t.trackingServerSecure&&t.ssl&&(r=t.trackingServerSecure):("d1"==(e=e?(""+e).toLowerCase():"d1")?e="112":"d2"==e&&(e="122"),r=t.pb()+"."+e+".2o7.net"),r},t.pb=function(){var e=t.visitorNamespace;return e||(e=(e=t.account.split(",")[0]).replace(/[^0-9a-z]/gi,"")),e},t.$a=/{(%?)(.*?)(%?)}/,t.kc=RegExp(t.$a.source,"g"),t.Pb=function(e){if("object"==typeof e.dests)for(var r=0;r<e.dests.length;++r){var n=e.dests[r];if("string"==typeof n.c&&"aa."==n.id.substr(0,3))for(var i=n.c.match(t.kc),s=0;s<i.length;++s){var o=i[s],a=o.match(t.$a),c="";"%"==a[1]&&"timezone_offset"==a[2]?c=(new Date).getTimezoneOffset():"%"==a[1]&&"timestampz"==a[2]&&(c=t.Tb()),n.c=n.c.replace(o,t.escape(c))}}},t.Tb=function(){var e=new Date,r=new Date(6e4*Math.abs(e.getTimezoneOffset()));return t.k(4,e.getFullYear())+"-"+t.k(2,e.getMonth()+1)+"-"+t.k(2,e.getDate())+"T"+t.k(2,e.getHours())+":"+t.k(2,e.getMinutes())+":"+t.k(2,e.getSeconds())+(0<e.getTimezoneOffset()?"-":"+")+t.k(2,r.getUTCHours())+":"+t.k(2,r.getUTCMinutes())},t.k=function(e,t){return(Array(e+1).join(0)+t).slice(-e)},t.qa={},t.doPostbacks=function(e){if("object"==typeof e)if(t.Pb(e),"object"==typeof t.AudienceManagement&&"function"==typeof t.AudienceManagement.isReady&&t.AudienceManagement.isReady()&&"function"==typeof t.AudienceManagement.passData)t.AudienceManagement.passData(e);else if("object"==typeof e&&"object"==typeof e.dests)for(var r=0;r<e.dests.length;++r){var n=e.dests[r];"object"==typeof n&&"string"==typeof n.c&&"string"==typeof n.id&&"aa."==n.id.substr(0,3)&&(t.qa[n.id]=new Image,t.qa[n.id].alt="",t.qa[n.id].src=n.c)}}
32,t.jb=function(e){t.i||t.Xb(),t.i.push(e),t.ja=t.A(),t.Za()},t.Xb=function(){t.i=t.$b(),t.i||(t.i=[])},t.$b=function(){var e,n;if(t.pa()){try{(n=r.localStorage.getItem(t.na()))&&(e=r.JSON.parse(n))}catch(e){}return e}},t.pa=function(){var e=!0;return t.trackOffline&&t.offlineFilename&&r.localStorage&&r.JSON||(e=!1),e},t.Pa=function(){var e=0;return t.i&&(e=t.i.length),t.o&&e++,e},t.U=function(){if(!t.o||(t.v&&t.v.complete&&t.v.C&&t.v.R(),!t.o))if(t.Qa=n,t.oa)t.ja>t.N&&t.Xa(t.i),t.ra(500);else{var e=t.Jb();0<e?t.ra(e):(e=t.Na())&&(t.o=1,t.ac(e),t.ec(e))}},t.ra=function(e){t.Qa||(e||(e=0),t.Qa=setTimeout(t.U,e))},t.Jb=function(){var e;return!t.trackOffline||0>=t.offlineThrottleDelay?0:(e=t.A()-t.Va,t.offlineThrottleDelay<e?0:t.offlineThrottleDelay-e)},t.Na=function(){if(0<t.i.length)return t.i.shift()},t.ac=function(e){if(t.debugTracking){var r,n="AppMeasurement Debug: "+e;for(e=e.split("&"),r=0;r<e.length;r++)n+="\n\t"+t.unescape(e[r]);t.log(n)}},t.ya=function(){return t.marketingCloudVisitorID||t.analyticsVisitorID},t.X=!1;try{o=JSON.parse('{"x":"y"}')}catch(e){o=null}for(o&&"y"==o.x?(t.X=!0,t.W=function(e){return JSON.parse(e)}):r.$&&r.$.parseJSON?(t.W=function(e){return r.$.parseJSON(e)},t.X=!0):t.W=function(){return null},t.ec=function(e){var i,s,o;if(t.rb(e)&&(s=1,i={send:function(e){t.useBeacon=!1,navigator.sendBeacon(e)?i.R():i.ha()}}),!i&&t.ya()&&2047<e.length&&(t.eb()&&(s=2,i=new XMLHttpRequest),i&&(t.AudienceManagement&&t.AudienceManagement.isReady()||0!=t.usePostbacks)&&(t.X?i.Ia=!0:i=0)),!i&&t.jc&&(e=e.substring(0,2047)),!i&&t.d.createElement&&(0!=t.usePostbacks||t.AudienceManagement&&t.AudienceManagement.isReady())&&(i=t.d.createElement("SCRIPT"))&&"async"in i&&((o=(o=t.d.getElementsByTagName("HEAD"))&&o[0]?o[0]:t.d.body)?(i.type="text/javascript",i.setAttribute("async","async"),s=3):i=0),i||(s=4,(i=new Image).alt="",i.abort||void 0===r.InstallTrigger||(i.abort=function(){i.src=n})),i.Wa=Date.now(),i.Ka=function(){try{i.C&&(clearTimeout(i.C),i.C=0)}catch(e){}},i.onload=i.R=function(){if(i.Wa&&(t.ka=Date.now()-i.Wa),t.kb(e),i.Ka(),t.Nb(),t.da(),t.o=0,t.U(),i.Ia){i.Ia=!1;try{t.doPostbacks(t.W(i.responseText))}catch(e){}}},i.onabort=i.onerror=i.ha=function(){i.Ka(),(t.trackOffline||t.oa)&&t.o&&t.i.unshift(t.Mb),t.o=0,t.ja>t.N&&t.Xa(t.i),t.da(),t.ra(500)},i.onreadystatechange=function(){4==i.readyState&&(200==i.status?i.R():i.ha())},t.Va=t.A(),1===s)i.send(e);else if(2===s)o=e.indexOf("?"),s=e.substring(0,o),o=(o=e.substring(o+1)).replace(/&callback=[a-zA-Z0-9_.\[\]]+/,""),i.open("POST",s,!0),i.withCredentials=!0,i.send(o);else if(i.src=e,3===s){if(t.Ta)try{o.removeChild(t.Ta)}catch(e){}o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),t.Ta=t.v}i.C=setTimeout((function(){i.C&&(i.complete?i.R():(t.trackOffline&&i.abort&&i.abort(),i.ha()))}),5e3),t.Mb=e,t.v=r["s_i_"+t.replace(t.account,",","_")]=i,(t.useForcedLinkTracking&&t.J||t.bodyClickFunction)&&(t.forcedLinkTrackingTimeout||(t.forcedLinkTrackingTimeout=250),t.ea=setTimeout(t.da,t.forcedLinkTrackingTimeout))},t.rb=function(e){var r=!1;return navigator.sendBeacon&&(t.tb(e)||t.useBeacon)&&(r=!0),t.Cb(e)&&(r=!1),r},t.tb=function(e){return!!(e&&0<e.indexOf("pe=lnk_e"))},t.Cb=function(e){return 64e3<=e.length},t.eb=function(){return"undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest},t.Nb=function(){if(t.pa()&&!(t.Ua>t.N))try{r.localStorage.removeItem(t.na()),t.Ua=t.A()}catch(e){}},t.Xa=function(e){if(t.pa()){t.Za();try{r.localStorage.setItem(t.na(),r.JSON.stringify(e)),t.N=t.A()}catch(e){}}},t.Za=function(){if(t.trackOffline)for((!t.offlineLimit||0>=t.offlineLimit)&&(t.offlineLimit=10);t.i.length>t.offlineLimit;)t.Na()},t.forceOffline=function(){t.oa=!0},t.forceOnline=function(){t.oa=!1},t.na=function(){return t.offlineFilename+"-"+t.visitorNamespace+t.account},t.A=function(){return(new Date).getTime()},t.Ra=function(e){return 0!=(e=e.toLowerCase()).indexOf("#")&&0!=e.indexOf("about:")&&0!=e.indexOf("opera:")&&0!=e.indexOf("javascript:")},t.setTagContainer=function(e){var r,n,i;for(t.fc=e,r=0;r<t._il.length;r++)if((n=t._il[r])&&"s_l"==n._c&&n.tagContainerName==e){if(t.S(n),n.lmq)for(r=0;r<n.lmq.length;r++)i=n.lmq[r],t.loadModule(i.n);if(n.ml)for(i in n.ml)if(t[i])for(r in e=t[i],i=n.ml[i])!Object.prototype[r]&&("function"!=typeof i[r]||0>(""+i[r]).indexOf("s_c_il"))&&(e[r]=i[r]);if(n.mmq)for(r=0;r<n.mmq.length;r++)i=n.mmq[r],t[i.m]&&(e=t[i.m])[i.f]&&"function"==typeof e[i.f]&&(i.a?e[i.f].apply(e,i.a):e[i.f].apply(e));if(n.tq)for(r=0;r<n.tq.length;r++)t.track(n.tq[r]);n.s=t;break}},t.Util={urlEncode:t.escape,urlDecode:t.unescape,cookieRead:t.cookieRead,cookieWrite:t.cookieWrite,getQueryParam:function(e,n,i,s){var o,a="";return n||(n=t.pageURL?t.pageURL:r.location),i=i||"&",e&&n?0>(o=(n=""+n).indexOf("?"))?a:(n=i+n.substring(o+1)+i,s&&(0<=n.indexOf(i+e+i)||0<=n.indexOf(i+e+"="+i))?void 0:(0<=(o=n.indexOf("#"))&&(n=n.substr(0,o)+i),0>(o=n.indexOf(i+e+"="))||(0<=(o=(n=n.substring(o+i.length+e.length+1)).indexOf(i))&&(n=n.substring(0,o)),0<n.length&&(a=t.unescape(n))),a)):a},getIeVersion:function(){return document.documentMode?document.documentMode:t.za()?7:null}},t.D="supplementalDataID timestamp dynamicVariablePrefix visitorID marketingCloudVisitorID analyticsVisitorID audienceManagerLocationHint authState fid vmk visitorMigrationKey visitorMigrationServer visitorMigrationServerSecure charSet visitorNamespace cookieDomainPeriods fpCookieDomainPeriods cookieLifetime pageName pageURL customerPerspective referrer contextData contextData.cm.ssf contextData.opt.dmp contextData.opt.sell clientHints currencyCode lightProfileID lightStoreForSeconds lightIncrementBy retrieveLightProfiles deleteLightProfiles retrieveLightData".split(" "),t.g=t.D.concat("purchaseID variableProvider channel server pageType transactionID campaign state zip events events2 products audienceManagerBlob tnt".split(" ")),t.la="timestamp charSet visitorNamespace cookieDomainPeriods cookieLifetime contextData lightProfileID lightStoreForSeconds lightIncrementBy".split(" "),t.O=t.la.slice(0),t.Ha="account allAccounts debugTracking visitor visitorOptedOut trackOffline offlineLimit offlineThrottleDelay offlineFilename usePlugins doPlugins configURL visitorSampling visitorSamplingGroup linkObject clickObject linkURL linkName linkType trackDownloadLinks trackExternalLinks trackClickMap trackInlineStats linkLeaveQueryString linkTrackVars linkTrackEvents linkDownloadFileTypes linkExternalFilters linkInternalFilters useForcedLinkTracking forcedLinkTrackingTimeout writeSecureCookies useLinkTrackSessionStorage collectHighEntropyUserAgentHints trackingServer trackingServerSecure ssl abort mobile dc lightTrackVars maxDelay expectSupplementalData useBeacon usePostbacks registerPreTrackCallback registerPostTrackCallback bodyClickTarget bodyClickFunction AudienceManagement".split(" "),i=0;250>=i;i++)76>
32i&&(t.g.push("prop"+i),t.O.push("prop"+i)),t.g.push("eVar"+i),t.O.push("eVar"+i),6>i&&t.g.push("hier"+i),4>i&&t.g.push("list"+i);i="pe pev1 pev2 pev3 latitude longitude resolution colorDepth javascriptVersion javaEnabled cookiesEnabled browserWidth browserHeight connectionType homepage pageURLRest marketingCloudOrgID ms_a".split(" "),t.g=t.g.concat(i),t.D=t.D.concat(i),t.ssl=0<=r.location.protocol.toLowerCase().indexOf("https"),t.charSet="UTF-8",t.contextData={},t.ta=["architecture","bitness","model","platformVersion","wow64"],t.writeSecureCookies=!1,t.collectHighEntropyUserAgentHints=!1,t.offlineThrottleDelay=0,t.offlineFilename="AppMeasurement.offline",t.P="s_sq",t.Va=0,t.ja=0,t.N=0,t.Ua=0,t.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx",t.w=r,t.d=r.document,t.da=function(){t.ea&&(r.clearTimeout(t.ea),t.ea=n),t.bodyClickTarget&&t.J&&t.bodyClickTarget.dispatchEvent(t.J),t.bodyClickFunction&&("function"==typeof t.bodyClickFunction?t.bodyClickFunction():t.bodyClickTarget&&t.bodyClickTarget.href&&(t.d.location=t.bodyClickTarget.href)),t.bodyClickTarget=t.J=t.bodyClickFunction=0},t.Ya=function(){t.b=t.d.body,t.b?(t.r=function(e){var n,i,s,o,a;if(!(t.d&&t.d.getElementById("cppXYctnr")||e&&e["s_fe_"+t._in])){if(t.Ja){if(!t.useForcedLinkTracking)return t.b.removeEventListener("click",t.r,!0),void(t.Ja=t.useForcedLinkTracking=0);t.b.removeEventListener("click",t.r,!1)}else t.useForcedLinkTracking=0;t.clickObject=e.srcElement?e.srcElement:e.target;try{if(!t.clickObject||t.M&&t.M==t.clickObject||!(t.clickObject.tagName||t.clickObject.parentElement||t.clickObject.parentNode))t.clickObject=0;else{var c=t.M=t.clickObject;if(t.ia&&(clearTimeout(t.ia),t.ia=0),t.ia=setTimeout((function(){t.M==c&&(t.M=0)}),1e4),s=t.Pa(),t.track(),s<t.Pa()&&t.useForcedLinkTracking&&e.target){for(o=e.target;o&&o!=t.b&&"A"!=o.tagName.toUpperCase()&&"AREA"!=o.tagName.toUpperCase();)o=o.parentNode;if(o&&(a=o.href,t.Ra(a)||(a=0),i=o.target,e.target.dispatchEvent&&a&&(!i||"_self"==i||"_top"==i||"_parent"==i||r.name&&i==r.name))){try{n=t.d.createEvent("MouseEvents")}catch(e){n=new r.MouseEvent}if(n){try{n.initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}catch(e){n=0}n&&(n["s_fe_"+t._in]=n.s_fe=1,e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.preventDefault(),t.bodyClickTarget=e.target,t.J=n)}}}}}catch(e){t.clickObject=0}}},t.b&&t.b.attachEvent?t.b.attachEvent("onclick",t.r):t.b&&t.b.addEventListener&&(navigator&&(0<=navigator.userAgent.indexOf("WebKit")&&t.d.createEvent||0<=navigator.userAgent.indexOf("Firefox/2")&&r.MouseEvent)&&(t.Ja=1,t.useForcedLinkTracking=1,t.b.addEventListener("click",t.r,!0)),t.b.addEventListener("click",t.r,!1))):setTimeout(t.Ya,30)},t.jc=t.za(),t.Ob(),t.qc||(e?t.setAccount(e):t.log("Error, missing Report Suite ID in AppMeasurement initialization"),t.Ya(),t.loadModule("ActivityMap"))}function t(t){var r,n,i,s,o,a=window.s_c_il,c=t.split(","),u=0;if(a)for(n=0;!u&&n<a.length;){if("s_c"==(r=a[n])._c&&(r.account||r.oun))if(r.account&&r.account==t)u=1;else for(i=r.account?r.account:r.oun,i=r.allAccounts?r.allAccounts:i.split(","),s=0;s<c.length;s++)for(o=0;o<i.length;o++)c[s]==i[o]&&(u=1);n++}return u?r.setAccount&&r.setAccount(t):r=new e(t),r}function r(){var e,r,n,i=window,s=i.s_giq;if(s)for(e=0;e<s.length;e++)(n=t((r=s[e]).oun)).setAccount(r.un),n.setTagContainer(r.tagContainerName);i.s_giq=0}window.AppMeasurement_Module_ActivityMap=function(e){function t(){var e=u.pageYOffset+(u.innerHeight||0);e&&e>+d&&(d=e)}function r(){if(c.scrollReachSelector){var t=e.d.querySelector&&e.d.querySelector(c.scrollReachSelector);t?(d=t.scrollTop||0,t.addEventListener("scroll",(function(){var e;(e=t&&t.scrollTop+t.clientHeight||0)>d&&(d=e)}))):0<p--&&setTimeout(r,1e3)}}function n(e,t){var r,n,i;if(e&&t&&(r=c.c[t]||(c.c[t]=t.split(","))))for(i=0;i<r.length&&(n=r[i++]);)if(-1<e.indexOf(n))return null;return e}function i(t,r,n,i,s){var o,a;if((t.dataset&&(a=t.dataset[r])||t.getAttribute&&((a=t.getAttribute("data-"+n))||
32(a=t.getAttribute(n))))&&(o=a),!o&&e.useForcedLinkTracking&&s){var c;if(t=t.onclick?""+t.onclick:"",r="",i&&t&&0<=(n=t.indexOf(i))){for(n+=i.length;n<t.length;)if(a=t.charAt(n++),0<="'\"".indexOf(a)){c=a;break}for(var u=!1;n<t.length&&c&&(a=t.charAt(n),u||a!==c);)"\\"===a?u=!0:(r+=a,u=!1),n++}(c=r)&&(e.w[i]=c)}return o||s&&e.w[i]}function s(e,t,r){var i;return(i=c[t](e,r))&&n(a(i),c[t+"Exclusions"])}function o(e,t,r){var n;if(e&&!(1===(n=e.nodeType)&&(n=e.nodeName)&&(n=n.toUpperCase())&&h[n])&&(1===e.nodeType&&(n=e.nodeValue)&&(t[t.length]=n),r.a||r.t||r.s||!e.getAttribute||((n=e.getAttribute("alt"))?r.a=n:(n=e.getAttribute("title"))?r.t=n:"IMG"==(""+e.nodeName).toUpperCase()&&(n=e.getAttribute("src")||e.src)&&(r.s=n)),(n=e.childNodes)&&n.length))for(e=0;e<n.length;e++)o(n[e],t,r)}function a(e){if(null==e||null==e)return e;try{return e.replace(RegExp("^[\\s\\n\\f\\r\\t\t-\r   ᠎ - \u2028\u2029  \ufeff]+","mg"),"").replace(RegExp("[\\s\\n\\f\\r\\t\t-\r   ᠎ - \u2028\u2029  \ufeff]+$","mg"),"").replace(RegExp("[\\s\\n\\f\\r\\t\t-\r   ᠎ - \u2028\u2029  \ufeff]{1,}","mg")," ").substring(0,254)}catch(e){}}var c=this;c.s=e;var u=window;u.s_c_in||(u.s_c_il=[],u.s_c_in=0),c._il=u.s_c_il,c._in=u.s_c_in,c._il[c._in]=c,u.s_c_in++,c._c="s_m";var l,d=0,p=60;c.c={};var h={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};c._g=function(){var t,r,n,i=e.contextData,o=e.linkObject;(t=e.pageName||e.pageURL)&&(r=s(o,"link",e.linkName))&&(n=s(o,"region"))&&(i["a.activitymap.page"]=t.substring(0,255),i["a.activitymap.link"]=128<r.length?r.substring(0,128):r,i["a.activitymap.region"]=127<n.length?n.substring(0,127):n,0<d&&(i["a.activitymap.xy"]=10*Math.floor(d/10)),i["a.activitymap.pageIDType"]=e.pageName?1:0)},c._d=function(){c.trackScrollReach&&!l&&(c.scrollReachSelector?r():(t(),u.addEventListener&&u.addEventListener("scroll",t,!1)),l=!0)},c.link=function(e,t){var r;if(t)r=n(a(t),c.linkExclusions);else if((r=e)&&!(r=i(e,"sObjectId","s-object-id","s_objectID",1))){var s,u;(u=n(a(e.innerText||e.textContent),c.linkExclusions))||(o(e,s=[],r={a:void 0,t:void 0,s:void 0}),(u=n(a(s.join(""))))||(u=n(a(r.a?r.a:r.t?r.t:r.s?r.s:void 0)))||!(s=(s=e.tagName)&&s.toUpperCase?s.toUpperCase():"")||("INPUT"==s||"SUBMIT"==s&&e.value?u=n(a(e.value)):"IMAGE"==s&&e.src&&(u=n(a(e.src))))),r=u}return r},c.region=function(e){for(var t,r=c.regionIDAttribute||"id";e&&(e=e.parentNode);){if(t=i(e,r,r,r))return t;if("BODY"==e.nodeName)return"BODY"}}},window.AppMeasurement=e,e.getInstance=t,window.s_objectID||(window.s_objectID=0),window.s_gi=t,r(),window.s_pgicq=r}class s{constructor(e){if(this.name="adobe-analytics",this.isInitialized=!1,this._set_dimensions=["eventType","hostname","pageName","path","referrer","previousPageName","previousPageUrl","category","action","label","attribute","details"],Object.assign(this,e),!e.reportSuite||!e.trackingServer)throw new Error("Adobe Analytics package cannot be instantiated")}_getScripts(){return[]}getScriptTags(){return""}async init(){if(this.isInitialized)return;if("undefined"==typeof window)throw new n.WindowUndefinedError("Window is undefined: Cannot add script element.");null==(null===window||void 0===window?void 0:window.s_gi)&&i();const e=null===window||void 0===window?void 0:window.s_gi;if(!e||!this.reportSuite)throw new Error("Adobe Analytics package cannot be initialized");if(!this._validateDimensions(this.dimensions))throw new Error("Dimensions are not valid. If you define a custom mapping for any dimensions, then you must do the custom mapping for all dimensions.");this.eventTracker=e(this.reportSuite),this.eventTracker.trackingServer=this.trackingServer,this.trackingServerSSL&&(this.eventTracker.trackingServerSecure=this.trackingServerSSL),this.isInitialized=!0}logPageView(e,t){if(null==this.eventTracker)throw new Error("this.eventTracker function is undefined. Something went wrong with Adobe Analytics Instantiation");const r=function(e,t,r){const{page:n,previousPage:i,options:s}=e,c=o(n,i,s,"pageView");let u={};return r||(u={prop1:c.eventType,prop2:c.referrer,prop3:c.hostname,prop4:c.path,prop5:c.pageName,prop6:c.previousPageName,prop7:c.previousPageUrl,prop8:c.category,prop9:c.action,prop10:c.label,prop11:c.attribute,prop12:c.details}),Object.assign(Object.assign({},u),a(c,t))}({page:e,previousPage:this.previousPage,options:t},this.dimensions,this.useCustomDimensionMapping);return this.previousPage=Object.assign({},r),this.eventTracker.t(r),r}logEvent(e={}){if(null==this.eventTracker)throw new Error("this.eventTracker function is undefined. Something went wrong with Adobe Analytics Instantiation");const t=function(e,t,r,n){const i=o(null,n,e,"other");let s={};return r||(s={prop1:i.eventType,prop2:i.referrer,prop3:i.hostname,prop4:i.path,prop5:i.pageName,prop6:i.previousPageName,prop7:i.previousPageUrl,prop8:i.category,prop9:i.action,prop10:i.label,prop11:i.attribute,prop12:i.details}),Object.assign(Object.assign({},s),a(i,t))}(e,this.dimensions,this.useCustomDimensionMapping,this.previousPage);return this.previousPage=Object.assign({},t),this.eventTracker.tl(!0,"o","Custom Event",t),t}_validateDimensions(e){if(null==e)return!0;
32if(Object.keys(e).map((e=>this._set_dimensions.includes(e))).reduce(((e,t)=>e||t),!1)){const t=null!=e.eventType&&null!=e.hostname&&null!=e.pageName&&null!=e.path&&null!=e.referrer&&null!=e.previousPageName&&null!=e.previousPageUrl&&null!=e.category&&null!=e.action&&null!=e.label&&null!=e.attribute&&null!=e.details;return t&&(this.useCustomDimensionMapping=!0),t}return!0}}function o(e,t={},r={},n){const{referrer:i,title:s}=document||{},o=window?null===window||void 0===window?void 0:window.location:{},{hostname:a,pathname:c}=o;return Object.assign({eventType:n,referrer:i,hostname:a,path:e||c,pageName:s,previousPageUrl:t.pageUrl,previousPageName:t.pageName},r)}function a(e,t){return null==t?{}:Object.entries(t).reduce(((t,r)=>{const[n,i]=r,s=e[n];return null==s||(t[i]=s),t}),{})}},558347:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Amazon:()=>zn});var n=r(785913);const i="TELEMETRY_COGNITO_CREDENTIALS";function s({telemetryData:e,dimensionLookup:t={},excludeKeys:r=[]}){return Object.keys(e).filter((e=>!r.includes(e))).map((r=>t[r]?{key:a(t,r),value:e[r]}:{key:r,value:o(e,r)})).reduce(((e,{key:t,value:r})=>(e[t]=r,e)),{})}function o(e,t){return"json"===t?e[t]?JSON.stringify(e[t]):"null":void 0===e[t]?"null":e[t].toString()}function a(e,t){return`dimension${e[t]}`}const c=["size","duration","position","number","count"];function u(e,t={}){return Object.keys(e).filter((e=>t[e]||c.includes(e))).map((r=>t[r]?{key:l(t,r),value:e[r]}:{key:r,value:e[r]})).reduce(((e,{key:t,value:r})=>(e[t]=r,e)),{})}function l(e,t){return`metric${e[t]}`}var d=r(314343),p=r.n(d),h="undefined",m="object",f=function(){},g="any",y="*",b="undefined"!=typeof process?process:{},v=(b.env&&b.env.NODE_ENV,"undefined"!=typeof document);function w(e,t){return t.charAt(0)[e]()+t.slice(1)}v&&window.location.hostname,null!=b.versions&&b.versions.node,"undefined"!=typeof Deno&&Deno.core,"object"==typeof self&&self.constructor&&self.constructor.name,v&&"nodejs"===window.name||"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var S=w.bind(null,"toUpperCase"),E=w.bind(null,"toLowerCase");function T(e,t){void 0===t&&(t=!0);var r=function(e){return D(e)?S("null"):"object"==typeof e?function(e){return C(e.constructor)?e.constructor.name:null}(e):Object.prototype.toString.call(e).slice(8,-1)}(e);return t?E(r):r}function I(e,t){return typeof t===e}var C=I.bind(null,"function"),A=I.bind(null,"string"),O=I.bind(null,"undefined"),_=I.bind(null,"boolean");function D(e){return null===e}function P(e){return"array"===T(e)}function k(e){if(!function(e){return e&&("object"==typeof e||null!==e)}(e))return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function x(e,t){if("object"!=typeof t||D(t))return!1;if(t instanceof e)return!0;var r=T(new e(""));if(function(e){return e instanceof Error||A(e.message)&&e.constructor&&function(e){return"number"===T(e)&&!isNaN(e)}(e.constructor.stackTraceLimit)}(t))for(;t;){if(T(t)===r)return!0;t=Object.getPrototypeOf(t)}return!1}function R(e,t){var r=e instanceof Element||e instanceof HTMLDocument;return r&&t?function(e,t){return void 0===t&&(t=""),e&&e.nodeName===t.toUpperCase()}(e,t):r}function U(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}function M(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function N(e,t,r){for(var n=t.length-1,i=0;i<n;++i){var s=t[i];if("__proto__"===s||"constructor"===s)break;s in e||(e[s]={}),e=e[s]}e[t[n]]=r}function j(){for(var e="",t=0,r=4294967295*Math.random()|0;t++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],i=15&r;e+="-"==n||"4"==n?n:("x"==n?i:3&i|8).toString(16),r=t%8==0?4294967295*Math.random()|0:r>>4}return e}I.bind(null,"symbol"),x.bind(null,TypeError),x.bind(null,SyntaxError),U(R,"form"),U(R,"button"),U(R,"input"),U(R,"select");var $="global",F="__global__",G=typeof self===m&&self.self===self&&self||typeof r.g===m&&r.g.global===r.g&&r.g||void 0;function L(e){return G[F][e]}function H(e,t){return G[F][e]=t}function B(e){delete G[F][e]}function W(e,t,r){var n;try{if(V(e)){var i=window[e];n=i[t].bind(i)}}catch(e){}return n||r}G[F]||(G[F]={});var q={};function V(e){if(typeof q[e]!==h)return q[e];try{var t=window[e];t.setItem(h,h),t.removeItem(h)}catch(t){return q[e]=!1}return q[e]=!0}function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
32for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(this,arguments)}var z="function",Y="undefined",J="@@redux/"+Math.random().toString(36),Q=typeof Symbol===z&&Symbol.observable||"@@observable",Z=" != "+z;function X(e,t,r){var n;if(typeof t===z&&typeof r===Y&&(r=t,t=void 0),typeof r!==Y){if(typeof r!==z)throw new Error("enhancer"+Z);return r(X)(e,t)}if(typeof e!==z)throw new Error("reducer"+Z);var i=e,s=t,o=[],a=o,c=!1;function u(){a===o&&(a=o.slice())}function l(){return s}function d(e){if(typeof e!==z)throw new Error("Listener"+Z);var t=!0;return u(),a.push(e),function(){if(t){t=!1,u();var r=a.indexOf(e);a.splice(r,1)}}}function p(e){if(!k(e))throw new Error("Act != obj");if(typeof e.type===Y)throw new Error("ActType "+Y);if(c)throw new Error("Dispatch in reducer");try{c=!0,s=i(s,e)}finally{c=!1}for(var t=o=a,r=0;r<t.length;r++)(0,t[r])();return e}return p({type:"@@redux/INIT"}),(n={dispatch:p,subscribe:d,getState:l,replaceReducer:function(e){if(typeof e!==z)throw new Error("next reducer"+Z);i=e,p({type:"@@redux/INIT"})}})[Q]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Observer != obj");function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[Q]=function(){return this},e},n}function ee(e,t){var r=t&&t.type;return"action "+(r&&r.toString()||"?")+"reducer "+e+" returns "+Y}function te(){var e=[].slice.call(arguments);return 0===e.length?function(e){return e}:1===e.length?e[0]:e.reduce((function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}}))}function re(){var e=arguments;return function(t){return function(r,n,i){var s,o=t(r,n,i),a=o.dispatch,c={getState:o.getState,dispatch:function(e){return a(e)}};return s=[].slice.call(e).map((function(e){return e(c)})),K({},o,{dispatch:a=te.apply(void 0,s)(o.dispatch)})}}}var ne="__anon_id",ie="__user_id",se="__user_traits",oe="userId",ae="anonymousId",ce=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],ue=["name","EVENTS","config","loaded"],le=ce.reduce((function(e,t){return e[t]=t,e}),{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),de=/^utm_/,pe=/^an_prop_/,he=/^an_trait_/;function me(e){var t=e.storage.setItem;return function(r){return function(n){return function(i){if(i.type===le.bootstrap){var s=i.params,o=i.user,a=i.persistedUser,c=i.initialUser,u=a.userId===o.userId;a.anonymousId!==o.anonymousId&&t(ne,o.anonymousId),u||t(ie,o.userId),c.traits&&t(se,K({},u&&a.traits?a.traits:{},c.traits));var l=Object.keys(i.params);if(l.length){var d=s.an_uid,p=s.an_event,h=l.reduce((function(e,t){if(t.match(de)||t.match(/^(d|g)clid/)){var r=t.replace(de,"");e.campaign["campaign"===r?"name":r]=s[t]}return t.match(pe)&&(e.props[t.replace(pe,"")]=s[t]),t.match(he)&&(e.traits[t.replace(he,"")]=s[t]),e}),{campaign:{},props:{},traits:{}});r.dispatch(K({type:le.params,raw:s},h,d?{userId:d}:{})),d&&setTimeout((function(){return e.identify(d,h.traits)}),0),p&&setTimeout((function(){return e.track(p,h.props)}),0),Object.keys(h.campaign).length&&r.dispatch({type:le.campaign,campaign:h.campaign})}}return n(i)}}}}function fe(e){return function(t,r){if(void 0===t&&(t={}),void 0===r&&(r={}),r.type===le.setItemEnd){if(r.key===ne)return K({},t,{anonymousId:r.value});if(r.key===ie)return K({},t,{userId:r.value})}switch(r.type){case le.identify:return Object.assign({},t,{userId:r.userId,traits:K({},t.traits,r.traits)});case le.reset:return[ie,ne,se].forEach((function(t){e.removeItem(t)})),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function ge(e){return{userId:e.getItem(ie),anonymousId:e.getItem(ne),traits:e.getItem(se)}}var ye=function(e){return"__TEMP__"+e};function be(e){var t=e.storage,r=t.setItem,n=t.removeItem,i=t.getItem;return function(e){return function(t){return function(s){var o=s.userId,a=s.traits,c=s.options;if(s.type===le.reset&&([ie,se,ne].forEach((function(e){n(e)})),[oe,ae,"traits"].forEach((function(e){B(ye(e))}))),s.type===le.identify){i(ne)||r(ne,j());var u=i(ie),l=i(se)||{};u&&u!==o&&e.dispatch({type:le.userIdChanged,old:{userId:u,traits:l},new:{userId:o,traits:a},options:c}),o&&r(ie,o),a&&r(se,K({},l,a))}return t(s)}}}}var ve={};function we(e,t){ve[e]&&C(ve[e])&&(ve[e](t),delete ve[e])}function Se(e,t,r){return new Promise((function(n,i){return t()?n(e):r<1?i(K({},e,{queue:!0})):new Promise((function(e){return setTimeout(e,10)})).then((function(s){return Se(e,t,r-10).then(n,i)}))}))}function Ee(e){return{abort:e}}function Te(e,t,r){var n={},i=t(),s=e.getState(),o=s.plugins,a=s.queue,c=s.user;if(!s.context.offline&&a&&a.actions&&a.actions.length){var u=a.actions.reduce((function(e,t,r){return o[t.plugin].loaded?(e.process.push(t),e.processIndex.push(r)):(e.requeue.push(t),e.requeueIndex.push(r)),e}),{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(u.processIndex&&u.processIndex.length){u.processIndex.forEach((function(t){var s=a.actions[t],u=s.plugin,l=s.payload.type,d=i[u][l];if(d&&C(d)){var p,h=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),[oe,ae].reduce((function(r,n){return e.hasOwnProperty(n)&&t[n]&&t[n]!==e[n]&&(r[n]=t[n]),r}),e)}(s.payload,c),m=n[h.meta.rid];if(!m&&(p=d({payload:h,config:o[u].config,instance:r,abort:Ee}))&&k(p)&&p.abort)return void(n[h.meta.rid]=!0);if(!m){var f=l+":"+u;e.dispatch(K({},h,{type:f,_:{called:f,from:"queueDrain"}}))}}}));var l=a.actions.filter((function(e,t){return!~u.processIndex.indexOf(t)}));a.actions=l}}}var Ie=function(e){var t=e.data,r=e.action,n=e.instance,i=e.state,s=e.allPlugins,o=e.allMatches,a=e.store,c=e.EVENTS;try{var u=i.plugins,l=i.context,d=r.type,p=d.match(Ce),h=t.exact.map((function(e){return e.pluginName}));p&&(h=o.during.map((function(e){return e.pluginName})));var m=function(e,t){return function(r,n,i){var s=n.config,o=n.name,a=o+"."+r.type;i&&(a=i.event);var c=r.type.match(Ce)?function(e,t,r,n,i){return function(s,o){var a=n?n.name:e,c=o&&Ue(o)?o:r;if(n&&(!(c=o&&Ue(o)?o:[e]).includes(e)||1!==c.length))throw new Error("Method "+t+" can only abort "+e+" plugin. "+JSON.stringify(c)+" input valid");return K({},i,{abort:{reason:s,plugins:c,caller:t,_:a}})}}(o,a,t,i,r):function(e,t){return function(){throw new Error(e.type+" action not cancellable. Remove abort in "+t)}}(r,a);return{payload:je(r),instance:e,config:s||{},abort:c}}}(n,h),f=t.exact.reduce((function(e,t){var r=t.pluginName,n=t.methodName,i=!1;return n.match(/^initialize/)||n.match(/^reset/)||(i=!u[r].loaded),l.offline&&n.match(/^(page|track|identify)/)&&(i=!0),e[""+r]=i,e}),{});return Promise.resolve(t.exact.reduce((function(e,i,o){try{var a=i.pluginName;return Promise.resolve(e).then((function(e){function i(){return Promise.resolve(e)}var o=function(){if(t.namespaced&&t.namespaced[a])return Promise.resolve(t.namespaced[a].reduce((function(e,t,r){try{return Promise.resolve(e).then((function(e){return t.method&&C(t.method)?(function(e,t){var r=Ne(e);if(r&&r.name===t){var n=Ne(r.method);throw new Error([t+" plugin is calling method "+e,"Plugins cant call self","Use "+r.method+" "+(n?"or "+n.method:"")+" in "+t+" plugin insteadof "+e].join("\n"))}}(t.methodName,t.pluginName),Promise.resolve(t.method({payload:e,instance:n,abort:(r=e,i=a,o=t.pluginName,function(e,t){return K({},r,{abort:{reason:e,plugins:t||[i],caller:d,from:o||i}})}),config:De(t.pluginName,u,s),plugins:u})).then((function(t){var r=k(t)?t:{};return Promise.resolve(K({},e,r))}))):e;var r,i,o}))}catch(e){return Promise.reject(e)}}),Promise.resolve(r))).then((function(t){e[a]=t}));e[a]=r}();return o&&o.then?o.then(i):i()}))}catch(e){return Promise.reject(e)}}),Promise.resolve({}))).then((function(e){return Promise.resolve(t.exact.reduce((function(r,i,o){try{var c=t.exact.length===o+1,l=i.pluginName,h=s[l];return Promise.resolve(r).then((function(t){var r=e[l]?e[l]:{};if(p&&(r=t),xe(r,l))return _e({data:r,method:d,instance:n,pluginName:l,store:a}),Promise.resolve(t);if(xe(t,l))return c&&_e({data:t,method:d,instance:n,store:a}),Promise.resolve(t);if(f.hasOwnProperty(l)&&!0===f[l])return a.dispatch({type:"queue",plugin:l,payload:r,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(t);var i=m(e[l],s[l]);return Promise.resolve(h[d]({
33abort:i.abort,payload:r,instance:n,config:De(l,u,s),plugins:u})).then((function(i){var s=k(i)?i:{},o=K({},t,s),c=e[l];
33if(xe(c,l))_e({data:c,method:d,instance:n,pluginName:l,store:a});else{var u=d+":"+l;(u.match(/:/g)||[]).length<2&&!d.match(Ae)&&!d.match(Oe)&&n.dispatch(K({},p?o:r,{type:u,_:{called:u,from:"submethod"}}))}return Promise.resolve(o)}))}))}catch(e){return Promise.reject(e)}}),Promise.resolve(r))).then((function(e){if(!(d.match(Ce)||d.match(/^registerPlugin/)||d.match(Oe)||d.match(Ae)||d.match(/^params/)||d.match(/^userIdChanged/))){if(c.plugins.includes(d),e._&&e._.originalAction===d)return e;var r=K({},e,{_:{originalAction:e.type,called:e.type,from:"engineEnd"}});Re(e,t.exact.length)&&!d.match(/End$/)&&(r=K({},r,{type:e.type+"Aborted"})),a.dispatch(r)}return e}))}))}catch(e){return Promise.reject(e)}},Ce=/Start$/,Ae=/^bootstrap/,Oe=/^ready/;function _e(e){var t=e.pluginName,r=e.method+"Aborted"+(t?":"+t:"");e.store.dispatch(K({},e.data,{type:r,_:{called:r,from:"abort"}}))}function De(e,t,r){var n=t[e]||r[e];return n&&n.config?n.config:{}}function Pe(e,t){return t.reduce((function(t,r){return r[e]?t.concat({methodName:e,pluginName:r.name,method:r[e]}):t}),[])}function ke(e,t){var r=e.replace(Ce,""),n=t?":"+t:"";return[""+e+n,""+r+n,r+"End"+n]}function xe(e,t){var r=e.abort;return!!r&&(!0===r||Me(r,t)||r&&Me(r.plugins,t))}function Re(e,t){var r=e.abort;if(!r)return!1;if(!0===r||A(r))return!0;var n=r.plugins;return Ue(r)&&r.length===t||Ue(n)&&n.length===t}function Ue(e){return Array.isArray(e)}function Me(e,t){return!(!e||!Ue(e))&&e.includes(t)}function Ne(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function je(e){return Object.keys(e).reduce((function(t,r){return"type"===r||(t[r]=k(e[r])?Object.assign({},e[r]):e[r]),t}),{})}function $e(e,t,r){var n={};return function(i){return function(s){return function(o){try{var a,c=function(e){return a?e:s(d)},u=o.type,l=o.plugins,d=o;if(o.abort)return Promise.resolve(s(o));if(u===le.enablePlugin&&i.dispatch({type:le.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),u===le.disablePlugin&&setTimeout((function(){return we(o.meta.rid,{payload:o})}),0),u===le.initializeEnd){var p=t(),h=Object.keys(p),m=h.filter((function(e){return l.includes(e)})).map((function(e){return p[e]})),f=[],g=[],y=o.disabled,b=m.map((function(e){var t=e.loaded,r=e.name,s=e.config;return Se(e,(function(){return t({config:s})}),1e4).then((function(t){return n[r]||(i.dispatch({type:le.pluginReadyType(r),name:r,events:Object.keys(e).filter((function(e){return!ue.includes(e)}))}),n[r]=!0),f=f.concat(r),e})).catch((function(e){if(e instanceof Error)throw new Error(e);return g=g.concat(e.name),e}))}));Promise.all(b).then((function(e){var t={plugins:f,failed:g,disabled:y};setTimeout((function(){h.length===b.length+y.length&&i.dispatch(K({},{type:le.ready},t))}),0)}))}var v=function(){if(u!==le.bootstrap)return/^ready:([^:]*)$/.test(u)&&setTimeout((function(){return Te(i,t,e)}),0),Promise.resolve(function(e,t,r,n,i){try{var s=C(t)?t():t,o=e.type,a=o.replace(Ce,"");if(e._&&e._.called)return Promise.resolve(e);var c=r.getState(),u=(p=s,void 0===(h=c.plugins)&&(h={}),void 0===(m=e.options)&&(m={}),Object.keys(p).filter((function(e){var t=m.plugins||{};return _(t[e])?t[e]:!1!==t.all&&(!h[e]||!1!==h[e].enabled)})).map((function(e){return p[e]})));o===le.initializeStart&&e.fromEnable&&(u=Object.keys(c.plugins).filter((function(t){var r=c.plugins[t];return e.plugins.includes(t)&&!r.initialized})).map((function(e){return s[e]})));var l=u.map((function(e){return e.name})),d=function(e,t,r){var n=ke(e).map((function(e){return Pe(e,t)}));return t.reduce((function(r,n){var i=n.name,s=ke(e,i).map((function(e){return Pe(e,t)})),o=s[0],a=s[1],c=s[2];return o.length&&(r.beforeNS[i]=o),a.length&&(r.duringNS[i]=a),c.length&&(r.afterNS[i]=c),r}),{before:n[0],beforeNS:{},during:n[1],duringNS:{},after:n[2],afterNS:{}})}(o,u);return Promise.resolve(Ie({action:e,data:{exact:d.before,namespaced:d.beforeNS},state:c,allPlugins:s,allMatches:d,instance:r,store:n,EVENTS:i})).then((function(e){function t(){var t=function(){if(o.match(Ce))return Promise.resolve(Ie({action:K({},u,{type:a+"End"}),data:{exact:d.after,namespaced:d.afterNS},state:c,allPlugins:s,allMatches:d,instance:r,store:n,EVENTS:i})).then((function(e){e.meta&&e.meta.hasCallback&&we(e.meta.rid,{payload:e})}))}();return t&&t.then?t.then((function(){return e})):e}if(Re(e,l.length))return e;var u,p=function(){if(o!==a)return Promise.resolve(Ie({action:K({},e,{type:a}),data:{exact:d.during,namespaced:d.duringNS},state:c,allPlugins:s,allMatches:d,instance:r,store:n,EVENTS:i})).then((function(e){u=e}));u=e}();return p&&p.then?p.then(t):t()}))}catch(e){return Promise.reject(e)}var p,h,m}(o,t,e,i,r)).then((function(e){return a=1,s(e)}))}();return Promise.resolve(v&&v.then?v.then(c):c(v))}catch(e){return Promise.reject(e)}}}}}function Fe(e){return function(t){return function(t){return function(r){var n=r.type,i=r.key,s=r.value,o=r.options;if(n===le.setItem||n===le.removeItem){if(r.abort)return t(r);n===le.setItem?e.setItem(i,s,o):e.removeItem(i,o)}return t(r)}}}}var Ge=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,r){e[r]=e[r].concat(t)},this.removeMiddleware=function(t,r){var n=e[r].findIndex((function(e){return e===t}));-1!==n&&(e[r]=[].concat(e[r].slice(0,n),e[r].slice(n+1)))},this.dynamicMiddlewares=function(t){return function(r){return function(n){return function(i){var s={getState:r.getState,dispatch:function(e){return r.dispatch(e)}},o=e[t].map((function(e){return e(s)}));return te.apply(void 0,o)(n)(i)}}}}};function Le(e){return function(t,r){void 0===t&&(t={});var n={};if("initialize:aborted"===r.type)return t;if(/^registerPlugin:([^:]*)$/.test(r.type)){var i=He(r.type,"registerPlugin"),s=e()[i];if(!s||!i)return t;var o=r.enabled,a=s.config;return n[i]={enabled:o,initialized:!!o&&Boolean(!s.initialize),loaded:!!o&&Boolean(s.loaded({config:a})),config:a},K({},t,n)}if(/^initialize:([^:]*)$/.test(r.type)){var c=He(r.type,le.initialize),u=e()[c];return u&&c?(n[c]=K({},t[c],{initialized:!0,loaded:Boolean(u.loaded({config:u.config}))}),K({},t,n)):t}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=K({},t[r.name],{loaded:!0}),K({},t,n);switch(r.type){case le.disablePlugin:return K({},t,Be(r.plugins,!1,t));case le.enablePlugin:return K({},t,Be(r.plugins,!0,t));default:return t}}}function He(e,t){return e.substring(t.length+1,e.length)}function Be(e,t,r){return e.reduce((function(e,n){return e[n]=K({},r[n],{enabled:t}),e}),r)}function We(e){try{return JSON.parse(JSON.stringify(e))}catch(e){}return e}var qe={last:{},history:[]};function Ve(e,t){void 0===e&&(e=qe);var r=t.options,n=t.meta;if(t.type===le.track){var i=We(K({event:t.event,properties:t.properties},Object.keys(r).length&&{options:r},{meta:n}));return K({},e,{last:i,history:e.history.concat(i)})}return e}var Ke={actions:[]};function ze(e,t){void 0===e&&(e=Ke);var r=t.payload;switch(t.type){case"queue":var n;return n=r&&r.type&&r.type===le.identify?[t].concat(e.actions):e.actions.concat(t),K({},e,{actions:n});case"dequeue":return[];default:return e}}var Ye=/#.*$/;function Je(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(t&&t[3]?t[3].split("?")[0].replace(Ye,""):"")}var Qe,Ze,Xe,et,tt=function(e){if(void 0===e&&(e={}),!v)return e;var t=document,r=t.title,n=t.referrer,i=window,s=i.location,o=i.innerWidth,a=i.innerHeight,c=s.hash,u=s.search,l=function(e){var t=function(){if(v)for(var e,t=document.getElementsByTagName("link"),r=0;e=t[r];r++)if("canonical"===e.getAttribute("rel"))return e.getAttribute("href")}();return t?t.match(/\?/)?t:t+e:window.location.href.replace(Ye,"")}(u),d={title:r,url:l,path:Je(l),hash:c,search:u,width:o,height:a};return n&&""!==n&&(d.referrer=n),K({},d,e)},rt={last:{},history:[]};function nt(e,t){void 0===e&&(e=rt);var r=t.options;if(t.type===le.page){var n=We(K({properties:t.properties,meta:t.meta},Object.keys(r).length&&{options:r}));return K({},e,{last:n,history:e.history.concat(n)})}return e}Qe=function(){if(!v)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),Ze=v?document.referrer:null,Xe=function(){if(v){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}(),et=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}();var it={initialized:!1,sessionId:j(),app:null,version:null,debug:!1,offline:!!v&&!navigator.onLine,os:{name:Qe},userAgent:v?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.16"},timezone:et,locale:Xe,campaign:{},referrer:Ze};function st(e,t){void 0===e&&(e=it);var r=e.initialized,n=t.campaign;switch(t.type){case le.campaign:return K({},e,{campaign:n});case le.offline:return K({},e,{offline:!0});case le.online:return K({},e,{offline:!1});default:return r?e:K({},it,e,{initialized:!0})}}var ot=["plugins","reducers","storage"];function at(e,t,r){if(v){var n=window[(r?"add":"remove")+"EventListener"];e.split(" ").forEach((function(e){n(e,t)}))}}function ct(e){var t=at.bind(null,"online offline",(function(t){return Promise.resolve(!navigator.onLine).then(e)}));return t(!0),function(e){return t(!1)}}function ut(){return H("analytics",[]),function(e){return function(t,r,n){var i=e(t,r,n),s=i.dispatch;return Object.assign(i,{dispatch:function(e){return G[F].analytics.push(e.action||e),s(e)}})}}}function lt(e){return function(){return te(te.apply(null,arguments),ut())}}function dt(e){return e?P(e)?e:[e]:[]}function pt(e,t,r){void 0===e&&(e={});var n,i,s=j();return t&&(ve[s]=(n=t,i=function(e){for(var t,r=e||Array.prototype.slice.call(arguments),n=0;n<r.length;n++)if(C(r[n])){t=r[n];break}return t}(r),function(e){i&&i(e),n(e)})),K({},e,{rid:s,ts:(new Date).getTime()},t?{hasCallback:!0}:{})}function ht(e){void 0===e&&(e={});var t,r=e.reducers||{},n=e.initialUser||{},i=(e.plugins||[]).reduce((function(e,t){if(C(t))return e.middlewares=e.middlewares.concat(t),e;if(t.NAMESPACE&&(t.name=t.NAMESPACE),!t.name)throw new Error("https://lytics.dev/errors/1");t.config||(t.config={});var r=t.EVENTS?Object.keys(t.EVENTS).map((function(e){return t.EVENTS[e]})):[];e.pluginEnabled[t.name]=!(!1===t.enabled||!1===t.config.enabled),delete t.enabled,t.methods&&(e.methods[t.name]=Object.keys(t.methods).reduce((function(e,r){var n;return e[r]=(n=t.methods[r],function(){for(var e=Array.prototype.slice.call(arguments),t=new Array(n.length),r=0;r<e.length;r++)t[r]=e[r];return t[t.length]=I,n.apply({instance:I},t)}),e}),{}),delete t.methods);var n=Object.keys(t).concat(r),i=new Set(e.events.concat(n));if(e.events=Array.from(i),e.pluginsArray=e.pluginsArray.concat(t),e.plugins[t.name])throw new Error(t.name+"AlreadyLoaded");return e.plugins[t.name]=t,e.plugins[t.name].loaded||(e.plugins[t.name].loaded=function(){return!0}),e}),{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),s=e.storage?e.storage:{getItem:L,setItem:H,removeItem:B},o=(t=s,function(e,r,n){return r.getState("user")[e]||(n&&k(n)&&n[e]?n[e]:ge(t)[e]||L(ye(e))||null)}),a=i.plugins,c=i.events.filter((function(e){return!ue.includes(e)})).sort(),u=new Set(c.concat(ce).filter((function(e){return!ue.includes(e)}))),l=Array.from(u).sort(),d=function(){return a},h=new Ge,m=h.addMiddleware,f=h.removeMiddleware,g=h.dynamicMiddlewares,y=function(){throw new Error("Abort disabled inListener")},b=function(e){for(var t,r=Object.create(null),n=/([^&=]+)=?([^&]*)/g;t=n.exec(e);){var i=M(t[1]),s=M(t[2]);if(i)if("[]"===i.substring(i.length-2)){var o=r[i=i.substring(0,i.length-2)]||(r[i]=[]);r[i]=Array.isArray(o)?o:[],r[i].push(s)}else r[i]=""===s||s}for(var a in r){var c=a.split("[");c.length>1&&(N(r,c.map((function(e){return e.replace(/[?[\]\\ ]/g,"")})),r[a]),delete r[a])}return r}(function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return v&&window.location.search.substring(1)}(undefined)),w=ge(s),S=K({},w,n,b.an_uid?{userId:b.an_uid}:{},b.an_aid?{anonymousId:b.an_aid}:{});S.anonymousId||(S.anonymousId=j());var E=K({enable:function(e,t){return new Promise((function(r){G.dispatch({type:le.enablePlugin,plugins:dt(e),_:{originalAction:le.enablePlugin}},r,[t])}))},disable:function(e,t){return new Promise((function(r){G.dispatch({type:le.disablePlugin,plugins:dt(e),_:{originalAction:le.disablePlugin}},r,[t])}))}},i.methods),T=!1,I={identify:function(e,t,r,n){try{var i=A(e)?e:null,s=k(e)?e:t,a=r||{},c=I.user();H(ye(oe),i);var u=i||s.userId||o(oe,I,s);return Promise.resolve(new Promise((function(e){G.dispatch(K({type:le.identifyStart,userId:u,traits:s||{},options:a,anonymousId:c.anonymousId},c.id&&c.id!==i&&{previousId:c.id}),e,[t,r,n])})))}catch(e){return Promise.reject(e)}},track:function(e,t,r,n){try{var i=k(e)?e.event:e;if(!i||!A(i))throw new Error("EventMissing");var s=k(e)?e:t||{},a=k(r)?r:{};return Promise.resolve(new Promise((function(e){G.dispatch({type:le.trackStart,event:i,properties:s,options:a,userId:o(oe,I,t),anonymousId:o(ae,I,t)},e,[t,r,n])})))}catch(e){return Promise.reject(e)}},page:function(e,t,r){try{var n=k(e)?e:{},i=k(t)?t:{};return Promise.resolve(new Promise((function(s){G.dispatch({type:le.pageStart,properties:tt(n),options:i,userId:o(oe,I,n),anonymousId:o(ae,I,n)},s,[e,t,r])})))}catch(e){return Promise.reject(e)}},user:function(e){if(e===oe||"id"===e)return o(oe,I);if(e===ae||"anonId"===e)return o(ae,I);var t=I.getState("user");return e?p()(t,e):t},reset:function(e){return new Promise((function(t){G.dispatch({type:le.resetStart},t,e)}))},ready:function(e){return T&&e({plugins:E,instance:I}),I.on(le.ready,(function(t){e(t),T=!0}))},on:function(e,t){if(!e||!C(t))return!1;if(e===le.bootstrap)throw new Error(".on disabled for "+e);
33var r=/Start$|Start:/;if("*"===e){var n=function(e){return function(e){return function(n){return n.type.match(r)&&t({payload:n,instance:I,plugins:a}),e(n)}}},i=function(e){return function(e){return function(n){return n.type.match(r)||t({payload:n,instance:I,plugins:a}),e(n)}}};return m(n,mt),m(i,ft),function(){f(n,mt),f(i,ft)}}var s=e.match(r)?mt:ft,o=function(r){return function(r){return function(n){return n.type===e&&t({payload:n,instance:I,plugins:a,abort:y}),r(n)}}};return m(o,s),function(){return f(o,s)}},once:function(e,t){if(!e||!C(t))return!1;if(e===le.bootstrap)throw new Error(".once disabled for "+e);var r=I.on(e,(function(e){t({payload:e.payload,instance:I,plugins:a,abort:y}),r()}));return r},getState:function(e){var t=G.getState();return e?p()(t,e):Object.assign({},t)},dispatch:function(e){var t=A(e)?{type:e}:e;if(ce.includes(t.type))throw new Error("reserved action "+t.type);var r=K({},t,{_:K({originalAction:t.type},e._||{})});G.dispatch(r)},enablePlugin:E.enable,disablePlugin:E.disable,plugins:E,storage:{getItem:s.getItem,setItem:function(e,t,r){G.dispatch({type:le.setItemStart,key:e,value:t,options:r})},removeItem:function(e,t){G.dispatch({type:le.removeItemStart,key:e,options:t})}},setAnonymousId:function(e,t){I.storage.setItem(ne,e,t)},events:{core:ce,plugins:c}},O=i.middlewares.concat([function(e){return function(e){return function(t){return t.meta||(t.meta=pt()),e(t)}}},g(mt),$e(I,d,{all:l,plugins:c}),Fe(s),me(I),be(I),g(ft)]),_={context:st,user:fe(s),page:nt,track:Ve,plugins:Le(d),queue:ze},D=te,P=te;if(v&&e.debug){var x=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;x&&(D=x({trace:!0,traceLimit:25})),P=function(){return 0===arguments.length?ut():k(typeof arguments[0])?lt():lt().apply(null,arguments)}}var R,U=function(e){return Object.keys(e).reduce((function(t,r){return ot.includes(r)||(t[r]=e[r]),t}),{})}(e),$=i.pluginsArray.reduce((function(e,t){var r=t.name,n=t.config,s=t.loaded,o=i.pluginEnabled[r];return e[r]={enabled:o,initialized:!!o&&Boolean(!t.initialize),loaded:Boolean(s({config:n})),config:n},e}),{}),F={context:U,user:S,plugins:$},G=X(function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]===z&&(r[i]=e[i])}var s,o=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(typeof r(void 0,{type:"@@redux/INIT"})===Y||typeof r(void 0,{type:J})===Y)throw new Error("reducer "+t+" "+Y)}))}(r)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var n=!1,i={},a=0;a<o.length;a++){var c=o[a],u=e[c],l=(0,r[c])(u,t);if(typeof l===Y){var d=ee(c,t);throw new Error(d)}i[c]=l,n=n||l!==u}return n?i:e}}(K({},_,r)),F,P(D(re.apply(void 0,O))));G.dispatch=(R=G.dispatch,function(e,t,r){var n=K({},e,{meta:pt(e.meta,t,dt(r))});return R.apply(null,[n])});var W=Object.keys(a);G.dispatch({type:le.bootstrap,plugins:W,config:U,params:b,user:S,initialUser:n,persistedUser:w});var q=W.filter((function(e){return i.pluginEnabled[e]})),V=W.filter((function(e){return!i.pluginEnabled[e]}));return G.dispatch({type:le.registerPlugins,plugins:W,enabled:i.pluginEnabled}),i.pluginsArray.map((function(e,t){var r=e.bootstrap,n=e.config,s=e.name;r&&C(r)&&r({instance:I,config:n,payload:e}),G.dispatch({type:le.registerPluginType(s),name:s,enabled:i.pluginEnabled[s],plugin:e}),i.pluginsArray.length===t+1&&G.dispatch({type:le.initializeStart,plugins:q,disabled:V})})),ct((function(e){G.dispatch({type:e?le.offline:le.online})})),function(e,t,r){setInterval((function(){return Te(e,t,r)}),3e3)}(G,d,I),I}var mt="before",ft="after",gt="cookie",yt=St(),bt=Et,vt=Et;function wt(e){return yt?Et(e,"",-1):B(e)}function St(){if(void 0!==yt)return yt;var e="cookiecookie";try{Et(e,e),yt=-1!==document.cookie.indexOf(e),wt(e)}catch(e){yt=!1}return yt}function Et(e,t,r,n,i,s){if("undefined"!=typeof window){var o=arguments.length>1;return!1===yt&&(o?H(e,t):L(e)),o?document.cookie=e+"="+encodeURIComponent(t)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(i?"; domain="+i:"")+(s?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var Tt="localStorage",It=V.bind(null,"localStorage"),Ct=W("localStorage","getItem",L),At=W("localStorage","setItem",H),Ot=W("localStorage","removeItem",B),_t="sessionStorage",Dt=V.bind(null,"sessionStorage"),Pt=W("sessionStorage","getItem",L),kt=W("sessionStorage","setItem",H);function xt(e){var t=e;try{if("true"===(t=JSON.parse(e)))return!0;
33if("false"===t)return!1;if(k(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch(e){}if(null!==t&&""!==t)return t}W("sessionStorage","removeItem",B);var Rt=It(),Ut=Dt(),Mt=St();function Nt(e,t){if(e){var r=jt(t),n=!Lt(r),i=$t(r)?xt(localStorage.getItem(e)):void 0;if(n&&!O(i))return i;var s=Ft(r)?xt(bt(e)):void 0;if(n&&s)return s;var o=Gt(r)?xt(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var a=L(e);return n?a:{localStorage:i,sessionStorage:o,cookie:s,global:a}}}function jt(e){return e?A(e)?e:e.storage:g}function $t(e){return Rt&&Ht(e,Tt)}function Ft(e){return Mt&&Ht(e,gt)}function Gt(e){return Ut&&Ht(e,_t)}function Lt(e){return e===y||"all"===e}function Ht(e,t){return e===g||e===t||Lt(e)}function Bt(e,t,r){return{location:e,current:t,previous:r}}var Wt={setItem:function(e,t,r){if(e&&!O(t)){var n={},i=jt(r),s=JSON.stringify(t),o=!Lt(i);return $t(i)&&(n[Tt]=Bt(Tt,t,xt(localStorage.getItem(e))),localStorage.setItem(e,s),o)?n[Tt]:Ft(i)&&(n[gt]=Bt(gt,t,xt(bt(e))),vt(e,s),o)?n[gt]:Gt(i)&&(n[_t]=Bt(_t,t,xt(sessionStorage.getItem(e))),sessionStorage.setItem(e,s),o)?n[_t]:(n[$]=Bt($,t,L(e)),H(e,t),o?n[$]:n)}},getItem:Nt,removeItem:function(e,t){if(e){var r=jt(t),n=Nt(e,y),i={};return!O(n.localStorage)&&$t(r)&&(localStorage.removeItem(e),i[Tt]=n.localStorage),!O(n.cookie)&&Ft(r)&&(wt(e),i[gt]=n.cookie),!O(n.sessionStorage)&&Gt(r)&&(sessionStorage.removeItem(e),i[_t]=n.sessionStorage),!O(n.global)&&Ht(r,$)&&(B(e),i[$]=n.global),i}}};function qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(r),!0).forEach((function(t){qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var zt=r(577865),Yt=r.n(zt),Jt=r(444920),Qt=r.n(Jt),Zt=r(174570),Xt=r.n(Zt),er=function(){},tr=r(527518),rr=r.n(tr),nr="__session",ir=["id","createdAt","created"];function sr(e){var t=e?new Date(e):new Date;return[t.toISOString(),t.getTime()]}function or(){var e=sr(),t=e[0],r=e[1];return{id:j(),created:r,createdAt:t}}var ar={session:[Pt,kt],page:[L,H]};function cr(e,t){for(var r=ar[e],n=r[0],i=r[1],s=or(),o=!1,a={},c=0;c<ir.length;c++){var u=ir[c],l="__"+e+"__session__"+u,d=n(l);o=t||!d,(t||!t&&!d)&&i(l,s[u]);var p=d&&!t?d:s[u],h="created"!==u?p:Number(p);a[u]=h}return ur(a,o)}function ur(e,t){var r=Date.now();return e.elapsed=r-e.created,e.expires&&(e.remaining=Math.max(e.expires-r,0),e.isExpired=0===e.remaining),e.isNew=t,e}function lr(e,t){void 0===e&&(e=30);var r=bt(nr),n=r?JSON.parse(r):dr(e);return t?n:ur(n,!r)}function dr(e,t,r){void 0===e&&(e=30);var n=r?lr(e,!0):or(),i=60*e,s=n.created;if(r){var o=sr(),a=o[0],c=o[1];n.modified=c,n.modifiedAt=a,s=c}var u=sr(s+1e3*i),l=u[0];return n.expires=u[1],n.expiresAt=l,n.duration=1e3*i,t&&(n=Object.assign(n,t)),vt(nr,JSON.stringify(n),i),ur(n,!r)}var pr=cr.bind(null,"session"),hr=cr.bind(null,"session",!0),mr=cr.bind(null,"page"),fr=cr.bind(null,"page",!0),gr="undefined"!=typeof window;function yr(e){return"boolean"==typeof e}var br=r(223265),vr=r.n(br),wr=r(77399),Sr=r.n(wr),Er=r(525691),Tr="EventListener";function Ir(e){return function(t,r,n,i){var s=n||f,o=i||!1;if(!v)return s;var a=Cr(r),c=Cr(t,!0);if(!c.length)throw new Error("noElements");if(!a.length)throw new Error("noEvent");var u=[];return function e(t){t&&(u=[]);for(var r=t?"add"+Tr:"remove"+Tr,n=0;n<c.length;n++){var i=c[n];u[n]=t?o&&o.once?Ar(s):s:u[n]||s;for(var l=0;l<a.length;l++)i[r]?i["on"+a[l]]=t?u[n]:null:i[r](a[l],u[n],o)}return e.bind(null,!t)}(e)}}function Cr(e,t){if(A(e))return t?Cr(document.querySelectorAll(e)):(r=e).split(r.indexOf(",")>-1?",":" ").map((function(e){return e.trim()}));var r;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],i=e.length>>>0;i--;)n[i]=e[i];return n}var s=function(e){return e?P(e)?e:[e]:[]}(e);return t?s.map((function(e){return A(e)?Cr(e,!0):e})).flat():s}function Ar(e,t){var r;return function(){return e&&(r=e.apply(t||this,arguments),e=null),r}}var Or=Ir("Event");function _r(e,t){return v&&C(window[e])?(r=window[e],n=t,void 0===(i=window)&&(i=null),C(r)?function(){r.apply(i,arguments),n.apply(i,arguments)}:n):window[e]=t;var r,n,i}Ir(),_r.bind(null,"onerror"),_r.bind(null,"onload");var Dr="undefined"==typeof window,Pr="hidden";var kr=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function xr(e,t){return t?0:Math.round((new Date-e)/1e3)}var Rr="object",Ur="string",Mr="name",Nr="version",jr="",$r="function",Fr="undefined",Gr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Lr=[[/microsoft (windows) (vista|xp)/i],[Mr,Nr],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[Mr,[Nr,Br,Gr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Mr,"Windows"],[Nr,Br,Gr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[Nr,/_/g,"."],[Mr,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[Mr,"MacOS"],[Nr,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[Nr,Mr],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[Mr,Nr],[/\(bb(10);/i],[Nr,[Mr,"BlackBerry"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Nr,[Mr,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Nr,[Mr,"webOS"]],[/crkey\/([\d\.]+)/i],[Nr,[Mr,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[Mr,"Chromium OS"],Nr],[/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/(unix) ?([\w\.]*)/i],[Mr,Nr]];function Hr(e,t){for(var r,n,i,s,o,a,c=0;c<t.length&&!o;){var u=t[c],l=t[c+1];for(r=n=0;r<u.length&&!o;
33)if(o=u[r++].exec(e))for(i=0;i<l.length;i++)a=o[++n],s=l[i],vr()(s)===Rr&&s.length>0?2==s.length?vr()(s[1])==$r?this[s[0]]=s[1].call(this,a):this[s[0]]=s[1]:3==s.length?vr()(s[1])!==$r||s[1].exec&&s[1].test?this[s[0]]=a?a.replace(s[1],s[2]):void 0:this[s[0]]=a?s[1].call(this,a,s[2]):void 0:4==s.length&&(this[s[0]]=a?s[3].call(this,a.replace(s[1],s[2])):void 0):this[s]=a||void 0;c+=2}}function Br(e,t){for(var r in t)if(vr()(t[r])===Rr&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(Wr(t[r][n],e))return"?"===r?void 0:r}else if(Wr(t[r],e))return"?"===r?void 0:r;return e}function Wr(e,t){return vr()(e)===Ur&&-1!==qr(t).indexOf(qr(e))}function qr(e){return e.toLowerCase()}function Vr(e){var t=e||(("undefined"==typeof window?"undefined":vr()(window))!==Fr&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:jr),r={};return r[Mr]=void 0,r[Nr]=void 0,Hr.call(r,t,Lr),r}var Kr="Brave";function zr(){if("undefined"==typeof window)return{};if(!window.navigator)return{};var e,t,r,n,i,s=window.navigator,o=s.platform,a=s.product,c=s.vendor,u=function(e){var t=e.userAgent,r=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(t);if(r)return{type:r[1],version:r[2]};var n=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(t);if(n)return{type:n[1],version:n[2]};var i=/(headlesschrome)(?:\/([\w\.]+)| )/i.exec(t);if(i)return{type:i[1],version:i[2]};var s=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(t);if(s)return{type:e.brave&&e.brave.isBrave?Kr:s[1],version:s[2]};var o=/.+(Safari)\/([0-9\.]+).*/i.exec(t);if(o)return{type:o[1],version:o[2]};var a=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(t);if(a)return{type:a[1],version:a[2]};var c=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(t)||["","NA","0.0.0"];return{type:c[1],version:c[2]}}(window.navigator),l=u.type,d=u.version,p=l===Kr?l:(c||"").split(" ")[0];return{platform:o,os:Vr(),make:p||a,model:l,version:d,name:[l,d].join("/"),language:(t=window.navigator,r=t.language,n=t.browserLanguage,i=t.languages,(r||n||(i||["en_US"])[0]).toLowerCase().replace("-","_")),timezone:(e=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()),e&&e[1]||"")}}function Yr(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})[e]||e}function Jr(e){return Qr.apply(this,arguments)}function Qr(){return Qr=Xt()(Qt().mark((function e(t){var r,n,i,s,o,a,c=arguments;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=c.length>1&&void 0!==c[1]&&c[1],n={},e.t0=Qt().keys(t);case 3:if((e.t1=e.t0()).done){e.next=13;break}return i=e.t1.value,s=Array.isArray(t[i])?t[i]:[t[i]],o=r?s:s[0],e.next=9,en(o,rn);case 9:on(a=e.sent)||(n[i]=a),e.next=3;break;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)}))),Qr.apply(this,arguments)}function Zr(e){return Xr.apply(this,arguments)}function Xr(){return(Xr=Xt()(Qt().mark((function e(t){var r,n;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},e.t0=Qt().keys(t);case 2:if((e.t1=e.t0()).done){e.next=9;break}return n=e.t1.value,e.next=6,en(t[n],nn);case 6:r[n]=e.sent,e.next=2;break;case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function en(e,t){return tn.apply(this,arguments)}function tn(){return(tn=Xt()(Qt().mark((function e(t,r){return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t){e.next=4;break}return e.next=3,t();case 3:t=e.sent;case 4:return e.abrupt("return",r(t));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rn(e){if(null!=e)return Array.isArray(e)?e.filter(sn).map((function(e){return e.toString()})):on(e)?e:e.toString()}function nn(e){return parseFloat(Number(Array.isArray(e)?e[0]:e))}function sn(e){return null!=e}function on(e){return null==e}var an="_session.start",cn="_session.stop",un="pageView";function ln(e){return dn.apply(this,arguments)}function dn(){return dn=Xt()(Qt().mark((function e(t){var r,n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S,E,T,I,C,A,O,_,D,P,k,x,R=arguments;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=R.length>1&&void 0!==R[1]?R[1]:{},i=(n=R.length>2&&void 0!==R[2]?R[2]:{}).appTitle,s=n.appPackageName,o=n.appVersionCode,a=n.eventMapping,c=n.enrichEventAttributes,u=n.enrichEventMetrics,l=n.debug,d=l?console.log:function(){},p=Yr(t,a),h=lr(),m=r.sessionId||h.id,f=r.sessionStart||h.createdAt,g=r.sessionStart?new Date(r.sessionStart).getTime():h.created,d("event sessionData    ",JSON.stringify(h)),gr&&(y=mr(),b=pr(),d("event pageSessionInfo",JSON.stringify(y)),d("event tabSessionData ",JSON.stringify(b))),v=r.attributes||{},w=r.eventId||j(),S=r.time?new Date(r.time):new Date,E=S.toISOString(),T=S.getTime()-g,I=Yt()({date:E,sessionId:m},gr?{pageSession:y.id}:{}),!c){e.next=23;break}return e.next=20,c();case 20:e.t0=e.sent,e.next=24;break;case 23:e.t0={};case 24:if(C=e.t0,A=Yt()(Yt()(Yt()({},I),C),v),O=r.metrics||{},_={sessionTime:h.elapsed||T,hour:S.getHours(),day:S.getDay()+1,month:S.getMonth()+1,year:S.getFullYear()},!u){e.next=34;break}return e.next=31,u();case 31:e.t1=e.sent,e.next=35;break;case 34:e.t1={};case 35:return D=e.t1,P=Yt()(Yt()(Yt()({},_),D),O),e.next=39,Jr(A);case 39:return e.t2=e.sent,e.next=42,Zr(P);case 42:return e.t3=e.sent,k={attributes:e.t2,metrics:e.t3},d("".concat(w,":").concat(p)),d("eventAttributes",k.attributes),d("eventMetrics",k.metrics),gr&&d("clientInfo",zr()),x=rr()({},w,Yt()(Yt()({EventType:p,Timestamp:E,AppPackageName:s,AppTitle:i},o?{AppVersionCode:o}:{}),{},{Attributes:k.attributes,Metrics:k.metrics,Session:{Id:m,StartTimestamp:f}}
33)),t===cn&&(x[w].Session.Duration=T,x[w].Session.StopTimestamp=E),e.abrupt("return",x);case 51:case"end":return e.stop()}}),e)}))),dn.apply(this,arguments)}var pn="__endpoint";function hn(e){return"".concat(pn,".").concat(e)}var mn,fn="__endpoint",gn=!1;function yn(){return bn.apply(this,arguments)}function bn(){return bn=Xt()(Qt().mark((function e(){var t,r,n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S,E=arguments;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E.length>0&&void 0!==E[0]?E[0]:{},n=(r=E.length>1&&void 0!==E[1]?E[1]:{}).getUserId,i=r.getEndpointId,s=r.endpointMigration,T=void 0,T=r.getContext,o="function"==typeof T?T():T,a=o.sessionKey?o.sessionKey():"sessions",c=o.pageViewKey?o.pageViewKey():"pageViews",gr&&(d=zr(),u=mr(),l=u.id),p=lr(),e.next=10,i();case 10:if(h=e.sent,gn||(gn=!0,(m=Ct(fn))&&(vn(h,m),Ot(fn))),f=wn(h),g=En(r),y=Sn(g,d),b={Attributes:{},Demographic:y,Location:{},Metrics:{}},gr&&(d.device&&d.device.vendor&&(b.Attributes.DeviceMake=[d.device.vendor]),d.device&&d.device.model&&(b.Attributes.DeviceModel=[d.device.model]),d.device&&d.device.type&&(b.Attributes.DeviceType=[d.device.type])),!(t=Sr().all([f,b,t],{arrayMerge:Tn})).User||!t.User.UserId){e.next=23;break}return e.next=21,n();case 21:v=e.sent,t.User.UserId!==v&&(t.User.UserId=v);case 23:if(t.User&&t.User.UserId){e.next=28;break}return e.next=26,n();case 26:(w=e.sent)&&(t.User=t.User||{},t.User.UserId=w);case 28:if(!t.User||!t.User.UserAttributes){e.next=32;break}return e.next=31,Jr(t.User.UserAttributes,!0);case 31:t.User.UserAttributes=e.sent;case 32:return e.next=34,Jr(t.Attributes,!0);case 34:return t.Attributes=e.sent,e.next=37,Zr(t.Metrics);case 37:if(t.Metrics=e.sent,t.Metrics[a]||(t.Metrics[a]=1),t.Metrics[c]||(t.Metrics[c]=1),s&&(t=s(h,t)),S=t.Attributes.lastSession){e.next=47;break}return t.Attributes.lastSessionDate=[p.createdAt],t.Attributes.lastSession=[p.id],l&&(t.Attributes.lastPageSession=[l]),e.abrupt("return",vn(h,t));case 47:return S&&S[0]!==p.id&&(t.Attributes.lastSessionDate=[p.createdAt],t.Attributes.lastSession=[p.id],t.Metrics[a]+=1),t.Attributes&&t.Attributes.lastPageSession&&Array.isArray(t.Attributes.lastPageSession)&&t.Attributes.lastPageSession.length>0&&t.Attributes.lastPageSession[0]!==l&&(t.Attributes.lastPageSession=[l],t.Metrics[c]+=1),e.abrupt("return",vn(h,t));case 50:case"end":return e.stop()}var T}),e)}))),bn.apply(this,arguments)}function vn(e,t){var r=hn(e),n="string"==typeof t?t:JSON.stringify(t);return At(r,n),t}function wn(e){try{return JSON.parse(Ct(hn(e)))||{}}catch(e){}return{}}function Sn(e,t){return gr?function(e,t){var r={AppVersion:e,Locale:t.language,Make:t.make,Model:t.model,ModelVersion:t.version,Platform:t.os.name||t.platform};return t.os&&t.os.version&&(r.PlatformVersion=t.os.version),r}(e,t):function(e){return{AppVersion:e,Make:"generic server",Platform:"Node.js",PlatformVersion:process.version}}(e)}function En(e){var t=e.appTitle||e.appPackageName||"",r=e.appVersionCode||"0.0.0";return t?"".concat(t,"@").concat(r):r}function Tn(e,t){return t}var In=[429,500],Cn=[202],An=400;function On(e,t){return _n.apply(this,arguments)}function _n(){return _n=Xt()(Qt().mark((function e(t,r){var n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.pinpointRegion,i=r.pinpointAppId,s=r.lambdaArn,o=r.lambdaRegion,a=r.credentials,c=r.getCredentials,u=r.debug,e.next=3,Dn(a,c);case 3:return l=e.sent,u&&console.log("pinpoint auth",l),d=o||n,p=n||o,h=!0===r.fips?"-fips":"",m="https://lambda.".concat(d,".amazonaws.com/2015-03-31/functions/").concat(s,"/invocations"),f="https://pinpoint".concat(h,".").concat(p,".amazonaws.com/v1/apps/").concat(i,"/events"),g=s?m:f,v={body:JSON.stringify(t)},y=new Er.AwsClient(l),e.next=16,y.fetch(g,v).then((function(e){return e.json()}));case 16:b=e.sent,e.next=24;break;case 19:return y=new mn.PinpointClient({credentials:l,region:n}),w=new mn.PutEventsCommand({ApplicationId:i,EventsRequest:t}),e.next=23,y.send(w);case 23:b=e.sent;case 24:return b&&b.Results&&Object.keys(b.Results).map((function(e){return b.Results[e]}
33)).forEach((function(e){var t=e.EndpointItemResponse||{},r=e.EventsItemResponse||{};Object.keys(t).length&&(Cn.includes(t.StatusCode)||In.includes(t.StatusCode)||kn(t,Endpoint));var n=Object.keys(r);n.length&&n.forEach((function(e){}))})),e.abrupt("return",b);case 26:case"end":return e.stop()}}),e)}))),_n.apply(this,arguments)}function Dn(e,t){return Pn.apply(this,arguments)}function Pn(){return(Pn=Xt()(Qt().mark((function e(t,r){var n,i;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,Object.keys(n).length||!r){e.next=11;break}return e.prev=2,e.next=5,r();case 5:n=e.sent,e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(2),new Error(e.t0);case 11:return i={accessKeyId:n.accessKeyId||n.AccessKeyId,secretAccessKey:n.secretAccessKey||n.SecretKey,sessionToken:n.sessionToken||n.SessionToken,retries:5},e.abrupt("return",i);case 13:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function kn(e,t){var r=e.StatusCode,n=e.Message;if(r===An){if(n.startsWith("Missing ChannelType"))throw new Error("Missing ChannelType");if(n.startsWith("Exceeded maximum endpoint per user count"))throw new Error("Exceeded maximum endpoint per user count")}}var xn=["PUSH","GCM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","ADM","SMS","VOICE","EMAIL","BAIDU","CUSTOM"].reduce((function(e,t){return e[t]=t,e}),{}),Rn=zr(),Un=an,Mn=cn,Nn=/.+\@.+\..+/;function jn(e){try{return JSON.parse(Ct(hn(e)))||{}}catch(e){}return{}}function $n(e){return e.sort((function(e,t){var r=e.EventType,n=t.EventType;return r==Un?-1:n==Un||r==Mn?1:n==Mn?-1:void 0})).reduce((function(e,t){return Yt()(Yt()({},t),e)}),{})}function Fn(e,t,r){return{BatchItem:rr()({},e,{Endpoint:t,Events:r})}}var Gn=cn;function Ln(){return{}}function Hn(){throw new Error("Pinpoint not loaded")}function Bn(e){var t=e.config,r=e.instance;t&&t.disableAnonymousTraffic&&!r.user("userId")&&r.once("identifyStart",(function(e){e.plugins["aws-pinpoint"].loaded()||r.loadPlugin("aws-pinpoint")}))}var Wn={disableAnonymousTraffic:!1,pinpointRegion:"us-east-1",eventMapping:{}},qn=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1;return{name:"aws-pinpoint",config:Yt()(Yt()({},Wn),r),bootstrap:Bn,initialize:function(n){var i=n.config,s=n.instance,o=i.disableAnonymousTraffic,a=i.debug?console.log:function(){},c=s.getState(),u=c.user||{},l=u.userId,d=u.anonymousId,p=c.context||{},h=p.app,m=p.version,f=p.campaign,g=mr(),y=pr(),b=lr();if(a("initPageSession",g),a("initTabSession",y),a("initSessionData",b),b&&b.anonId&&b.anonId!==d){a("anonId different refresh session details"),fr(),hr();var v=dr(30,{anonId:d,userId:l});a("newSessionForNewUser",v)}if(!l&&o)return!1;var w=Object.keys(f).reduce((function(e,t){return e["utm_".concat(t)]=f[t],e}),{}),S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Yt()({getContext:e.getContext||Ln,credentials:e.credentials||{},getEndpointId:e.getEndpointId},e),r=t.debug?console.log:function(){},n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getEndpointId,r=e.debug;return function(){var n=Xt()(Qt().mark((function n(){var i,s,o,a,c,u,l,d,p,h=arguments;return Qt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=h.length>0&&void 0!==h[0]?h[0]:[],s=h.length>1&&void 0!==h[1]?h[1]:{},n.next=4,t();case 4:if(o=n.sent){n.next=8;break}return console.error("No endpoint id. check getEndpointId()"),n.abrupt("return");case 8:if("object"===vr()(s)&&Object.keys(s).length){n.next=13;break}n.t0=jn(o),n.next=16;break;case 13:return n.next=15,yn(s,e);case 15:n.t0=n.sent;case 16:return a=n.t0,c=a.ChannelType,a.Address&&(m=a.Address,Nn.test(m))&&(c=xn.EMAIL),!c&&a.Address&&(c="android"===Rn.platform?c||xn.GCM:c||xn.APNS),r&&(console.log("Endpoint",a),console.log("CHANNEL_TYPE",c)),a.RequestId=j(),a.ChannelType=c,a.Address&&(a.OptOut=a.OptOut||"NONE"),u=$n(i),l=Fn(o,a,u),n.prev=26,n.next=29,On(l,e);case 29:d=n.sent,n.next=36;break;case 32:n.prev=32,n.t1=n.catch(26),console.log("Error calling AWS",n.t1),p=n.t1;case 36:return n.abrupt("return",{endpoint:a,response:d,error:p,events:i});case 37:case"end":return n.stop()}var m}),n,null,[[26,32]])})));return function(){return n.apply(this,arguments)}}()}(t),i=function(e,t){var r,n,i,s=(t=t||{}).initial||[],o=t.max||1/0,a=t.interval||1e4,c=t.onEmpty||er,u=t.onPause||er;function l(t){clearInterval(r);var n=s.splice(0,o);return n.length&&e(n,s),s.length?t?l():d():(i=!1,c(s))}function d(){i=!0,r=setInterval(l,a)}return s.length&&d(),{flush:function(e){l(e)},resume:l,push:function(e){return(n=s.push(e))>=o&&!t.throttle&&l(),i||d(),n},size:function(){return s.length},pause:function(e){e&&l(),clearInterval(r),i=!1,u(s)}}}(function(){var e=Xt()(Qt().mark((function e(t,i){var s;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.forEach((function(e){return r("> Queue event",e)})),e.next=3,n(t,{});case 3:s=e.sent,r("> Queue response",s);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),{max:10,interval:e.flushInterval||3e3,throttle:!0}),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var r=Xt()(Qt().mark((function r(n){var i,s,o,a,c=arguments;return Qt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=c.length>2&&void 0!==c[2]?c[2]:{},o=c.length>3&&void 0!==c[3]&&c[3],yr(i=c.length>1&&void 0!==c[1]?c[1]:{})&&(o=i={}),yr(s)&&(o=s={}),r.next=7,ln(n,i,t);case 7:if(a=r.sent,!Object.entries(s).length&&n!==un){r.next=12;break}return r.next=11,yn(s,t);
33case 11:s=r.sent;case 12:if(e.push(a),!o){r.next=17;break}return r.abrupt("return",e.flush());case 17:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()}(i,t);yn({},e);var o=function(e){if(!gr)return Ln;var t=function(e){return function(){e(Gn,!0)}}(e);return window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}}(s);return{updateEndpoint:function(e){return n([],e)},recordEvent:s,disable:function(){o()}}}(Yt()(Yt()({},i),{},{appTitle:i.appTitle||h,appPackageName:i.appPackageName||h,appVersionCode:i.appVersionCode||m,eventMapping:i.eventMapping,getEndpointId:function(){return s.user("anonymousId")},getUserId:function(){return s.user("userId")},getContext:function(){return{sessionKey:i.sessionKey,pageViewKey:i.pageViewKey,initialSession:b}},enrichEventAttributes:function(){return Yt()({anonId:s.user("anonymousId"),userId:s.user("userId"),hash:window.location.hash,path:window.location.pathname,referrer:document.referrer,search:window.location.search,title:document.title,host:window.location.hostname,url:window.location.origin+window.location.pathname},w)},enrichUserAttributes:i.enrichUserAttributes,enrichEventMetrics:function(){return{}}}));e=S.recordEvent,t=S.updateEndpoint,b&&b.isNew&&(a("Start brand new session because cookie not found"),e(an)),function(e){var t,r,n=e.onIdle,i=e.onWakeUp,s=e.onHeartbeat,o=e.timeout,a=void 0===o?1e4:o,c=e.throttle,u=void 0===c?2e3:c,l=!1,d=new Date;!function(e,t){void 0===t&&(t={});var r=function(e,t){var r=this,n=!1;return function(i){n||(e.call(r,i),n=!0,setTimeout((function(){return n=!1}),t))}}(e,t.throttle||1e4),n=[];function i(){var e=function(e){if(Dr)return!1;var t=Dr||Pr in document?Pr:["webkit","moz","ms","o"].reduce((function(e,t){var r=t+"Hidden";return!e&&r in document?r:e}),null),r="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(Boolean(document[t]))},i=function(){return document.addEventListener(r,n)};return i(),function(){return document.removeEventListener(r,n),i}}((function(e){e||r({type:"tabVisible"})}));return n=[e].concat(kr.map((function(e){return Or(document,e,r)}))).concat(Or(window,"load",r)).concat(Or(window,"scroll",r,{capture:!0,passive:!0})),s}function s(){n.map((function(e){return e()}))}i()}((function(e){clearTimeout(t),s&&!l&&s(xr(d),e),i&&l&&(l=!1,i(xr(r),e),d=new Date),t=setTimeout((function(){l=!0,n&&(r=new Date,n(xr(d),e))}),a)}),{throttle:u})}({timeout:18e5,throttle:2e4,onIdle:function(t,n){var i;a("Session idle. Active ".concat(t," seconds")),i=lr(),r.debug&&console.log("Stop session",i),e(cn,!0)},onWakeUp:function(t,n){var i;a("Session wakeup. Idle ".concat(t," seconds")),i=dr(30),r.debug&&console.log("START SESSION",i),e(an)},onHeartbeat:function(e,t){a("ping session",new Date),a("total active time",e);var r,n,i=s.user();r=30,n={anonId:i.anonymousId,userId:i.userId},void 0===r&&(r=30),dr(r||1,n,!0)}})},page:function(t){if(t.payload,t.config,!e)return Hn();n&&fr(),e(un),n=!0},track:function(t){var r=t.payload,n=t.config;if(t.instance,!e)return Hn();if(!n.disableAnonymousTraffic||r.userId){var i,s=(i=r.properties,Object.keys(i).reduce((function(e,t){var r=i[t];return"number"==typeof r&&(e.metrics[t]=r),"string"!=typeof r&&"boolean"!=typeof r||(e.attributes[t]=r),e}),{attributes:{},metrics:{}}));e(r.event,s)}},identify:function(e){var r=e.payload,n=r.userId,i=r.traits;if(!t)return Hn();var s={},o={};n&&(o.UserId=n),i&&Object.keys(i).length&&(o.UserAttributes=i),Object.keys(o).length&&(s.User=o),t(s,!0)},reset:function(e){var t=hn(e.instance.user("anonymousId"));Ot(t)},loaded:function(){return!!e}}},Vn=r(732247),Kn=r(170209);class zn{constructor(e){this.name="amazon",this.isInitialized=!1;const{app:t={},fips:r,userPoolID:s}=e;this.analytics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ht(Kt(Kt({},{storage:Wt}),e))}({app:t.name,version:t.version,plugins:[qn({fips:r,pinpointAppId:t.id,getCredentials:()=>function(e,t={}){const r=`https://cognito-identity${!0===t.fips?"-fips":""}.us-east-1.amazonaws.com/`;let s=n.storage.get(i);if(s&&Date.now()/1e3<s.Expiration)return Promise.resolve(s);const o={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:e})};return fetch(r,o).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()})).then((e=>{const{IdentityId:t}=e,n={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:t})};return fetch(r,n)}
33)).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()})).then((({Credentials:e})=>(n.storage.set(i,e),e)))}(s,{fips:r})})]}),Object.assign(this,e)}init(){if(!this.isInitialized)return this.isInitialized=!0,Promise.resolve()}static async setAccessPermissions({id:e,authentication:t,username:r,accessChangeset:n}){return async function({id:e,authentication:t,username:r,accessChangeset:n}){const{properties:i={}}=await(0,Kn.rV)(e,{authentication:t}),s=i.telemetry,o=void 0===s?{}:s,{arcgis:{access:a={}}={}}=o,c=(0,Vn.__rest)(o,["arcgis"]),u=function(e,t,r){return r.reduce(((t,r)=>{const{action:n,targetProperty:i}=r;return"add"===n?t[i]={updatedAt:new Date,updatedBy:e}:"remove"===n&&delete t[i],t}),t)}(r,a,n);return(0,Kn.$G)({item:{id:e,properties:Object.assign(Object.assign({},i),{telemetry:Object.assign(Object.assign({},c),{arcgis:{access:Object.assign({},u)}})})},authentication:t})}({id:e,authentication:t,username:r,accessChangeset:n})}static async getAccessPermissions({id:e,authentication:t}){return async function({id:e,authentication:t}){const{properties:{telemetry:{arcgis:{access:r={}}={}}={}}}=await(0,Kn.rV)(e,{authentication:t});return{access:r}}({id:e,authentication:t})}logPageView(e,t){const r=function({page:e,previousPage:t={},options:r={},dimensionLookup:n={},metricLookup:i={}}){const o=u(r,i),a=s({telemetryData:r,dimensionLookup:n,excludeKeys:["workflow",...Object.keys(o),...Object.keys(i)]}),{referrer:c,title:l}=document||{},{hostname:d,pathname:p}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:c,hostname:d,path:e||p,pageUrl:e||p,pageName:l,previousPageUrl:t.pageUrl,previousPageName:t.pageName},a),o)}({page:e,previousPage:this.previousPage,options:t,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{pageUrl:n,pageName:i}=r;this.previousPage={pageUrl:n,pageName:i},this.analytics.track("pageView",r)}logEvent(e={}){const t=function({event:e={},dimensionLookup:t={},metricLookup:r={}}){var n,i;const{pathname:o,eventType:a="other"}=e,c=u(e,r),l=s({telemetryData:Object.assign({eventType:a},e),dimensionLookup:t,excludeKeys:["workflow","pathname",...Object.keys(c),...Object.keys(r)]}),d=Object.assign(Object.assign({name:a},l),c);return"undefined"!=typeof document&&document.referrer&&(d.referrer=document.referrer),"undefined"==typeof window||d.hostname||(d.hostname=null===(n=window.location)||void 0===n?void 0:n.hostname),d.path="undefined"!=typeof window&&window.location.pathname?null===(i=window.location)||void 0===i?void 0:i.pathname:o,d}({event:e,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{name:r}=t;this.analytics.track(r,t)}}},714995:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultDimensions=void 0,t.defaultDimensions={CATEGORY:"category",ACTION:"action",LABEL:"label"}},90810:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(714995),t)},926847:function(e,t,r){"use strict";var n,i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.customDimensionsConfig=t.constantDimensions=t.dictionaryDimensions=t.dimensions=void 0;var o=r(90810);t.dimensions=i(i({},o.defaultDimensions),{DETAILS:"details",USER_TYPE:"userType",ID:"id",TYPE:"type",ORGANIZATION_ID:"organizationId",GROUP_ID:"groupId",GROUP_ACCESS:"groupAccess",GROUP_TYPE:"groupType",SEARCH:"search",GROUP_ORG_ID:"groupOrgId",SITE_ID:"siteId",ACCESS:"access",CONTENT_ORG_ID:"contentOrgId",ELEMENT:"element",RESPONSE:"response",POST_ID:"postId",PARENT_ID:"parentId",CHANNEL_ID:"channelId",CHANNEL_ACCESS:"channelAccess"}),t.dictionaryDimensions=[t.dimensions.CATEGORY,t.dimensions.ACTION,t.dimensions.LABEL,t.dimensions.DETAILS
33],t.constantDimensions=s(s([],t.dictionaryDimensions,!0),[t.dimensions.ELEMENT,t.dimensions.RESPONSE],!1),t.customDimensionsConfig=((n={})[t.dimensions.DETAILS]=1,n[t.dimensions.USER_TYPE]=2,n[t.dimensions.ID]=3,n[t.dimensions.TYPE]=4,n[t.dimensions.ORGANIZATION_ID]=5,n[t.dimensions.GROUP_ID]=6,n[t.dimensions.GROUP_ACCESS]=7,n[t.dimensions.GROUP_TYPE]=8,n[t.dimensions.SEARCH]=9,n[t.dimensions.GROUP_ORG_ID]=10,n[t.dimensions.SITE_ID]=11,n[t.dimensions.ACCESS]=12,n[t.dimensions.CONTENT_ORG_ID]=13,n[t.dimensions.ELEMENT]=14,n[t.dimensions.RESPONSE]=15,n[t.dimensions.POST_ID]=16,n[t.dimensions.PARENT_ID]=17,n[t.dimensions.CHANNEL_ID]=18,n[t.dimensions.CHANNEL_ACCESS]=19,n)},787268:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{
34default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.constants=t.dictionary=t.customMetricsConfig=t.customDimensionsConfig=void 0;var i=n(r(123608)),s=n(r(516873)),o=r(926847);Object.defineProperty(t,"customDimensionsConfig",{enumerable:!0,get:function(){return o.customDimensionsConfig}});var a=r(431421);Object.defineProperty(t,"customMetricsConfig",{enumerable:!0,get:function(){return a.customMetricsConfig}}),t.dictionary=i.default,t.constants=s.default},431421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.customMetricsConfig=t.metrics=void 0,t.metrics={POSITION:"position",SIZE:"size",DURATION:"duration",COUNT:"count"},t.customMetricsConfig=((r={})[t.metrics.POSITION]=1,r[t.metrics.SIZE]=2,r[t.metrics.DURATION]=3,r[t.metrics.COUNT]=4,r)},635910:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GoogleAnalytics:()=>s});var n=r(732247),i=r(785913);class s{constructor(e){var t;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,"undefined"!=typeof window&&!(null===(t=null==e?void 0:e.measurementIds)||void 0===t?void 0:t.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,e)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return(0,i.createScriptTags)(this._getScripts())}
34async init(){if(!this.isInitialized){if("undefined"==typeof window)throw new i.WindowUndefinedError("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map((e=>(0,i.injectScriptElementAsync)(e)))),this.injectConfig(),this.isInitialized=!0}}logPageView(e,t={}){const r=this.buildCustomParams(t),n=Object.assign({page_title:e||window.location.pathname},r);return window.gtag("event","page_view",n),!0}logEvent(e){let{action:t}=e,r=(0,n.__rest)(e,["action"]);const i=t||"other",s=this.buildCustomParams(r);return window.gtag("event",i,s),!0}disable(){this.measurementIds&&this.measurementIds.forEach((e=>{window[`ga-disable-${e}`]=!0}))}enable(){this.measurementIds&&this.measurementIds.forEach((e=>{window[`ga-disable-${e}`]=void 0}))}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const e={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach((t=>{window.gtag("config",t,e)}))}buildCustomParams(e){let t,{category:r,label:n}=e;return t=this.verifyCustomDimensionAndMetrics(e),r&&(t=Object.assign(Object.assign({},t),{event_category:r})),n&&(t=Object.assign(Object.assign({},t),{event_label:n})),t}verifyCustomDimensionAndMetrics(e){const t=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),r=Object.values(t);return Object.keys(e).filter((e=>r.includes(e))).reduce(((t,r)=>Object.assign(t,{[r]:e[r]})),{})}createDimensionsAndMetricsCustomMap(e={},t={}){const r=this.createMetricCustomMap(t),n=this.createDimensionCustomMap(e);return Object.assign(Object.assign({},r),n)}createMetricCustomMap(e={}){return Object.keys(e).map((function(t){return{key:`metric${e[t]}`,value:t}})).filter((e=>e)).reduce(((e,{key:t,value:r})=>(e[t]=r,e)),{})}createDimensionCustomMap(e={}){return Object.keys(e).map((function(t){return{key:`dimension${e[t]}`,value:t}})).filter((e=>e)).reduce(((e,{key:t,value:r})=>(e[t]=r,e)),{})}}},127924:(e,t,r)=>{"use strict";function n(e){const{host:t,path:r,query:n}=e,i=t.endsWith("/")?t:`${t}/`,s=new URL(r,i);return s.search=function(e={}){const t=Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,r)=>(t[r]=e[r],t)),{});return new URLSearchParams(t).toString()}(n),s.toString()}r.r(t),r.d(t,{COMMON_METRICS:()=>L,TIME_DIMENSIONS:()=>H,buildSimpleDimensionFilters:()=>K,getTelemetryReport:()=>I,isAuthorized:()=>V});class i extends Error{constructor(e,t,r){super(e),this.status=r,this.url=t}}var s,o,a=r(29677),c=r(67953),u=r(921433),l=r(348753),d=r(170209);function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var s=t&&t.prototype instanceof b?t:b,o=Object.create(s.prototype),a=new k(n||[]);return i(o,"_invoke",{value:O(e,r,a)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",m="suspendedYield",f="executing",g="completed",y={};function b(){}function v(){}function w(){}var S={};u(S,o,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(x([])));T&&T!==r&&n.call(T,o)&&(S=T);var I=w.prototype=b.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function r(i,s,o,a){var c=d(e[i],e,s);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,o,a)}),(function(e){r("throw",e,o,a)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,a)}))}a(c.arg)}var s;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return s=s?s.then(i,i):i()}})}function O(t,r,n){var i=h;return function(s,o){if(i===f)throw new Error("Generator is already running");if(i===g){if("throw"===s)throw o;return{value:e,done:!0}}for(n.method=s,n.arg=o;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?g:m,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=g,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&
vendor: 4,709 bytes, line 34
34(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=d(i,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var o=s.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=w,i(I,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:v,configurable:!0}),v.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},C(A.prototype),u(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,i,s){void 0===s&&(s=Promise);var o=new A(l(e,r,n,i),s);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(I),u(I,c,"Generator"),u(I,o,(function(){return this})),u(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=x,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=e,o.arg=t,s?(this.method="next",this.next=s.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function h(e,t,r,n,i,s,o){try{var a=e[s](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var s=e.apply(t,r);function o(e){h(s,n,i,o,a,"next",e)}function a(e){h(s,n,i,o,a,"throw",e)}o(void 0)}))}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
34for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e,t,r){return v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&b(i,r.prototype),i},v.apply(null,arguments)}function w(e){var t="function"==typeof Map?new Map:void 0;return w=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,y(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),b(n,e)},w(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){var r=e.scope,n=e.startDate,i=e.endDate,s=e.metrics,o=e.dimensions,a=e.dimensionFilters,c=e.timeDimension,u=e.orderBy,l=e.limit,d=e.offset,p=e.emptyRows,h=t.customDimensionsConfig,m=null!=o&&o.length&&h?function(e,t){return e.map((function(e){var r=t[e];return r?"dimension"+r:e}))}(o,h):o,g=h?function(e,t){return void 0===e&&(e=[]),e.map((function(e){var r=t[e.name];return r?f({},e,{name:"dimension"+r}):e}))}(a,h):a;return f({},t,{httpMethod:"POST",params:{scope:r,dateRange:{startDate:n,endDate:i},metrics:s,dimensions:m,dimensionFilters:g,timeDimension:c,orderBy:u,limit:l,offset:d,emptyRows:p}})}function T(e,t,r){return(s=s||m(p().mark((function e(t,r,s){var o,a,c,u,l,d,h,m;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=E(r,s),a=o.authentication,c=o.httpMethod,u=o.params,l=o.hubApiUrl,d={headers:{"Content-Type":"application/json",Authorization:""+(null==a?void 0:a.token)},method:c,body:JSON.stringify(u)},h=n({host:l||"https://hub.arcgis.com",path:"/api/telemetry/v1/"+t.replace(/^\//,"")}),e.next=5,fetch(h,d);case 5:if((m=e.sent).ok){e.next=8;break}throw new i("Error! status: ",h,m.status);case 8:return e.abrupt("return",m.json());case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e,t){return(o=o||m(p().mark((function e(t,r){var n,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T("/report",t,r);case 2:if(n=e.sent,i=r.customDimensionsConfig,!C(t.dimensions,i)){e.next=6;break}return e.abrupt("return",A(n,i));case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){return!(!e||!t)&&e.some((function(e){return Object.keys(t).includes(e)}))}function A(e,t){var r=e.data,n=function(e){return void 0===e&&(e={}),Object.keys(e).reduce((function(t,r){return t["dimension"+e[r]]=r,t}),{})}(t);return e.data=r.map((function(e){return Object.keys(e).reduce((function(t,r){return r.includes("dimension")?t[n[r]]=e[r]:t[r]=e[r],t}),{})})),e}var O,_,D,P,k,x=function(e){function t(r){var n;return(n=e.call(this,"contentId origin: "+r+" is not currently supported")||this).code="UnknownContentOriginError",Object.setPrototypeOf(S(n),t.prototype),n}return g(t,e),t}(w(Error)),R=function(e){function t(r,n){var i;return(i=e.call(this,"content-item with id: "+r+":"+n+" not found or inaccessible.")||this).code="ContentItemNotFoundError",Object.setPrototypeOf(S(i),t.prototype),i}return g(t,e),t}(w(Error)),U="CONT_0001";function M(e,t,r){return(O=O||m(p().mark((function e(t,r,n){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=2;break}return e.abrupt("return",N(t,r,n));case 2:return e.abrupt("return",j(t,r));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e,t,r){return(_=_||m(p().mark((function e(t,r,n){var i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,d.rV)(t,{authentication:r});case 3:return i=e.sent,e.abrupt("return",$(i,n));case 7:if(e.prev=7,e.t0=e.catch(0),e.t0.code!==U){e.next=12;break}throw new R("portal",t);case 12:throw e.t0;case 13:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function j(e,t){return(D=D||m(p().mark((function e(t,r){var n,i,s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all([(0,d.rV)(t,{authentication:r}),r.getUser()]);case 3:return n=e.sent,i=n[0],s=n[1],e.abrupt("return",$(i,s));case 9:if(e.prev=9,e.t0=e.catch(0),e.t0.code!==U){e.next=14;break}throw new R("portal",t);case 14:throw e.t0;case 15:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function $(e,t){if(function(e,t){let r=!1;const{itemControl:n,owner:i,orgId:s}=e,{roleId:o,role:u,username:l,groups:d,orgId:p}=t,h=(0,a.q)(["admin","update"],n)||!!i&&i===l||!(!s||s!==p)&&!o&&"org_admin"===u,m=function(e){const{privileges:t=[]}=e;return(0,a.q)(t,"portal:user:createItem")}(t);if(m&&h)r=!0;else if(m){const t=[...(0,c.W)(e,"groupIds")||[],(0,c.W)(e,"properties.collaborationGroupId")],n=e=>function(e){return e.capabilities.includes("updateitemcontrol")}(e)&&(0,a.q)(t,e.id);r=d.some(n)}return r}(e,t))return!0;var r,n,i=e.properties;return!!i&&(r=t.groups,n=i.collaborationGroupId,void 0===r&&(r=[]),!!n&&r.some((function(e){return e.id===n})))}function F(e){return(P=P||m(p().mark((function e(t){var r,n,i,s,o,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.hostname,n=t.hubApiUrl,i=t.authentication,s=t.user,r){e.next=3;break}throw new Error("hostname value is required when authorizing by hostname");case 3:return e.next=5,(0,u.lookupDomain)(r,{authentication:i,hubApiUrl:n});case 5:return o=e.sent,a=o.siteId,e.abrupt("return",M(a,i,s));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var G,L,H,B=":",W="portal";function q(e,t,r){return(k=k||m(p().mark((function e(t,r,n){var i,s,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.split(B),s=i[0],o=i[1],s!==W){e.next=3;break}
34return e.abrupt("return",M(o,r,n));case 3:throw new x(s);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e){return(G=G||m(p().mark((function e(t){var r,n,i,s,o,a,c,u,d;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.hostname,n=t.contentId,i=t.agoPortalUrl,s=t.token,o=t.hubApiUrl,a=t.user,c=t.logger||console,u=new l.$l({portal:i,token:s}),e.prev=3,!n){e.next=6;break}return e.abrupt("return",q(n,u,a));case 6:return e.next=8,F({hostname:r,hubApiUrl:o,authentication:u,user:a});case 8:return e.abrupt("return",e.sent);case 11:return e.prev=11,e.t0=e.catch(3),d=e.t0.message,c.error(d),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})))).apply(this,arguments)}function K(e){return Object.entries(e).filter((function(e){return"string"==typeof e[1]})).map((function(e){return{name:e[0],any:[e[1]]}}))}!function(e){e.sessions="session-activity:count",e.custom="other-events:count",e["page-views"]="page-views:count",e["session-activity"]="session-activity:average"}(L||(L={})),function(e){e.hour="hour",e.day="day",e.week="week",e.month="month"}(H||(H={}))},3716:()=>{},251719:()=>{},45703:()=>{},188957:()=>{},988201:()=>{},991127:()=>{},530145:()=>{},441157:()=>{},93019:(e,t,r)=>{"use strict";var n=r(988201);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(251719);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(530145);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(991127);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(45703);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(188957);r.o(c,"lookupDomain")&&r.d(t,{lookupDomain:function(){return c.lookupDomain}});var u=r(441157);r.o(u,"lookupDomain")&&r.d(t,{lookupDomain:function(){return u.lookupDomain}});var l=r(3716);r.o(l,"lookupDomain")&&r.d(t,{lookupDomain:function(){return l.lookupDomain}})},562474:(e,t,r)=>{"use strict";var n=r(251038);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(945256);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(93019);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}})},26530:()=>{},150499:()=>{},426421:()=>{},887806:()=>{},402581:()=>{},813605:()=>{},881519:()=>{},330022:()=>{},562633:()=>{},987262:()=>{},251038:(e,t,r)=>{"use strict";var n=r(150499);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(426421);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(881519);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(562633);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(330022);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(887806);r.o(c,"lookupDomain")&&r.d(t,{lookupDomain:function(){return c.lookupDomain}});var u=r(987262);r.o(u,"lookupDomain")&&r.d(t,{lookupDomain:function(){return u.lookupDomain}});var l=r(402581);r.o(l,"lookupDomain")&&r.d(t,{lookupDomain:function(){return l.lookupDomain}});var d=r(26530);r.o(d,"lookupDomain")&&r.d(t,{lookupDomain:function(){return d.lookupDomain}});var p=r(813605);r.o(p,"lookupDomain")&&r.d(t,{lookupDomain:function(){return p.lookupDomain}})},225184:()=>{},111517:()=>{},728114:()=>{},52049:()=>{},812341:()=>{},351730:()=>{},481446:()=>{},108674:()=>{},373256:()=>{},549899:()=>{},324492:()=>{},160741:()=>{},106681:()=>{},502874:()=>{},211673:()=>{},642341:()=>{},620964:()=>{},886063:()=>{},17735:()=>{},705198:()=>{},324294:()=>{},19046:()=>{},701194:()=>{},527576:()=>{},639310:()=>{},468437:()=>{},262751:()=>{},168334:()=>{},717549:()=>{},141849:()=>{},201311:()=>{},226762:()=>{},887921:()=>{},593211:()=>{},945256:(e,t,r)=>{"use strict";var n=r(225184);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(111517);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(728114);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(52049);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(812341);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(108674);r.o(c,"lookupDomain")&&r.d(t,{lookupDomain:function(){return c.lookupDomain}});var u=r(373256);r.o(u,"lookupDomain")&&r.d(t,{lookupDomain:function(){return u.lookupDomain}});var l=r(549899);r.o(l,"lookupDomain")&&r.d(t,{lookupDomain:function(){return l.lookupDomain}});var d=r(324492);r.o(d,"lookupDomain")&&r.d(t,{lookupDomain:function(){return d.lookupDomain}});var p=r(160741);r.o(p,"lookupDomain")&&r.d(t,{lookupDomain:function(){return p.lookupDomain}});var h=r(481446);r.o(h,"lookupDomain")&&r.d(t,{lookupDomain:function(){return h.lookupDomain}});var m=r(262751);r.o(m,"lookupDomain")&&r.d(t,{lookupDomain:function(){return m.lookupDomain}});var f=r(106681);r.o(f,"lookupDomain")&&r.d(t,{lookupDomain:function(){return f.lookupDomain}});var g=r(502874);r.o(g,"lookupDomain")&&r.d(t,{lookupDomain:function(){return g.lookupDomain}});var y=r(211673);r.o(y,"lookupDomain")&&r.d(t,{lookupDomain:function(){return y.lookupDomain}});var b=r(642341);r.o(b,"lookupDomain")&&r.d(t,{lookupDomain:function(){return b.lookupDomain}});var v=r(620964);r.o(v,"lookupDomain")&&r.d(t,{lookupDomain:function(){return v.lookupDomain}});var w=r(886063);r.o(w,"lookupDomain")&&r.d(t,{lookupDomain:function(){return w.lookupDomain}});var S=r(17735);r.o(S,"lookupDomain")&&r.d(t,{lookupDomain:function(){return S.lookupDomain}});var E=r(705198);r.o(E,"lookupDomain")&&r.d(t,{lookupDomain:function(){return E.lookupDomain}});var T=r(324294);r.o(T,"lookupDomain")&&r.d(t,{lookupDomain:function(){return T.lookupDomain}});var I=r(19046);r.o(I,"lookupDomain")&&r.d(t,{lookupDomain:function(){return I.lookupDomain}});var C=r(701194);r.o(C,"lookupDomain")&&r.d(t,{lookupDomain:function(){return C.lookupDomain}});var A=r(168334);r.o(A,"lookupDomain")&&r.d(t,{lookupDomain:function(){return A.lookupDomain}});var O=r(639310);r.o(O,"lookupDomain")&&r.d(t,{lookupDomain:function(){return O.lookupDomain}});var _=r(468437);r.o(_,"lookupDomain")&&r.d(t,{lookupDomain:function(){return _.lookupDomain}});var D=r(527576);r.o(D,"lookupDomain")&&r.d(t,{lookupDomain:function(){return D.lookupDomain}});var P=r(141849);r.o(P,"lookupDomain")&&r.d(t,{lookupDomain:function(){return P.lookupDomain}});var k=r(201311);r.o(k,"lookupDomain")&&r.d(t,{lookupDomain:function(){return k.lookupDomain}});var x=r(226762);r.o(x,"lookupDomain")&&r.d(t,{lookupDomain:function(){return x.lookupDomain}});var R=r(887921);r.o(R,"lookupDomain")&&r.d(t,{lookupDomain:function(){return R.lookupDomain}});var U=r(593211);r.o(U,"lookupDomain")&&r.d(t,{lookupDomain:function(){return U.lookupDomain}});var M=r(351730);r.o(M,"lookupDomain")&&r.d(t,{lookupDomain:function(){return M.lookupDomain}});var N=r(717549);r.o(N,"lookupDomain")&&r.d(t,{lookupDomain:function(){return N.lookupDomain}})},793980:(e,t,r)=>{"use strict";var n=r(421163);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}})},421163:()=>{},784808:(e,t,r)=>{"use strict";var n=r(793980);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(958122);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}})},609910:()=>{},958122:(e,t,r)=>{"use strict";var n=r(609910);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(999152);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}})},999152:()=>{},921433:(e,t,r)=>{"use strict";r.d(t,{lookupDomain:()=>c.lookupDomain});var n=r(562474);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(784808);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(579297);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(803600);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(181513);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(652885);r(899415)},67953:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(e,t)=>t.split(".").reduce((function(t,r){const i=r.match(/\[(.*?)\]$/);if(i){const e=i[1],n=r.replace(i[0],"");if(parseInt(e,10)>-1){const r=parseInt(e,10);return Array.isArray(t[n])&&t[n][r]?t[n][r]:void 0}return function(e,t){const r=t.split("(");if(!r||2!==r.length)return;let n;const i=r[0],s=r[1].replace(")","").split(",").map((e=>e.trim()));if("findBy"===i){const t=s[0];let r;o=s[1],r=isNaN(parseFloat(o))?s[1].replace(/'/g,""):parseFloat(s[1]),n=e.find((e=>e[t]===r))}else n=void 0;var o;return n}(t[n],e)}return t&&void 0!==t[r]?null!==t[r]&&t[r].$use?n(e,t[r].$use):t[r]:void 0}),e)},803600:(e,t,r)=>{"use strict";var n=r(156307);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}})},413889:()=>{},280446:()=>{},516826:()=>{},41837:()=>{},563313:()=>{},827984:()=>{},156307:(e,t,r)=>{"use strict";var n=r(413889);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(280446);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(516826);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(41837);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(563313);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(827984);r.o(c,"lookupDomain")&&r.d(t,{lookupDomain:function(){return c.lookupDomain}})},181513:(e,t,r)=>{"use strict";var n=r(884020);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}})},283508:()=>{},854472:()=>{},196619:()=>{},933115:()=>{},412455:()=>{},884020:(e,t,r)=>{"use strict";var n=r(854472);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}});var i=r(196619);r.o(i,"lookupDomain")&&r.d(t,{lookupDomain:function(){return i.lookupDomain}});var s=r(412455);r.o(s,"lookupDomain")&&r.d(t,{lookupDomain:function(){return s.lookupDomain}});var o=r(933115);r.o(o,"lookupDomain")&&r.d(t,{lookupDomain:function(){return o.lookupDomain}});var a=r(528497);r.o(a,"lookupDomain")&&r.d(t,{lookupDomain:function(){return a.lookupDomain}});var c=r(283508);r.o(c,"lookupDomain")&&r.d(t,{lookupDomain:function(){return c.lookupDomain}})},528497:()=>{},652885:(e,t,r)=>{"use strict";r.d(t,{lookupDomain:()=>a});var n=r(170209),i=r(29677),s=r(67953);async function o(e){return e.status>
34=200&&e.status<300?e.json():e.json().then((t=>{if(t.error)throw new Error(`${t.error.title} :: ${t.error.detail} :: ${e.status}`);throw new Error(`Got ${e.status} ${e.statusText}`)}))}function a(e,t){if(t.isPortal)return function(e,t){let r=e;e.indexOf("#/")>-1&&(r=e.split("#/")[1]);const s=`hubsubdomain|${r}`,o=Object.assign({q:`typekeywords: ${s}`},t);return(0,n.KT)(o).then((e=>e.results.filter((e=>(0,i.q)(e.typeKeywords,s)))[0])).then((e=>{if(!e)throw new Error("site not found");return{hostname:e.url,siteId:e.id}}))}(e,t);{const n=`${r=t.hubApiUrl,`${r||"https://hub.arcgis.com"}/api/v3/domains`}/${e}`,i=function(e){const t={},r=(0,s.W)(e,"authentication.token");return r&&(t.Authorization=r),t}(t);return fetch(n,{method:"GET",headers:i,mode:"cors"}).then(o)}var r}},579297:(e,t,r)=>{"use strict";var n=r(440066);r.o(n,"lookupDomain")&&r.d(t,{lookupDomain:function(){return n.lookupDomain}})},440066:()=>{},29677:(e,t,r)=>{"use strict";function n(e,t){return-1!==e.indexOf(t)}r.d(t,{q:()=>n})},892454:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Siteimprove:()=>i});var n=r(785913);class i{constructor(e){if(this.name="siteimprove",this.hasError=!1,this.isInitialized=!1,"undefined"!=typeof window&&!(null==e?void 0:e.code))throw new Error("Siteimprove analytics failed to register: a Siteimprove code is required.");this.checkHostStatus=this.checkHostStatus.bind(this),Object.assign(this,e)}_getScripts(){return[{src:`https://siteimproveanalytics.com/js/siteanalyze_${this.code}.js`,dataAttribute:"siteimprove-analytics",async:!0}]}getScriptTags(){return(0,n.createScriptTags)(this._getScripts())}
34async init(){if(!this.isInitialized){if("undefined"==typeof window)throw new n.WindowUndefinedError("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map((e=>(0,n.injectScriptElementAsync)(e)))).catch((e=>console.log("Error in initializing Siteimprove: ",e)));try{const e=await this.pollHostStatus(this.checkHostStatus);return this.isInitialized=!0,e}catch(e){return console.error(e),this.hasError=!0,Promise.resolve()}}}logEvent(e){let{category:t,action:r,label:n}=e;const i=["event",t,r];return n&&i.push(n),window._sz.push(i),!0}logPageView(e,t={}){return!0}enable(){window._sz.push(["notrack",!1])}disable(){window._sz.push(["notrack"])}checkHostStatus(){var e,t,r;return(null===(r=null===(t=null===(e=null===window||void 0===window?void 0:window._sz)||void 0===e?void 0:e.analytics)||void 0===t?void 0:t.endpoint)||void 0===r?void 0:r.host)===`${this.code}.global`}pollHostStatus(e,t=3e3,r=100){const n=Date.now()+t,i=function(t,s){const o=e();o?t(o):Date.now()<n?setTimeout(i,r,t,s):s(new Error("Could not connect to Siteimprove host. Are you sure you used the correct Siteimprove Account ID?"))};return new Promise(i)}}},785913:(e,t,r)=>{"use strict";function n(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.globalPrivacyControl)}r.r(t),r.d(t,{Telemetry:()=>p,WindowUndefinedError:()=>c,createScriptTags:()=>u,getTrackersToInitialize:()=>l,injectScriptElement:()=>a,injectScriptElementAsync:()=>o,isGlobalPrivacyControlEnabled:()=>n,storage:()=>i});const i={storage:{},memory:!0,get(e){let t;try{t=window.localStorage&&window.localStorage.getItem(e)||this.storage[e]}catch(r){t=this.storage[e]}if(t)try{return JSON.parse(t)}catch(e){return}},set(e,t){const r=JSON.stringify(t);try{window.localStorage.setItem(e,r)}catch(r){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[e]=t}},delete(e){try{window.localStorage.removeItem(e)}catch(t){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[e]}}},s="esri-telemetry";function o(e){return new Promise(((t,r)=>{e.onload=t,e.onerror=r,a(e)&&!e.body||t()}))}function a(e){const{body:t,src:r,id:n,dataAttribute:i,section:o="body",type:a="text/javascript",async:u=!1,defer:l=!1,onload:d,onerror:p}=e;if("undefined"==typeof window)throw new c("Window is undefined: Cannot add script element.");if(function(e){const{id:t,dataAttribute:r}=e;return!!document.getElementById(t)||!!document.querySelector(`[data-${s}="${r}"]`)}(e))return void console.log(`script (${n||i}) is already present, skipping`);const h=function({id:e,dataAttribute:t,type:r,async:n,defer:i,body:o,src:a,onload:c,onerror:u}){const l=document.createElement("script");return e&&(l.id=e),t&&l.setAttribute(`data-${s}`,t),a&&(l.src=a),o&&(l.innerText=o),l.type=r,l.async=n,l.defer=i,c&&(l.onload=c),u&&(l.onerror=u),l}({id:n,dataAttribute:i,type:a,async:u,defer:l,body:t,src:r,onload:d,onerror:p});return"body"===o?document.body.appendChild(h):document.head.appendChild(h)}class c extends Error{}function u(e){return e.map((e=>{const t=[];return["src","id","dataAttribute","type"].forEach((r=>{let n=r;"dataAttribute"===r&&(n="data-esri-telemetry"),e[r]&&t.push(`${n}="${e[r]}"`)})),["async","defer"].forEach((r=>{e[r]&&t.push(`${r}`)})),`<script ${t.join(" ")}>${e.body?e.body:""}<\/script>`})).join("")}function l(e,t,r){const i=[];let s=!0;r&&!1===r.eueiEnabled&&(s=!1),n()&&(s=!1);const o=!t.requireConsent,a=e.accepted,c=!e.accepted;if(s){const r={amazon:{required:["performance"]},"adobe-analytics":{required:["targeting"]},googleAnalytics:{required:["targeting"]},siteimprove:{required:["targeting"]}};Object.keys(r).forEach((n=>{const s=r[n];if(t.configuredTrackers.includes(n)){const t=s.required.reduce(((t,r)=>t&&e[r]),!0);a&&t&&i.push(n),o&&c&&i.push(n)}}))}return i}const d=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"];class p{constructor(e){var t,r,i;this.trackers=[],this.options=e,this.debug=e.debug,this.suppressDisabledWarnings=e.suppressDisabledWarnings,this.logger=e.logger||console,e.userPrivacySettings&&(this._userPrivacySettings=e.userPrivacySettings),e.requireConsent&&!e.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),timestamp:Date.now()},e.userPrivacySettings=this._userPrivacySettings),this.disabled=function(e={}){const{disabled:t,portal:r,requireConsent:i,userPrivacySettings:s}=e;if(i){if(!(null==s?void 0:s.accepted))return!0;
34if(!1===(null==s?void 0:s.functional)&&!1===(null==s?void 0:s.performance)&&!1===(null==s?void 0:s.targeting))return!0}return!0===(null==s?void 0:s.accepted)&&!1===(null==s?void 0:s.functional)&&!1===(null==s?void 0:s.performance)&&!1===(null==s?void 0:s.targeting)||!(!t&&!1!==(null==r?void 0:r.eueiEnabled)&&!n())||!(!r||function(e){return e.eueiEnabled&&e.user&&e.user.orgId===e.id}(r)||function(e){return e.user&&!e.user.orgId&&"US"===e.ipCntryCode}(r)||function(e){return!e.user&&"US"===e.ipCntryCode}(r))}(e),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");const s=(null===(t=e.portal)||void 0===t?void 0:t.user)||e.user;s&&this.setUser(s,null===(i=null===(r=e.portal)||void 0===r?void 0:r.subscriptionInfo)||void 0===i?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(e,t,r){const n=!t&&!(null==e?void 0:e.accepted),i=r.every((t=>null==e?void 0:e[t]));return n||i}filterTrackers(e){return this.options.plugins.filter((t=>e.includes(t.name)))}initializeTrackers(){const e=this._userPrivacySettings,t=this.options.requireConsent;this.trackers=[],this.options.plugins&&(e?(this.shouldInitializeTrackers(e,t,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(e,t,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map((e=>e.getScriptTags&&e.getScriptTags())).join("")}
34async init(){const e=this.trackers.map((e=>e.init()));await Promise.all(e)}setUser(e={},t="Public"){let r;if(e="string"==typeof e?{username:e}:e,this.user=e,this.user.accountType=t,e.email&&e.email.split){const t=e.email.split("@")[1];r=d.filter((e=>t===e)).length>0}(r||["In House","Demo and Marketing"].indexOf(t)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(e){const{accepted:t,performance:r,targeting:n,functional:i}=this._userPrivacySettings,s=e.accepted&&!t&&!this.options.requireConsent&&(!e.performance||!e.targeting||!e.functional)||!e.performance&&r||!e.targeting&&n||!e.functional&&i;return this._userPrivacySettings=e,s||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:s}}logPageView(e,t={},r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;const n=this.trackers.filter((({disabled:e,hasError:t})=>!e&&!t));if(!n.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;const i=this.preProcess(t,r);this.debug&&this.logger.info("Tracking page view",JSON.stringify(i));const s=n.map((t=>t.logPageView(e,i)));return Promise.all(s).then(),!0}logEvent(e,t={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;const r=this.trackers.filter((({disabled:e,hasError:t})=>!e&&!t));if(!r.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;const n=this.preProcess(e,t);this.debug&&this.logger.info("Tracking event",JSON.stringify(n));const i=r.map((e=>e.logEvent(n)));return Promise.all(i).then(),!0}logError(e={}){e=Object.assign({eventType:"error"},e),this.logEvent(e)}startWorkflow(e,t={}){const r={name:e,start:Date.now(),steps:[],workflowId:Math.floor(17592186044416*(1+Math.random())).toString(16)};this.saveWorkflow(r);const n=Object.assign({name:e,step:"start"},t);return this.logWorkflow(n),r}stepWorkflow(e,t,r={}){const n="string"==typeof r?r:r.details,i=Object.assign({name:e,step:t,details:n},r);this.logWorkflow(i)}endWorkflow(e,t={}){const r=Object.assign({name:e,step:"finish"},t);this.logWorkflow(r)}cancelWorkflow(e,t={}){const r=Object.assign({name:e,step:"cancel"},t);this.logWorkflow(r)}getWorkflow(e){const t=i.get(`TELEMETRY-WORKFLOW:${e}`);if(t){if(Date.now()-t.start<18e5)return t;this.deleteWorkflow(t)}}saveWorkflow(e){i.set(`TELEMETRY-WORKFLOW:${e.name}`,e)}deleteWorkflow(e){i.delete(`TELEMETRY-WORKFLOW:${e.name}`)}logWorkflow(e={}){e=this.preProcess(e);let t=this.getWorkflow(e.name);t||(this.startWorkflow(e.name),t=this.getWorkflow(e.name)),t.steps.push(e.step),t.duration=(Date.now()-t.start)/1e3,["cancel","finish"].indexOf(e.step)>-1?this.deleteWorkflow(t):this.saveWorkflow(t);const r=Object.assign(e,{eventType:"workflow",category:e.name,action:e.step,label:e.details,duration:t.duration,workflowId:t.workflowId});this.logEvent(r)}preProcess(e={},t={}){let r={};return this.user&&(r={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},e),r)).reduce((n=t.omitComplexData,i=this.logger,function(e,[t,r]){return function(e){return["string","number","boolean","undefined"].includes(typeof e)||e&&"string"==typeof e.valueOf()}(r)?e[t]=r:n||(i.warn(`You are trying to log a non-primitive value, ${t}:${JSON.stringify(r)}. This will get logged as [object Object]`),e[t]=r),e}),{});var n,i}disable(){this.disabled=!0,this.trackers.forEach((e=>{var t;e.hasError||(e.disabled=!0,null===(t=e.disable)||void 0===t||t.call(e))}))}disableTracker(e){var t;const r=this.trackers.find((({name:t})=>t===e));r&&!r.hasError&&(r.disabled=!0,null===(t=r.disable)||void 0===t||t.call(r))}enableTracker(e){var t;const r=this.trackers.find((({name:t})=>t===e));r&&!r.hasError&&(r.disabled=!1,null===(t=r.enable)||void 0===t||t.call(r))}}},468786:(e,t,r)=>{"use strict";r.r(t),r.d(t,{setPropertyDidChange:()=>S,tracked:()=>b});const n="undefined"!=typeof Symbol?Symbol:e=>`__${e}${Math.floor(Math.random()*Date.now())}__`;let i=1;const s=n("TAG_COMPUTE"),o=n("TAG_TYPE");class a{constructor(e){this.revision=1,this.lastChecked=1,this.lastValue=1,this.isUpdating=!1,this.subtag=null,this.subtags=null,this[o]=e}[s](){let{lastChecked:e}=this;if(e!==i){this.isUpdating=!0,this.lastChecked=i;try{let{subtags:e,subtag:t,revision:r}=this;if(null!==t&&(r=Math.max(r,t[s]())),null!==e)for(let t=0;t<e.length;t++){let n=e[t][s]();r=Math.max(n,r)}this.lastValue=r}finally{this.isUpdating=!1}}return!0===this.isUpdating&&(this.lastChecked=++i),this.lastValue}static update(e,t){let r=e;t===d?r.subtag=null:(r.subtag=t,r.lastChecked=Math.min(r.lastChecked,t.lastChecked),r.lastValue=Math.max(r.lastValue,t.lastValue))}static dirty(e){e.revision=++i}}const c=a.dirty,u=a.update;function l(){return new a(1)}const d=new a(3);function p(e){return e===d}new class{[s](){return 9007199254740991}},new class{[s](){return i}};const h=new WeakMap;function m(e){return"object"==typeof e&&null!==e}function f(e,t){if(m(e)){let r=h.get(e);if(void 0===r)r=new Map,h.set(e,r);else if(r.has(t))return r.get(t);let n=l();return r.set(t,n),n}return d}let g=null;const y=new a(0);let b=(...e)=>{let[t,r,n]=e;if(n)return v(0,r,n);Object.defineProperty(t,r,v(0,r))};function v(e,t,r){let{getter:n,setter:i}=function(e,t){let r=new WeakMap,n="function"==typeof t;return{getter:function(i){var s;let o;return s=f(i,e),null!==g&&g.add(s),n&&!r.has(i)?(o=t(),r.set(i,o)):o=r.get(i),o},setter:function(t,n){c(y),function(e,t){if(!m(e))throw new Error("BUG: Can't update a tag for a primitive");{let r=f(e,t);if(void 0===r)!function(e,t,r){if(m(e)){let n=f(e,t);if(p(n))throw new Error("BUG: Can't update a constant tag");return u(n,r),n}throw new Error("BUG: Can't update a tag for a primitive")}(e,t,l());else{if(p(r))throw new Error("BUG: Can't update a constant tag");c(r)}}}(t,e),r.set(t,n)}}}(t,r&&r.initializer);return{enumerable:!0,configurable:!0,get(){return n(this)},set(e){i(this,e),w()}}}let w=function(){};function S(e){w=e}},197928:(e,t,r)=>{"use strict";r.d(t,{O:()=>d,Y:()=>u});var n=function(e,t,r,n){var i=(n[0]-r[0])*(e[1]-r[1])-(n[1]-r[1])*(e[0]-r[0]),s=(t[0]-e[0])*(e[1]-r[1])-(t[1]-e[1])*(e[0]-r[0]),o=(n[1]-r[1])*(t[0]-e[0])-(n[0]-r[0])*(t[1]-e[1]);if(0!==o){var a=i/o,c=s/o;if(a>=0&&a<=1&&c>=0&&c<=1)return!0}return!1},i=function(e,t){for(var r=0;r<e.length-1;r++)for(var i=0;i<t.length-1;i++)if(n(e[r],e[r+1],t[i],t[i+1]))return!0;return!1},s=function(e){return function(e,t){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(e[0],e[e.length-1])||e.push(e[0]),e},o=function(e){for(var t,r=0,n=0,i=e.length,s=e[n];n<i-1;n++)r+=((t=e[n+1])[0]-s[0])*(t[1]+s[1]),s=t;return r>=0},a=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},c=function(e,t){var r=i(e,t),n=function(e,t){for(var r=!1,n=-1,i=e.length,s=i-1;++n<i;s=n)(e[n][1]<=t[1]&&t[1]<e[s][1]||e[s][1]<=t[1]&&t[1]<e[n][1])&&t[0]<(e[s][0]-e[n][0])*(t[1]-e[n][1])/(e[s][1]-e[n][1])+e[n][0]&&(r=!r);return r}(e,t[0]);return!(r||!n)},u=function e(t,r){var n={};if(t.features){n.type="FeatureCollection",n.features=[];for(var u=0;u<t.features.length;u++)n.features.push(e(t.features[u],r))}if("number"==typeof t.x&&"number"==typeof t.y&&(n.type="Point",n.coordinates=[t.x,t.y],"number"==typeof t.z&&n.coordinates.push(t.z)),t.points&&(n.type="MultiPoint",n.coordinates=t.points.slice(0)),t.paths&&(1===t.paths.length?(n.type="LineString",n.coordinates=t.paths[0].slice(0)):(n.type="MultiLineString",n.coordinates=t.paths.slice(0))),t.rings&&(n=function(e){for(var t,r,n,a=[],u=[],l=0;l<e.length;l++){var d=s(e[l].slice(0));
34if(!(d.length<4))if(o(d)){var p=[d.slice().reverse()];a.push(p)}else u.push(d.slice().reverse())}for(var h=[];u.length;){n=u.pop();var m=!1;for(t=a.length-1;t>=0;t--)if(r=a[t][0],c(r,n)){a[t].push(n),m=!0;break}m||h.push(n)}for(;h.length;){n=h.pop();var f=!1;for(t=a.length-1;t>=0;t--)if(r=a[t][0],i(r,n)){a[t].push(n),f=!0;break}f||a.push([n.reverse()])}return 1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}(t.rings.slice(0))),"number"==typeof t.xmin&&"number"==typeof t.ymin&&"number"==typeof t.xmax&&"number"==typeof t.ymax&&(n.type="Polygon",n.coordinates=[[[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax]]]),(t.geometry||t.attributes)&&(n.type="Feature",n.geometry=t.geometry?e(t.geometry):null,n.properties=t.attributes?a(t.attributes):null,t.attributes))try{n.id=function(e,t){for(var r=t?[t,"OBJECTID","FID"]:["OBJECTID","FID"],n=0;n<r.length;n++){var i=r[n];if(i in e&&("string"==typeof e[i]||"number"==typeof e[i]))return e[i]}throw Error("No valid id attribute found")}(t.attributes,r)}catch(e){}return JSON.stringify(n.geometry)===JSON.stringify({})&&(n.geometry=null),t.spatialReference&&t.spatialReference.wkid&&4326!==t.spatialReference.wkid&&console.warn("Object converted in non-standard crs - "+JSON.stringify(t.spatialReference)),n},l=function(e){var t=[],r=e.slice(0),n=s(r.shift().slice(0));if(n.length>=4){o(n)||n.reverse(),t.push(n);for(var i=0;i<r.length;i++){var a=s(r[i].slice(0));a.length>=4&&(o(a)&&a.reverse(),t.push(a))}}return t},d=function e(t,r){r=r||"OBJECTID";var n,i={wkid:4326},s={};switch(t.type){case"Point":s.x=t.coordinates[0],s.y=t.coordinates[1],null!=t.coordinates[2]&&(s.z=t.coordinates[2]),s.spatialReference=i;break;case"MultiPoint":s.points=t.coordinates.slice(0),null!=t.coordinates[0][2]&&(s.hasZ=!0),s.spatialReference=i;break;case"LineString":s.paths=[t.coordinates.slice(0)],null!=t.coordinates[0][2]&&(s.hasZ=!0),s.spatialReference=i;break;case"MultiLineString":s.paths=t.coordinates.slice(0),null!=t.coordinates[0][0][2]&&(s.hasZ=!0),s.spatialReference=i;break;case"Polygon":s.rings=l(t.coordinates.slice(0)),null!=t.coordinates[0][0][2]&&(s.hasZ=!0),s.spatialReference=i;break;case"MultiPolygon":s.rings=function(e){for(var t=[],r=0;r<e.length;r++)for(var n=l(e[r]),i=n.length-1;i>=0;i--){var s=n[i].slice(0);t.push(s)}return t}(t.coordinates.slice(0)),null!=t.coordinates[0][0][0][2]&&(s.hasZ=!0),s.spatialReference=i;break;case"Feature":t.geometry&&(s.geometry=e(t.geometry,r)),s.attributes=t.properties?a(t.properties):{},t.id&&(s.attributes[r]=t.id);break;case"FeatureCollection":for(s=[],n=0;n<t.features.length;n++)s.push(e(t.features[n],r));break;case"GeometryCollection":for(s=[],n=0;n<t.geometries.length;n++)s.push(e(t.geometries[n],r))}return s}},899415:(e,t,r)=>{"use strict";const n=r(922196),i=r(404596);e.exports={atob:n,btoa:i}},922196:e=>{"use strict";function t(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e);return t<0?void 0:t}e.exports=function(e){if((e=(e=`${e}`).replace(/[ \t\n\f\r]/g,"")).length%4==0&&(e=e.replace(/==?$/,"")),e.length%4==1||/[^+/0-9A-Za-z]/.test(e))return null;let r="",n=0,i=0;for(let s=0;s<e.length;s++)n<<=6,n|=t(e[s]),i+=6,24===i&&(r+=String.fromCharCode((16711680&n)>>16),r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n),n=i=0);return 12===i?(n>>=4,r+=String.fromCharCode(n)):18===i&&(n>>=2,r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n)),r}},404596:e=>{"use strict";function t(e){if(e>=0&&e<64)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}e.exports=function(e){let r;for(e=`${e}`,r=0;r<e.length;r++)if(e.charCodeAt(r)>255)return null;let n="";for(r=0;r<e.length;r+=3){const i=[void 0,void 0,void 0,void 0];i[0]=e.charCodeAt(r)>>2,i[1]=(3&e.charCodeAt(r))<<4,e.length>r+1&&(i[1]|=e.charCodeAt(r+1)>>4,i[2]=(15&e.charCodeAt(r+1))<<2),e.length>r+2&&(i[2]|=e.charCodeAt(r+2)>>6,i[3]=63&e.charCodeAt(r+2));for(let e=0;e<i.length;e++)void 0===i[e]?n+="=":n+=t(i[e])}return n}},514215:(e,t,r)=>{"use strict";r.r(t),r.d(t,{adlib:()=>T,arborist:()=>d,deepMapValues:()=>u,getPropertyValue:()=>m,getWithDefault:()=>n,listDependencies:()=>I,mapValues:()=>i,optionalTransform:()=>b,pruneArray:()=>p,pruneObject:()=>h});var n=function(e,t,r){return void 0===r&&(r=void 0),t.split(".").reduce((function(e,t){return e?e[t]:r}),e)};function i(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=t(e[n],n,e),r}),{})}var s=function(e){return e instanceof Date},o=function(e){return"function"==typeof e},a=function(e){return"object"==typeof e},c=function(e){return e instanceof RegExp};function u(e,t,r){return r=r||"",Array.isArray(e)?e.map(n):!e||!a(e)||s(e)||c(e)||o(e)?t(e,r):Object.assign({},e,i(e,n));function n(e,n){return u(e,t,r?r+"."+n:n)}}var l=function(e){return"object"==typeof e};function d(e,t){return Array.isArray(e)?p(e.map(r).filter((function(e){return null!=e}))):e&&l(e)?h(i(e,r)):m(e);function r(e,t){return d(e)}}function p(e){var t=e,r=e.reduce((function(e,t){if(y(t)&&g(t)){var r=f(t);r>e&&(e=r)}return e}),-1);return r>-1&&(t=0===r?[]:"{{delete:"+(r-1)+"}}"),t}function h(e){var t=Object.keys(e).reduce((function(t,r){var n=e[r];if(y(n)&&g(n)){var i=f(n);i>t.maxLevel&&(t.maxLevel=i)}else t.obj[r]=n;return t}),{obj:{},maxLevel:-1});return t.maxLevel>0?1===t.maxLevel?void 0:"{{delete:"+(t.maxLevel-1)+"}}":t.obj}function m(e){var t=e;return"string"==typeof e&&g(e)&&(t=function(e){var t=f(e);return 0===t?void 0:"{{delete:"+t+"}}"}(e)),t}var f=function(e){return parseInt(e.replace(/{|}/g,"").split(":")[1])};function g(e){
35return!(!e||"string"!=typeof e)&&e.indexOf("{{delete")>-1}var y=function(e){return"string"==typeof e};function b(e,t,r,n){void 0===n&&(n=0);var i=t;return t||(i="{{delete:"+n+"}}"),i}var v=function(e){var t={};if(Array.isArray(e))t=e.map(v);else if("object"==typeof e)for(var r in e)null!=e[r]&&"object"==typeof e[r]?t[r]=v(e[r]):t[r]=e[r];else t=e;return t},w=/{{\s*?[\w].*?}}/g,S=function(e){return"string"==typeof e};function E(e){return e||""===e||0===e}function T(e,t,r){if(void 0===r&&(r=null),(r=v(r)||{}).optional)throw new Error("Please do not pass in an `optional` transform; adlib provides that internally.");r.optional=b;var i=u(e,(function(e,i){if(!S(e))return e;var s,o=e.match(w);if(o&&o.length){var a=o.map((function(e){var i=!1,s=e.replace(/{|}/g,"").trim();if(s.indexOf("||")>-1){var o=s.split("||").map((function(e){return e.trim()})),a=o.length;s=o.find((function(e,r){var s,o;return s=t,o=e.split(":")[0],null!=n(s,o,null)?e:r+1===a&&(i=!0,isNaN(e)||(e=parseInt(e)),e)}))}var c={key:e,value:s};if(!i){var u=function(e,t,r){var i,s=e.split(":");if(s.length>1){var o,a=s[0],c=s[1];if(s[2]&&(o=s[2]),!r||!r[c]||"function"!=typeof r[c])throw new Error("Attempted to apply non-existant transform "+c+" on "+a+" with params "+e);i=n(t,a),i=r[c](a,i,t,o)}else i=n(t,e);return i}(s,t,r);c.value=E(u)?u:e}return c}));return a.forEach((function(t){e===t.key?("string"==typeof t.value&&(isNaN(t.value)||""===t.value||(t.value.indexOf(".")>
35-1?t.value=parseFloat(t.value):"0"!==t.value[0]&&(t.value=parseInt(t.value)))),s=t.value):e=e.replace(t.key,t.value)})),E(s)?s:e}return e}));return d(i)}function I(e){"string"!=typeof e&&(e=JSON.stringify(e));try{return Array.from(new Set(e.match(w))).map((function(e){return e.replace(/^{{/g,"").replace(/}}$/g,"").replace(/:.+$/,"")}))}catch(e){console.error(e)}}},32975:(e,t,r)=>{"use strict";e.exports=r(564780)},754645:(e,t,r)=>{"use strict";var n,i,s,o=[r(316776),r(843687),r(182831),r(593753),r(697222)],a=-1,c=[],u=!1;function l(){n&&i&&(n=!1,i.length?c=i.concat(c):a=-1,c.length&&d())}function d(){if(!n){u=!1,n=!0;for(var e=c.length,t=setTimeout(l);e;){for(i=c,c=[];i&&++a<e;)i[a].run();a=-1,e=c.length}i=null,a=-1,n=!1,clearTimeout(t)}}for(var p=-1,h=o.length;++p<h;)if(o[p]&&o[p].test&&o[p].test()){s=o[p].install(d);break}function m(e,t){this.fun=e,this.array=t}m.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},e.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),u||n||(u=!0,s())}},182831:(e,t,r)=>{"use strict";t.test=function(){return!r.g.setImmediate&&void 0!==r.g.MessageChannel},t.install=function(e){var t=new r.g.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}},843687:(e,t,r)=>{"use strict";var n=r.g.MutationObserver||r.g.WebKitMutationObserver;t.test=function(){return n},t.install=function(e){var t=0,i=new n(e),s=r.g.document.createTextNode("");return i.observe(s,{characterData:!0}),function(){s.data=t=++t%2}}},316776:(e,t)=>{"use strict";t.test=function(){return"undefined"!=typeof process&&!process.browser},t.install=function(e){return function(){process.nextTick(e)}}},593753:(e,t,r)=>{"use strict";t.test=function(){return"document"in r.g&&"onreadystatechange"in r.g.document.createElement("script")},t.install=function(e){return function(){var t=r.g.document.createElement("script");return t.onreadystatechange=function(){e(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},r.g.document.documentElement.appendChild(t),e}}},697222:(e,t)=>{"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},300275:(e,t,r)=>{"use strict";var n=r(500817),i={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};n.isMsie()&&n.mixin(i.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),n.isMsie()&&n.isMsie()<=7&&n.mixin(i.input,{marginTop:"-1px"}),e.exports=i},832575:(e,t,r)=>{"use strict";var n="aaDataset",i="aaValue",s="aaDatum",o=r(500817),a=r(641323),c=r(413126),u=r(300275),l=r(29024);function d(e){var t,r,n,i;(e=e||{}).templates=e.templates||{},e.source||o.error("missing source"),e.name&&(t=e.name,!/^[_a-zA-Z0-9-]+$/.test(t))&&o.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name=void 0===e.name||null===e.name?o.getUniqueId():e.name,this.source=e.source,this.displayFn=(i=(i=e.display||e.displayKey)||"value",o.isFunction(i)?i:function(e){return e[i]}),this.debounce=e.debounce,this.cache=!1!==e.cache,this.templates=(r=e.templates,n=this.displayFn,{empty:r.empty&&o.templatify(r.empty),header:r.header&&o.templatify(r.header),footer:r.footer&&o.templatify(r.footer),suggestion:r.suggestion||function(e){return"<p>"+n(e)+"</p>"}}),this.css=o.mixin({},u,e.appendTo?u.appendTo:{}
vendor: 1,559 bytes, line 35
35),this.cssClasses=e.cssClasses=o.mixin({},u.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||o.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var s=o.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=e.$menu&&e.$menu.find(s+"-"+this.name).length>0?a.element(e.$menu.find(s+"-"+this.name)[0]):a.element(c.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu,this.clearCachedSuggestions()}d.extractDatasetName=function(e){return a.element(e).data(n)},d.extractValue=function(e){return a.element(e).data(i)},d.extractDatum=function(e){var t=a.element(e).data(s);return"string"==typeof t&&(t=JSON.parse(t)),t},o.mixin(d.prototype,l,{_render:function(e,t){if(this.$el){var r,u=this,l=[].slice.call(arguments,2);if(this.$el.empty(),r=t&&t.length,this._isEmpty=!r,!r&&this.templates.empty)this.$el.html(function(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),u.templates.empty.apply(this,t)}.apply(this,l)).prepend(u.templates.header?d.apply(this,l):null).append(u.templates.footer?p.apply(this,l):null);else if(r)this.$el.html(function(){var e,r,l=[].slice.call(arguments,0),d=this,p=c.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return e=a.element(p).css(this.css.suggestions),r=o.map(t,(function(e){var t,r=c.suggestion.replace("%PREFIX%",d.cssClasses.prefix).replace("%SUGGESTION%",d.cssClasses.suggestion);
vendor: 49,417 bytes, lines 35-36
35return(t=a.element(r).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(u.templates.suggestion.apply(this,[e].concat(l)))).data(n,u.name),t.data(i,u.displayFn(e)||void 0),t.data(s,JSON.stringify(e)),t.children().each((function(){a.element(this).css(d.css.suggestionChild)})),t})),e.append.apply(e,r),e}.apply(this,l)).prepend(u.templates.header?d.apply(this,l):null).append(u.templates.footer?p.apply(this,l):null);else if(t&&!Array.isArray(t))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(r?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(r?"without":"with")+"-"+this.name),this.trigger("rendered",e)}function d(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!r}].concat(t),u.templates.header.apply(this,t)}function p(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!r}].concat(t),u.templates.footer.apply(this,t)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!this.canceled&&e===this.query){var r=[].slice.call(arguments,1);this.cacheSuggestions(e,t,r),this._render.apply(this,[e,t].concat(r))}}if(this.query=e,this.canceled=!1,this.shouldFetchFromCache(e))t.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var r=this,n=function(){r.canceled||r.source(e,t.bind(r))};this.debounce?(clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((function(){r.debounceTimeout=null,n()}),this.debounce)):n()}},cacheSuggestions:function(e,t,r){this.cachedQuery=e,this.cachedSuggestions=t,this.cachedRenderExtraArgs=r},shouldFetchFromCache:function(e){return this.cache&&this.cachedQuery===e&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.$el&&(this.cancel(),this.$el.empty(),this.trigger("rendered",""))},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),e.exports=d},784221:(e,t,r)=>{"use strict";var n=r(500817),i=r(641323),s=r(29024),o=r(832575),a=r(300275);function c(e){var t,r,s,o=this;(e=e||{}).menu||n.error("menu is required"),n.isArray(e.datasets)||n.isObject(e.datasets)||n.error("1 or more datasets required"),e.datasets||n.error("datasets is required"),this.isOpen=!1,this.isEmpty=!0,this.minLength=e.minLength||0,this.templates={},this.appendTo=e.appendTo||!1,this.css=n.mixin({},a,e.appendTo?a.appendTo:{}),this.cssClasses=e.cssClasses=n.mixin({},a.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||n.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),t=n.bind(this._onSuggestionClick,this),r=n.bind(this._onSuggestionMouseEnter,this),s=n.bind(this._onSuggestionMouseLeave,this);var u=n.className(this.cssClasses.prefix,this.cssClasses.suggestion);this.$menu=i.element(e.menu).on("mouseenter.aa",u,r).on("mouseleave.aa",u,s).on("click.aa",u,t),this.$container=e.appendTo?e.wrapper:this.$menu,e.templates&&e.templates.header&&(this.templates.header=n.templatify(e.templates.header),this.$menu.prepend(this.templates.header())),e.templates&&e.templates.empty&&(this.templates.empty=n.templatify(e.templates.empty),this.$empty=i.element('<div class="'+n.className(this.cssClasses.prefix,this.cssClasses.empty,!0)+'"></div>'),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=n.map(e.datasets,(function(t){return function(e,t,r){return new c.Dataset(n.mixin({$menu:e,cssClasses:r},t))}(o.$menu,t,e.cssClasses)})),n.each(this.datasets,(function(e){var t=e.getRoot();t&&0===t.parent().length&&o.$menu.append(t),e.onSync("rendered",o._onRendered,o)})),e.templates&&e.templates.footer&&(this.templates.footer=n.templatify(e.templates.footer),this.$menu.append(this.templates.footer()));var l=this;i.element(window).resize((function(){l._redraw()}))}n.mixin(c.prototype,s,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",i.element(e.currentTarget))},_onSuggestionMouseEnter:function(e){var t=i.element(e.currentTarget);if(!t.hasClass(n.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var r=this;setTimeout((function(){r._setCursor(t,!1)}),0)}},_onSuggestionMouseLeave:function(e){e.relatedTarget&&i.element(e.relatedTarget).closest("."+n.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0||(this._removeCursor(),this.trigger("cursorRemoved"))},_onRendered:function(e,t){if(this.isEmpty=n.every(this.datasets,(function(e){return e.isEmpty()})),this.isEmpty)if(t.length>=this.minLength&&this.trigger("empty"),this.$empty)if(t.length<this.minLength)this._hide();else{var r=this.templates.empty({query:this.datasets[0]&&this.datasets[0].query});this.$empty.html(r),this.$empty.show(),this._show()}else n.any(this.datasets,(function(e){return e.templates&&e.templates.empty}))?t.length<this.minLength?this._hide():this._show():this._hide();else this.isOpen&&(this.$empty&&(this.$empty.empty(),this.$empty.hide()),t.length>=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(n.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(n.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(e,t){e.first().addClass(n.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",t)},_removeCursor:function(){this._getCursor().removeClass(n.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(e){var t,r,n,i;this.isOpen&&(r=this._getCursor(),t=this._getSuggestions(),this._removeCursor(),-1!=(n=((n=t.index(r)+e)+1)%(t.length+1)-1)?(n<-1&&(n=t.length-1),this._setCursor(i=t.eq(n),!0),this._ensureVisible(i)):this.trigger("cursorRemoved"))},_ensureVisible:function(e){var t,r,n,i;r=(t=e.position().top)+e.height()+parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),n=this.$menu.scrollTop(),i=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),t<0?this.$menu.scrollTop(n+t):i<r&&this.$menu.scrollTop(n+(r-i))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,this.isEmpty||this._show(),this.trigger("opened"))},setLanguageDirection:function(e){this.$menu.css("ltr"===e?this.css.ltr:this.css.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(e){var t=null;return e.length&&(t={raw:o.extractDatum(e),value:o.extractValue(e),datasetName:o.extractDatasetName(e)}),t},getCurrentCursor:function(){return this._getCursor().first()},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},cursorTopSuggestion:function(){this._setCursor(this._getSuggestions().first(),!1)},update:function(e){n.each(this.datasets,(function(t){t.update(e)}))},empty:function(){n.each(this.datasets,(function(e){e.clear()})),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){this.$menu.off(".aa"),this.$menu=null,n.each(this.datasets,(function(e){e.destroy()}))}}),c.Dataset=o,e.exports=c},396191:(e,t,r)=>{"use strict";var n=r(500817),i=r(641323);function s(e){e&&e.el||n.error("EventBus initialized without el"),this.$el=i.element(e.el)}n.mixin(s.prototype,{trigger:function(e,t,r,i){var s=n.Event("autocomplete:"+e);return this.$el.trigger(s,[t,r,i]),s}}),e.exports=s},29024:(e,t,r)=>{"use strict";var n=r(754645),i=/\s+/;function s(e,t,r,n){var s;if(!r)return this;for(t=t.split(i),r=n?function(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}(r,n):r,this._callbacks=this._callbacks||{};s=t.shift();)this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][e].push(r);return this}function o(e,t,r){return function(){for(var n,i=0,s=e.length;!n&&i<s;i+=1)n=!1===e[i].apply(t,r);return!n}}e.exports={onSync:function(e,t,r){return s.call(this,"sync",e,t,r)},onAsync:function(e,t,r){return s.call(this,"async",e,t,r)},off:function(e){var t;if(!this._callbacks)return this;for(e=e.split(i);t=e.shift();)delete this._callbacks[t];return this},trigger:function(e){var t,r,s,a,c;if(!this._callbacks)return this;for(e=e.split(i),s=[].slice.call(arguments,1);(t=e.shift())&&(r=this._callbacks[t]);)a=o(r.sync,this,[t].concat(s)),c=o(r.async,this,[t].concat(s)),a()&&n(c);return this}}},413126:e=>{"use strict";e.exports={wrapper:'<span class="%ROOT%"></span>',dropdown:'<span class="%PREFIX%%DROPDOWN_MENU%"></span>',dataset:'<div class="%PREFIX%%DATASET%-%CLASS%"></div>',suggestions:'<span class="%PREFIX%%SUGGESTIONS%"></span>',suggestion:'<div class="%PREFIX%%SUGGESTION%"></div>'}},811865:(e,t,r)=>{"use strict";var n;n={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var i=r(500817),s=r(641323),o=r(29024);function a(e){var t,r,o,a,c,u=this;(e=e||{}).input||i.error("input is missing"),t=i.bind(this._onBlur,this),r=i.bind(this._onFocus,this),o=i.bind(this._onKeydown,this),a=i.bind(this._onInput,this),this.$hint=s.element(e.hint),this.$input=s.element(e.input).on("blur.aa",t).on("focus.aa",r).on("keydown.aa",o),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=i.noop),i.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",(function(e){n[e.which||e.keyCode]||i.defer(i.bind(u._onInput,u,e))})):this.$input.on("input.aa",a),this.query=this.$input.val(),this.$overflowHelper=(c=this.$input,s.element('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:c.css("font-family"),fontSize:c.css("font-size"),fontStyle:c.css("font-style"),fontVariant:c.css("font-variant"),fontWeight:c.css("font-weight"),wordSpacing:c.css("word-spacing"),letterSpacing:c.css("letter-spacing"),textIndent:c.css("text-indent"),textRendering:c.css("text-rendering"),textTransform:c.css("text-transform")}).insertAfter(c))}function c(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}a.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},i.mixin(a.prototype,o,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(e){var t=n[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(e,t){var r,n,i;switch(e){case"tab":n=this.getHint(),i=this.getInputValue(),r=n&&n!==i&&!c(t);break;case"up":case"down":r=!c(t);break;default:r=!1}r&&t.preventDefault()},_shouldTrigger:function(e,t){return"tab"!==e||!c(t)},_checkInputValue:function(){var e,t,r,n,i;r=!(n=e=this.getInputValue(),i=this.query,!(t=a.normalizeQuery(n)===a.normalizeQuery(i))||!this.query||this.query.length===e.length),this.query=e,t?r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){void 0===e&&(e=this.query),this.$input.val(e),t?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(e){this.$input.attr("aria-activedescendant",e)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,r;r=(e=this.getInputValue())!==(t=this.getHint())&&0===t.indexOf(e),""!==e&&r&&!this.hasOverflow()||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,t,r;return e=this.$input.val().length,t=this.$input[0].selectionStart,i.isNumber(t)?t===e:!document.selection||((r=document.selection.createRange()).moveStart("character",-e),e===r.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),e.exports=a},88308:(e,t,r)=>{"use strict";var n="aaAttrs",i=r(500817),s=r(641323),o=r(396191),a=r(811865),c=r(784221),u=r(413126),l=r(300275);function d(e){var t,r;if((e=e||{}).input||i.error("missing input"),this.isActivated=!1,this.debug=!!e.debug,this.autoselect=!!e.autoselect,this.autoselectOnBlur=!!e.autoselectOnBlur,this.openOnFocus=!!e.openOnFocus,this.minLength=i.isNumber(e.minLength)?e.minLength:1,this.autoWidth=void 0===e.autoWidth||!!e.autoWidth,this.clearOnSelected=!!e.clearOnSelected,this.tabAutocomplete=void 0===e.tabAutocomplete||!!e.tabAutocomplete,e.hint=!!e.hint,e.hint&&e.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=e.css=i.mixin({},l,e.appendTo?l.appendTo:{}),this.cssClasses=e.cssClasses=i.mixin({},l.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix=i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=e.listboxId=[this.cssClasses.root,"listbox",i.getUniqueId()].join("-");var a=function(e){var t,r,o,a;t=s.element(e.input),r=s.element(u.wrapper.replace("%ROOT%",e.cssClasses.root)).css(e.css.wrapper),e.appendTo||"block"!==t.css("display")||"table"!==t.parent().css("display")||r.css("display","table-cell");var c,l=u.dropdown.replace("%PREFIX%",e.cssClasses.prefix).replace("%DROPDOWN_MENU%",e.cssClasses.dropdownMenu);o=s.element(l).css(e.css.dropdown).attr({role:"listbox",id:e.listboxId}),e.templates&&e.templates.dropdownMenu&&o.html(i.templatify(e.templates.dropdownMenu)()),(a=t.clone().css(e.css.hint).css({backgroundAttachment:(c=t).css("background-attachment"),backgroundClip:c.css("background-clip"),backgroundColor:c.css("background-color"),backgroundImage:c.css("background-image"),backgroundOrigin:c.css("background-origin"),backgroundPosition:c.css("background-position"),backgroundRepeat:c.css("background-repeat"),backgroundSize:c.css("background-size")})).val("").addClass(i.className(e.cssClasses.prefix,e.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),a.removeData&&a.removeData(),t.data(n,{"aria-autocomplete":t.attr("aria-autocomplete"),"aria-expanded":t.attr("aria-expanded"),"aria-owns":t.attr("aria-owns"),autocomplete:t.attr("autocomplete"),dir:t.attr("dir"),role:t.attr("role"),spellcheck:t.attr("spellcheck"),style:t.attr("style"),type:t.attr("type")}),t.addClass(i.className(e.cssClasses.prefix,e.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":e.datasets&&e.datasets[0]&&e.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":e.ariaLabel,"aria-owns":e.listboxId}).css(e.hint?e.css.input:e.css.inputWithNoHint);try{t.attr("dir")||t.attr("dir","auto")}catch(e){}return(r=e.appendTo?r.appendTo(s.element(e.appendTo).eq(0)).eq(0):t.wrap(r).parent()).prepend(e.hint?a:null).append(o),{wrapper:r,input:t,hint:a,menu:o}}(e);this.$node=a.wrapper;var c=this.$input=a.input;t=a.menu,r=a.hint,e.dropdownMenuContainer&&s.element(e.dropdownMenuContainer).css("position","relative").append(t.css("top","0")),c.on("blur.aa",(function(e){var r=document.activeElement;i.isMsie()&&(t[0]===r||t[0].contains(r))&&(e.preventDefault(),e.stopImmediatePropagation(),i.defer((function(){c.focus()})))})),t.on("mousedown.aa",(function(e){e.preventDefault()})),this.eventBus=e.eventBus||new o({el:c}),this.dropdown=new d.Dropdown({appendTo:e.appendTo,wrapper:this.$node,menu:t,datasets:e.datasets,templates:e.templates,cssClasses:e.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new d.Input({input:c,hint:r}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(e),this._setLanguageDirection()}i.mixin(d.prototype,{_bindKeyboardShortcuts:function(e){if(e.keyboardShortcuts){var t=this.$input,r=[];i.each(e.keyboardShortcuts,(function(e){"string"==typeof e&&(e=e.toUpperCase().charCodeAt(0)),r.push(e)})),s.element(document).keydown((function(e){var n=e.target||e.srcElement,i=n.tagName;if(!n.isContentEditable&&"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i){var s=e.which||e.keyCode;-1!==r.indexOf(s)&&(t.focus(),e.stopPropagation(),e.preventDefault())}}))}},_onSuggestionClicked:function(e,t){var r;(r=this.dropdown.getDatumForSuggestion(t))&&this._select(r,{selectionMethod:"click"})},_onCursorMoved:function(e,t){var r=this.dropdown.getDatumForCursor(),n=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(n),r&&(t&&this.input.setInputValue(r.value,!0),this.eventBus.trigger("cursorchanged",r.raw,r.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var e=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",e.width+"px");var t=this.$node[0].getBoundingClientRect(),r=e.bottom-t.top;this.$node.css("top",r+"px");var n=e.left-t.left;this.$node.css("left",n+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var e=this.input.getQuery();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var e,t;e=this.dropdown.getDatumForCursor(),t=this.dropdown.getDatumForTopSuggestion();var r={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&e?this._select(e,r):this.autoselectOnBlur&&t?this._select(t,r):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(e,t){var r,n;r=this.dropdown.getDatumForCursor(),n=this.dropdown.getDatumForTopSuggestion();var i={selectionMethod:"enterKey"};r?(this._select(r,i),t.preventDefault()):this.autoselect&&n&&(this._select(n,i),t.preventDefault())},_onTabKeyed:function(e,t){var r;this.tabAutocomplete?(r=this.dropdown.getDatumForCursor())?(this._select(r,{selectionMethod:"tabKey"}),t.preventDefault()):this._autocomplete(!0):this.dropdown.close()},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(e,t){this.input.clearHintIfInvalid(),t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var e=this.input.getLanguageDirection();this.dir!==e&&(this.dir=e,this.$node.css("direction",e),this.dropdown.setLanguageDirection(e))},_updateHint:function(){var e,t,r,n,s;(e=this.dropdown.getDatumForTopSuggestion())&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(t=this.input.getInputValue(),r=a.normalizeQuery(t),n=i.escapeRegExChars(r),(s=new RegExp("^(?:"+n+")(.+$)","i").exec(e.value))?this.input.setHint(t+s[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(e){var t,r,n,i;t=this.input.getHint(),r=this.input.getQuery(),n=e||this.input.isCursorAtEnd(),t&&r!==t&&n&&((i=this.dropdown.getDatumForTopSuggestion())&&this.input.setInputValue(i.value),this.eventBus.trigger("autocompleted",i.raw,i.datasetName))},_select:function(e,t){void 0!==e.value&&this.input.setQuery(e.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(e.value,!0),this._setLanguageDirection(),!1===this.eventBus.trigger("selected",e.raw,e.datasetName,t).isDefaultPrevented()&&(this.dropdown.close(),i.defer(i.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var e=this.input.getInputValue();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(e){e=i.toStr(e),this.isActivated?this.input.setInputValue(e):(this.input.setQuery(e),this.input.setInputValue(e,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){var e,t,r;this.input.destroy(),this.dropdown.destroy(),e=this.$node,t=this.cssClasses,r=e.find(i.className(t.prefix,t.input)),i.each(r.data(n),(function(e,t){void 0===e?r.removeAttr(t):r.attr(t,e)})),r.detach().removeClass(i.className(t.prefix,t.input,!0)).insertAfter(e),r.removeData&&r.removeData(n),e.remove(),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),d.Dropdown=c,d.Input=a,d.sources=r(209315),e.exports=d},641323:e=>{"use strict";e.exports={element:null}},445236:e=>{"use strict";e.exports=function(e){var t=e.match(/Algolia for JavaScript \((\d+\.)(\d+\.)(\d+)\)/)||e.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(t)return[t[1],t[2],t[3]]}},500817:(e,t,r)=>{"use strict";var n,i=r(641323);function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}e.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(e){if(void 0===e&&(e=navigator.userAgent),/(msie|trident)/i.test(e)){var t=e.match(/(msie |rv:)(\d+(.\d+)?)/i);if(t)return t[2]}return!1},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(e){return"number"==typeof e},toStr:function(e){return null==e?"":e+""},cloneDeep:function(e){var t=this.mixin({},e),r=this;return this.each(t,(function(e,n){e&&(r.isArray(e)?t[n]=[].concat(e):r.isObject(e)&&(t[n]=r.cloneDeep(e)))})),t},error:function(e){throw new Error(e)},every:function(e,t){var r=!0;return e?(this.each(e,(function(n,i){r&&(r=t.call(null,n,i,e)&&r)})),!!r):r},any:function(e,t){var r=!1;return e?(this.each(e,(function(n,i){if(t.call(null,n,i,e))return r=!0,!1})),r):r},getUniqueId:(n=0,function(){return n++}),templatify:function(e){if(this.isFunction(e))return e;var t=i.element(e);return"SCRIPT"===t.prop("tagName")?function(){return t.text()}:function(){return String(e)}},defer:function(e){setTimeout(e,0)},noop:function(){},formatPrefix:function(e,t){return t?"":e+"-"},className:function(e,t,r){return(r?"":".")+e+t},escapeHighlightedString:function(e,t,r){t=t||"<em>";var n=document.createElement("div");n.appendChild(document.createTextNode(t)),r=r||"</em>";var i=document.createElement("div");i.appendChild(document.createTextNode(r));var o=document.createElement("div");return o.appendChild(document.createTextNode(e)),o.innerHTML.replace(RegExp(s(n.innerHTML),"g"),t).replace(RegExp(s(i.innerHTML),"g"),r)}}},233369:(e,t,r)=>{"use strict";var n,i,s=r(500817),o=r(874293),a=r(445236),c=(n=[],i=window.Promise.resolve(),function(e,t){return function(r,o){var a,c;(a=e.as,c=n.push({indexName:e.indexName,query:r,params:t})-1,window.Promise.resolve().then((function(){return n.length&&(i=a.search(n),n=[]),i})).then((function(e){if(e)return e.results[c]}))).then((function(e){e&&o(e.hits,e)})).catch((function(e){s.error(e.message)}))}});e.exports=function(e,t){var r=a(e.as._ua);if(r&&r[0]>=3&&r[1]>20){var n="autocomplete.js "+o;-1===e.as._ua.indexOf(n)&&(e.as._ua+="; "+n)}return c(e,t)}},209315:(e,t,r)=>{"use strict";e.exports={hits:r(233369),popularIn:r(397694)}},397694:(e,t,r)=>{"use strict";var n=r(500817),i=r(874293),s=r(445236);e.exports=function(e,t,r,o){var a=s(e.as._ua);if(a&&a[0]>=3&&a[1]>20&&((t=t||{}).additionalUA="autocomplete.js "+i),!r.source)return n.error("Missing 'source' key");var c=n.isFunction(r.source)?r.source:function(e){return e[r.source]};if(!r.index)return n.error("Missing 'index' key");var u=r.index;return o=o||{},function(a,l){e.search(a,t,(function(e,a){if(e)n.error(e.message);else{if(a.hits.length>0){var d=a.hits[0],p=n.mixin({hitsPerPage:0},r);delete p.source,delete p.index;var h=s(u.as._ua);return h&&h[0]>=3&&h[1]>20&&(t.additionalUA="autocomplete.js "+i),void u.search(c(d),p,(function(e,t){if(e)n.error(e.message);else{var r=[];if(o.includeAll){var i=o.allTitle||"All departments";r.push(n.mixin({facet:{value:i,count:t.nbHits}},n.cloneDeep(d)))}n.each(t.facets,(function(e,t){n.each(e,(function(e,i){r.push(n.mixin({facet:{facet:t,value:i,count:e}},n.cloneDeep(d)))}))}));for(var s=1;s<a.hits.length;++s)r.push(a.hits[s]);l(r,a)}}))}l([])}}))}}},564780:(e,t,r)=>{"use strict";var n=r(198778);r(641323).element=n;var i=r(500817);i.isArray=n.isArray,i.isFunction=n.isFunction,i.isObject=n.isPlainObject,i.bind=n.proxy,i.each=function(e,t){n.each(e,(function(e,r){return t(r,e)}))},i.map=n.map,i.mixin=n.extend,i.Event=n.Event;var s="aaAutocomplete",o=r(88308),a=r(396191);function c(e,t,r,c){r=i.isArray(r)?r:[].slice.call(arguments,2);var u=n(e).each((function(e,i){var u=n(i),l=new a({el:u}),d=c||new o({input:u,eventBus:l,dropdownMenuContainer:t.dropdownMenuContainer,hint:void 0===t.hint||!!t.hint,minLength:t.minLength,autoselect:t.autoselect,autoselectOnBlur:t.autoselectOnBlur,tabAutocomplete:t.tabAutocomplete,openOnFocus:t.openOnFocus,templates:t.templates,debug:t.debug,clearOnSelected:t.clearOnSelected,cssClasses:t.cssClasses,datasets:r,keyboardShortcuts:t.keyboardShortcuts,appendTo:t.appendTo,autoWidth:t.autoWidth,ariaLabel:t.ariaLabel||i.getAttribute("aria-label")});u.data(s,d)}));return u.autocomplete={},i.each(["open","close","getVal","setVal","destroy","getWrapper"],(function(e){u.autocomplete[e]=function(){var t,r=arguments;return u.each((function(i,o){var a=n(o).data(s);t=a[e].apply(a,r)})),t}})),u}c.sources=o.sources,c.escapeHighlightedString=i.escapeHighlightedString;var u="autocomplete"in window,l=window.autocomplete;c.noConflict=function(){return u?window.autocomplete=l:delete window.autocomplete,c},e.exports=c},874293:e=>{e.exports="0.38.0"},198778:e=>{var t;t=window,e.exports=function(e){var t,r,n=function(){var t,r,n,i,s,o,a=[],c=a.concat,u=a.filter,l=a.slice,d=e.document,p={},h={},m={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},f=/^\s*<(\w+|!)[^>]*>/,g=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,b=/^(?:body|html)$/i,v=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],S=d.createElement("table"),E=d.createElement("tr"),T={tr:d.createElement("tbody"),tbody:S,thead:S,tfoot:S,td:E,th:E,"*":d.createElement("div")},I=/complete|loaded|interactive/,C=/^[\w-]*$/,A={},O=A.toString,_={},D=d.createElement("div"),P={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},k=Array.isArray||function(e){return e instanceof Array};function x(e){return null==e?String(e):A[O.call(e)]||"object"}function R(e){return"function"==x(e)}function U(e){return null!=e&&e==e.window}function M(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function N(e){return"object"==x(e)}function j(e){return N(e)&&!U(e)&&Object.getPrototypeOf(e)==Object.prototype}function $(e){var t=!!e&&"length"in e&&e.length,r=n.type(e);return"function"!=r&&!U(e)&&("array"==r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function F(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function G(e){return e in h?h[e]:h[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function L(e,t){return"number"!=typeof t||m[F(e)]?t:t+"px"}function H(e){return"children"in e?l.call(e.children):n.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function B(e,t){var r,n=e?e.length:0;for(r=0;r<n;r++)this[r]=e[r];this.length=n,this.selector=t||""}function W(e,n,i){for(r in n)i&&(j(n[r])||k(n[r]))?(j(n[r])&&!j(e[r])&&(e[r]={}),k(n[r])&&!k(e[r])&&(e[r]=[]),W(e[r],n[r],i)):n[r]!==t&&(e[r]=n[r])}function q(e,t){return null==t?n(e):n(e).filter(t)}function V(e,t,r,n){return R(t)?t.call(e,r,n):t}function K(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}function z(e,r){var n=e.className||"",i=n&&n.baseVal!==t;if(r===t)return i?n.baseVal:n;i?n.baseVal=r:e.className=r}function Y(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?n.parseJSON(e):e):e}catch(t){return e}}function J(e,t){t(e);for(var r=0,n=e.childNodes.length;r<n;r++)J(e.childNodes[r],t)}return _.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(r)return r.call(e,t);var n,i=e.parentNode,s=!i;return s&&(i=D).appendChild(e),n=~_.qsa(i,t).indexOf(e),s&&D.removeChild(e),n},s=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},o=function(e){return u.call(e,(function(t,r){return e.indexOf(t)==r}))},_.fragment=function(e,r,i){var s,o,a;return g.test(e)&&(s=n(d.createElement(RegExp.$1))),s||(e.replace&&(e=e.replace(y,"<$1></$2>")),r===t&&(r=f.test(e)&&RegExp.$1),r in T||(r="*"),(a=T[r]).innerHTML=""+e,s=n.each(l.call(a.childNodes),(function(){a.removeChild(this)}))),j(i)&&(o=n(s),n.each(i,(function(e,t){w.indexOf(e)>-1?o[e](t):o.attr(e,t)}))),s},_.Z=function(e,t){return new B(e,t)},_.isZ=function(e){return e instanceof _.Z},_.init=function(e,r){var i,s;if(!e)return _.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&f.test(e))i=_.fragment(e,RegExp.$1,r),e=null;else{if(r!==t)return n(r).find(e);i=_.qsa(d,e)}else{if(R(e))return n(d).ready(e);if(_.isZ(e))return e;if(k(e))s=e,i=u.call(s,(function(e){return null!=e}));else if(N(e))i=[e],e=null;else if(f.test(e))i=_.fragment(e.trim(),RegExp.$1,r),e=null;else{if(r!==t)return n(r).find(e);i=_.qsa(d,e)}}return _.Z(i,e)},(n=function(e,t){return _.init(e,t)}).extend=function(e){var t,r=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){W(e,r,t)})),e},_.qsa=function(e,t){var r,n="#"==t[0],i=!n&&"."==t[0],s=n||i?t.slice(1):t,o=C.test(s);return e.getElementById&&o&&n?(r=e.getElementById(s))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(o&&!n&&e.getElementsByClassName?i?e.getElementsByClassName(s):e.getElementsByTagName(t):e.querySelectorAll(t))},n.contains=d.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},n.type=x,n.isFunction=R,n.isWindow=U,n.isArray=k,n.isPlainObject=j,n.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},n.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},n.inArray=function(e,t,r){return a.indexOf.call(t,e,r)},n.camelCase=s,n.trim=function(e){return null==e?"":String.prototype.trim.call(e)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(e,t){var r,i,s,o,a=[];if($(e))for(i=0;i<e.length;i++)null!=(r=t(e[i],i))&&a.push(r);else for(s in e)null!=(r=t(e[s],s))&&a.push(r);return(o=a).length>0?n.fn.concat.apply([],o):o},n.each=function(e,t){var r,n;if($(e)){for(r=0;r<e.length;r++)if(!1===t.call(e[r],r,e[r]))return e}else for(n in e)if(!1===t.call(e[n],n,e[n]))return e;return e},n.grep=function(e,t){return u.call(e,t)},e.JSON&&(n.parseJSON=JSON.parse),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){A["[object "+t+"]"]=t.toLowerCase()})),n.fn={constructor:_.Z,length:0,forEach:a.forEach,reduce:a.reduce,push:a.push,sort:a.sort,splice:a.splice,indexOf:a.indexOf,concat:function(){var e,t,r=[];for(e=0;e<arguments.length;e++)t=arguments[e],r[e]=_.isZ(t)?t.toArray():t;return c.apply(_.isZ(this)?this.toArray():this,r)},map:function(e){return n(n.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return n(l.apply(this,arguments))},ready:function(e){return I.test(d.readyState)&&d.body?e(n):d.addEventListener("DOMContentLoaded",(function(){e(n)}),!1),this},get:function(e){return e===t?l.call(this):this[e>=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return a.every.call(this,(function(t,r){return!1!==e.call(t,r,t)})),this},filter:function(e){return R(e)?this.not(this.not(e)):n(u.call(this,(function(t){return _.matches(t,e)})))},add:function(e,t){return n(o(this.concat(n(e,t))))},is:function(e){return this.length>0&&_.matches(this[0],e)},not:function(e){var r=[];if(R(e)&&e.call!==t)this.each((function(t){e.call(this,t)||r.push(this)}));else{var i="string"==typeof e?this.filter(e):$(e)&&R(e.item)?l.call(e):n(e);this.forEach((function(e){i.indexOf(e)<0&&r.push(e)}))}return n(r)},has:function(e){return this.filter((function(){return N(e)?n.contains(this,e):n(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!N(e)?e:n(e)},last:function(){var e=this[this.length-1];return e&&!N(e)?e:n(e)},find:function(e){var t=this;return e?"object"==typeof e?n(e).filter((function(){var e=this;return a.some.call(t,(function(t){return n.contains(t,e)}))})):1==this.length?n(_.qsa(this[0],e)):this.map((function(){return _.qsa(this,e)})):n()},closest:function(e,t){var r=[],i="object"==typeof e&&n(e);return this.each((function(n,s){for(;s&&!(i?i.indexOf(s)>=0:_.matches(s,e));)s=s!==t&&!M(s)&&s.parentNode;s&&r.indexOf(s)<0&&r.push(s)})),n(r)},parents:function(e){for(var t=[],r=this;r.length>0;)r=n.map(r,(function(e){if((e=e.parentNode)&&!M(e)&&t.indexOf(e)<0)return t.push(e),e}));return q(t,e)},parent:function(e){return q(o(this.pluck("parentNode")),e)},children:function(e){return q(this.map((function(){return H(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return q(this.map((function(e,t){return u.call(H(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return n.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,p[e]||(t=d.createElement(e),d.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),p[e]=r),p[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=R(e);if(this[0]&&!t)var r=n(e).get(0),i=r.parentNode||this.length>1;return this.each((function(s){n(this).wrapAll(t?e.call(this,s):i?r.cloneNode(!0):r)}))},wrapAll:function(e){if(this[0]){var t;for(n(this[0]).before(e=n(e));(t=e.children()).length;)e=t.first();n(e).append(this)}return this},wrapInner:function(e){var t=R(e);return this.each((function(r){var i=n(this),s=i.contents(),o=t?e.call(this,r):e;s.length?s.wrapAll(o):i.append(o)}))},unwrap:function(){return this.parent().each((function(){n(this).replaceWith(n(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var r=n(this);(e===t?"none"==r.css("display"):e)?r.show():r.hide()}))},prev:function(e){return n(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return n(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(t){var r=this.innerHTML;n(this).empty().append(V(this,e,t,r))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=V(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(e,n){var i;return"string"!=typeof e||1 in arguments?this.each((function(t){if(1===this.nodeType)if(N(e))for(r in e)K(this,r,e[r]);else K(this,e,V(this,n,t,this.getAttribute(e)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(e))?i:t},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){K(this,e)}),this)}))},prop:function(e,t){return e=P[e]||e,1 in arguments?this.each((function(r){this[e]=V(this,t,r,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=P[e]||e,this.each((function(){delete this[e]}))},data:function(e,r){var n="data-"+e.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(n,r):this.attr(n);return null!==i?Y(i):t},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=V(this,e,t,this.value)}))):this[0]&&(this[0].multiple?n(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each((function(e){var r=n(this),i=V(this,t,e,r.offset()),s=r.offsetParent().offset(),o={top:i.top-s.top,left:i.left-s.left};"static"==r.css("position")&&(o.position="relative"),r.css(o)}));if(!this.length)return null;if(d.documentElement!==this[0]&&!n.contains(d.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+e.pageXOffset,top:r.top+e.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(e,t){if(arguments.length<2){var i=this[0];if("string"==typeof e){if(!i)return;return i.style[s(e)]||getComputedStyle(i,"").getPropertyValue(e)}if(k(e)){if(!i)return;var o={},a=getComputedStyle(i,"");return n.each(e,(function(e,t){o[t]=i.style[s(t)]||a.getPropertyValue(t)})),o}}var c="";if("string"==x(e))t||0===t?c=F(e)+":"+L(e,t):this.each((function(){this.style.removeProperty(F(e))}));else for(r in e)e[r]||0===e[r]?c+=F(r)+":"+L(r,e[r])+";":this.each((function(){this.style.removeProperty(F(r))}));return this.each((function(){this.style.cssText+=";"+c}))},index:function(e){return e?this.indexOf(n(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&a.some.call(this,(function(e){return this.test(z(e))}),G(e))},addClass:function(e){return e?this.each((function(t){if("className"in this){i=[];var r=z(this);V(this,e,t,r).split(/\s+/g).forEach((function(e){n(this).hasClass(e)||i.push(e)}),this),i.length&&z(this,r+(r?" ":"")+i.join(" "))}})):this},removeClass:function(e){return this.each((function(r){if("className"in this){if(e===t)return z(this,"");i=z(this),V(this,e,r,i).split(/\s+/g).forEach((function(e){i=i.replace(G(e)," ")})),z(this,i.trim())}}))},toggleClass:function(e,r){return e?this.each((function(i){var s=n(this);V(this,e,i,z(this)).split(/\s+/g).forEach((function(e){(r===t?!s.hasClass(e):r)?s.addClass(e):s.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var r="scrollTop"in this[0];return e===t?r?this[0].scrollTop:this[0].pageYOffset:this.each(r?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var r="scrollLeft"in this[0];return e===t?r?this[0].scrollLeft:this[0].pageXOffset:this.each(r?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),r=this.offset(),i=b.test(t[0].nodeName)?{top:0,left:0}:t.offset();return r.top-=parseFloat(n(e).css("margin-top"))||0,r.left-=parseFloat(n(e).css("margin-left"))||0,i.top+=parseFloat(n(t[0]).css("border-top-width"))||0,i.left+=parseFloat(n(t[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.left-i.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||d.body;e&&!b.test(e.nodeName)&&"static"==n(e).css("position");)e=e.offsetParent;return e}))}},n.fn.detach=n.fn.remove,["width","height"].forEach((function(e){var r=e.replace(/./,(function(e){return e[0].toUpperCase()}));n.fn[e]=function(i){var s,o=this[0];return i===t?U(o)?o["inner"+r]:M(o)?o.documentElement["scroll"+r]:(s=this.offset())&&s[e]:this.each((function(t){(o=n(this)).css(e,V(this,i,t,o[e]()))}))}})),
36["after","prepend","before","append"].forEach((function(r,i){var s=i%2;n.fn[r]=function(){var r,o,a=n.map(arguments,(function(e){var i=[];return"array"==(r=x(e))?(e.forEach((function(e){return e.nodeType!==t?i.push(e):n.zepto.isZ(e)?i=i.concat(e.get()):void(i=i.concat(_.fragment(e)))})),i):"object"==r||null==e?e:_.fragment(e)})),c=this.length>1;return a.length<1?this:this.each((function(t,r){o=s?r:r.parentNode,r=0==i?r.nextSibling:1==i?r.firstChild:2==i?r:null;var u=n.contains(d.documentElement,o);a.forEach((function(t){if(c)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,r),u&&J(t,(function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var r=t.ownerDocument?t.ownerDocument.defaultView:e;r.eval.call(r,t.innerHTML)}}))}))}))},n.fn[s?r+"To":"insert"+(i?"Before":"After")]=function(e){return n(e)[r](this),this}})),_.Z.prototype=B.prototype=n.fn,_.uniq=o,_.deserializeValue=Y,n.zepto=_,n}();return function(t){var r,n=1,i=Array.prototype.slice,s=t.isFunction,o=function(e){return"string"==typeof e},a={},c={},u="onfocusin"in e,l={focus:"focusin",blur:"focusout"},d={mouseenter:"mouseover",mouseleave:"mouseout"};function p(e){return e._zid||(e._zid=n++)}function h(e,t,r,n){if((t=m(t)).ns)var i=(s=t.ns,new RegExp("(?:^| )"+s.replace(" "," .* ?")+"(?: |$)"));var s;return(a[p(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||i.test(e.ns))&&(!r||p(e.fn)===p(r))&&(!n||e.sel==n)}))}function m(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function f(e,t){return e.del&&!u&&e.e in l||!!t}function g(e){return d[e]||u&&l[e]||e}function y(e,n,i,s,o,c,u){var l=p(e),h=a[l]||(a[l]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return t(document).ready(i);var a=m(n);a.fn=i,a.sel=o,a.e in d&&(i=function(e){var r=e.relatedTarget;if(!r||r!==this&&!t.contains(this,r))return a.fn.apply(this,arguments)}),a.del=c;var l=c||i;a.proxy=function(t){if(!(t=T(t)).isImmediatePropagationStopped()){try{var n=Object.getOwnPropertyDescriptor(t,"data");n&&!n.writable||(t.data=s)}catch(t){}var i=l.apply(e,t._args==r?[t]:[t].concat(t._args));return!1===i&&(t.preventDefault(),t.stopPropagation()),i}},a.i=h.length,h.push(a),"addEventListener"in e&&e.addEventListener(g(a.e),a.proxy,f(a,u))}))}function b(e,t,r,n,i){var s=p(e);(t||"").split(/\s/).forEach((function(t){h(e,t,r,n).forEach((function(t){delete a[s][t.i],"removeEventListener"in e&&e.removeEventListener(g(t.e),t.proxy,f(t,i))}))}))}c.click=c.mousedown=c.mouseup=c.mousemove="MouseEvents",t.event={add:y,remove:b},t.proxy=function(e,r){var n=2 in arguments&&i.call(arguments,2);if(s(e)){var a=function(){return e.apply(r,n?n.concat(i.call(arguments)):arguments)};return a._zid=p(e),a}if(o(r))return n?(n.unshift(e[r],e),t.proxy.apply(null,n)):t.proxy(e[r],e);throw new TypeError("expected function")},t.fn.bind=function(e,t,r){return this.on(e,t,r)},t.fn.unbind=function(e,t){return this.off(e,t)},t.fn.one=function(e,t,r,n){return this.on(e,t,r,n,1)};var v=function(){return!0},w=function(){return!1},S=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function T(e,n){if(n||!e.isDefaultPrevented){n||(n=e),t.each(E,(function(t,r){var i=n[t];e[t]=function(){return this[r]=v,i&&i.apply(n,arguments)},e[r]=w}));try{e.timeStamp||(e.timeStamp=Date.now())}catch(e){}(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=v)}return e}function I(e){var t,n={originalEvent:e};for(t in e)S.test(t)||e[t]===r||(n[t]=e[t]);return T(n,e)}t.fn.delegate=function(e,t,r){return this.on(t,e,r)},t.fn.undelegate=function(e,t,r){return this.off(t,e,r)},t.fn.live=function(e,r){return t(document.body).delegate(this.selector,e,r),this},t.fn.die=function(e,r){return t(document.body).undelegate(this.selector,e,r),this},t.fn.on=function(e,n,a,c,u){var l,d,p=this;return e&&!o(e)?(t.each(e,(function(e,t){p.on(e,n,a,t,u)})),p):(o(n)||s(c)||!1===c||(c=a,a=n,n=r),c!==r&&!1!==a||(c=a,a=r),!1===c&&(c=w),p.each((function(r,s){u&&(l=function(e){return b(s,e.type,c),c.apply(this,arguments)}),n&&(d=function(e){var r,o=t(e.target).closest(n,s).get(0);if(o&&o!==s)return r=t.extend(I(e),{currentTarget:o,liveFired:s}),(l||c).apply(o,[r].concat(i.call(arguments,1)))}),y(s,e,c,a,n,d||l)})))},t.fn.off=function(e,n,i){var a=this;return e&&!o(e)?(t.each(e,(function(e,t){a.off(e,n,t)})),a):(o(n)||s(i)||!1===i||(i=n,n=r),!1===i&&(i=w),a.each((function(){b(this,e,i,n)})))},t.fn.trigger=function(e,r){return(e=o(e)||t.isPlainObject(e)?t.Event(e):T(e))._args=r,this.each((function(){e.type in l&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,r)}))},t.fn.triggerHandler=function(e,r){var n,i;return this.each((function(s,a){(n=I(o(e)?t.Event(e):e))._args=r,n.target=a,t.each(h(a,e.type||e),(function(e,t){if(i=t.proxy(n),n.isImmediatePropagationStopped())return!1}))})),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}})),t.Event=function(e,t){o(e)||(e=(t=e).type);var r=document.createEvent(c[e]||"Events"),n=!0;if(t)for(var i in t)"bubbles"==i?n=!!t[i]:r[i]=t[i];return r.initEvent(e,n,!0),T(r)}}(n),r=[],n.fn.remove=function(){return this.each((function(){this.parentNode&&("IMG"===this.tagName&&(r.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",t&&clearTimeout(t),t=setTimeout((function(){r=[]}),6e4)),this.parentNode.removeChild(this))}))},function(e){var t={},r=e.fn.data,n=e.camelCase,i=e.expando="Zepto"+ +new Date,s=[];function o(r,o,a){var c=r[i]||(r[i]=++e.uuid),u=t[c]||(t[c]=function(t){var r={};return e.each(t.attributes||s,(function(t,i){0==i.name.indexOf("data-")&&(r[n(i.name.replace("data-",""))]=e.zepto.deserializeValue(i.value))})),r}(r));return void 0!==o&&(u[n(o)]=a),u}e.fn.data=function(s,a){return void 0===a?e.isPlainObject(s)?this.each((function(t,r){e.each(s,(function(e,t){o(r,e,t)}))})):0 in this?function(s,a){var c=s[i],u=c&&t[c];if(void 0===a)return u||o(s);if(u){if(a in u)return u[a];var l=n(a);if(l in u)return u[l]}return r.call(e(s),a)}(this[0],s):void 0:this.each((function(){o(this,s,a)}))},e.data=function(t,r,n){return e(t).data(r,n)},e.hasData=function(r){var n=r[i],s=n&&t[n];return!!s&&!e.isEmptyObject(s)},e.fn.removeData=function(r){return"string"==typeof r&&(r=r.split(/\s+/)),this.each((function(){var s=this[i],o=s&&t[s];o&&e.each(r||o,(function(e){delete o[r?n(this):e]}))}
36))},["remove","empty"].forEach((function(t){var r=e.fn[t];e.fn[t]=function(){var e=this.find("*");return"remove"===t&&(e=e.add(this)),e.removeData(),r.call(this)}}))}(n),n}(t)},525691:function(e,t){!function(e){"use strict";const t=new TextEncoder,r={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},n=["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"];class i{constructor({method:e,url:t,headers:i,body:s,accessKeyId:o,secretAccessKey:a,sessionToken:u,service:l,region:d,cache:p,datetime:h,signQuery:m,appendSessionToken:f,allHeaders:g,singleEncode:y}){if(null==t)throw new TypeError("url is a required option");if(null==o)throw new TypeError("accessKeyId is a required option");if(null==a)throw new TypeError("secretAccessKey is a required option");let b,v;this.method=e||(s?"POST":"GET"),this.url=new URL(t),this.headers=new Headers(i||{}),this.body=s,this.accessKeyId=o,this.secretAccessKey=a,this.sessionToken=u,l&&d||([b,v]=function(e,t){const{hostname:n,pathname:i}=e,s=n.replace("dualstack.","").match(/([^.]+)\.(?:([^.]*)\.)?amazonaws\.com(?:\.cn)?$/);let[o,a]=(s||["",""]).slice(1,3);if("us-gov"===a)a="us-gov-west-1";else if("s3"===a||"s3-accelerate"===a)a="us-east-1",o="s3";else if("iot"===o)o=n.startsWith("iot.")?"execute-api":n.startsWith("data.jobs.iot.")?"iot-jobs-data":"/mqtt"===i?"iotdevicegateway":"iotdata";else if("autoscaling"===o){const e=(t.get("X-Amz-Target")||"").split(".")[0];"AnyScaleFrontendService"===e?o="application-autoscaling":"AnyScaleScalingPlannerFrontendService"===e&&(o="autoscaling-plans")}else null==a&&o.startsWith("s3-")?(a=o.slice(3).replace(/^fips-|^external-1/,""),o="s3"):o.endsWith("-fips")?o=o.slice(0,-5):a&&/-\d$/.test(o)&&!/-\d$/.test(a)&&([o,a]=[a,o]);return[r[o]||o,a]}(this.url,this.headers)),this.service=l||b||"",this.region=d||v||"us-east-1",this.cache=p||new Map,this.datetime=h||(new Date).toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=m,this.appendSessionToken=f||"iotdevicegateway"===this.service,this.headers.delete("Host");const w=this.signQuery?this.url.searchParams:this.headers;if("s3"!==this.service||this.headers.has("X-Amz-Content-Sha256")||this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD"),w.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&w.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter((e=>g||!n.includes(e))).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map((e=>e+":"+("host"===e?this.url.host:(this.headers.get(e)||"").replace(/\s+/g," ")))).join("\n"),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&("s3"!==this.service||w.has("X-Amz-Expires")||w.set("X-Amz-Expires","86400"),w.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),w.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),w.set("X-Amz-SignedHeaders",this.signedHeaders)),"s3"===this.service)try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch(e){this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");y||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=c(this.encodedPath);const S=new Set;this.encodedSearch=[...this.url.searchParams].filter((([e])=>{if(!e)return!1;if("s3"===this.service){if(S.has(e))return!1;S.add(e)}return!0})).map((e=>e.map((e=>c(encodeURIComponent(e)))))).sort((([e,t],[r,n])=>e<r?-1:e>r?1:t<n?-1:t>n?1:0)).map((e=>e.join("="))).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}
36async signature(){const e=this.datetime.slice(0,8),t=[this.secretAccessKey,e,this.region,this.service].join();let r=this.cache.get(t);if(!r){const n=await s("AWS4"+this.secretAccessKey,e),i=await s(n,this.region),o=await s(i,this.service);r=await s(o,"aws4_request"),this.cache.set(t,r)}return a(await s(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,a(await o(await this.canonicalString()))].join("\n")}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+"\n",this.signedHeaders,await this.hexBodyHash()].join("\n")}async hexBodyHash(){let e=this.headers.get("X-Amz-Content-Sha256");if(null==e){if(this.body&&"string"!=typeof this.body&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");e=a(await o(this.body||""))}return e}}async function s(e,r){const n=await crypto.subtle.importKey("raw","string"==typeof e?t.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,t.encode(r))}async function o(e){return crypto.subtle.digest("SHA-256","string"==typeof e?t.encode(e):e)}function a(e){return Array.prototype.map.call(new Uint8Array(e),(e=>("0"+e.toString(16)).slice(-2))).join("")}function c(e){return e.replace(/[!'()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()))}e.AwsClient=class{constructor({accessKeyId:e,secretAccessKey:t,sessionToken:r,service:n,region:i,cache:s,retries:o,initRetryMs:a}){if(null==e)throw new TypeError("accessKeyId is a required option");if(null==t)throw new TypeError("secretAccessKey is a required option");this.accessKeyId=e,this.secretAccessKey=t,this.sessionToken=r,this.service=n,this.region=i,this.cache=s||new Map,this.retries=null!=o?o:10,this.initRetryMs=a||50}async sign(e,t){if(e instanceof Request){const{method:r,url:n,headers:i,body:s}=e;null==(t=Object.assign({method:r,url:n,headers:i},t)).body&&i.has("Content-Type")&&(t.body=null!=s&&i.has("X-Amz-Content-Sha256")?s:await e.clone().arrayBuffer()),e=n}const r=new i(Object.assign({url:e},t,this,t&&t.aws)),n=Object.assign({},t,await r.sign());return delete n.aws,new Request(n.url.toString(),n)}async fetch(e,t){for(let r=0;r<=this.retries;r++){const n=fetch(await this.sign(e,t));if(r===this.retries)return n;const i=await n;if(i.status<500&&429!==i.status)return i;await new Promise((e=>
36setTimeout(e,Math.random()*this.initRetryMs*Math.pow(2,r))))}throw new Error("An unknown error occurred, ensure retries is not negative")}},e.AwsV4Signer=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},697188:(e,t,r)=>{"use strict";function n(e,t){var r=e[t];if(r){var i=r.numbers,s=r.parentLocale;return!i&&s&&(i=n(e,s)),i}}function i(e,t,r,i){void 0===i&&(i={});var s=Number(e);if(!e||"number"!=typeof s)return e;var o=n(r,t=function(e){return e instanceof Array?e[0].replace(/_/,"-").toLowerCase():e.replace(/_/,"-").toLowerCase()}(t));if(!o)return e;var a=1;s<0&&(a=-1,s=Math.abs(s));var c,u=i.financialFormat,l=void 0!==u&&u,d=i.long,p=void 0!==d&&d,h=i.significantDigits,m=void 0===h?0:h,f=i.threshold,g=void 0===f?.05:f,y=p?o.decimal.long:o.decimal.short;if(!y||s<1e3)return e;for(var b=0,v=0;v<=y.length;v++)if(s<=y[v][0]){var w=y[v][0];!l&&1-s/w>g?c=y[v-1]:(c=y[v],m&&l||(b=1));break}var S=c[0],E=c[1],T=E.one||E.other,I=T[0],C=T[1];if(!I.match(/[^0]/))return e;var A=function(e,t,r,n,i){var s=i.significantDigits,o=void 0===s?0:s,a=i.minimumFractionDigits,c=void 0===a?0:a,u=i.maximumFractionDigits,l=void 0===u?2:u;return o?function(e,t,r){if(e&&"number"==typeof e)return e.toLocaleString(t,r)}(function(e,t){var r=Math.pow(10,t);return Math.round(e*r)/r}(e,o),n,{maximumFractionDigits:l,minimumFractionDigits:c}):function(e,t){if(e<=1)return Math.round(e);var r=Math.pow(10,t);return Math.round(e/r)*r}(e,t)*r}(function(e,t,r){return e/t*Math.pow(10,r-1)}(s,S,C),b,a,t,i);return function(e,t){return t.replace(/0*/,e)}(A,I)}r.r(t),r.d(t,{compactFormat:()=>i,default:()=>s});const s=i},192309:function(e){var t;t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var r=e.hasAttribute("readonly");r||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),r||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i),t=n.toString()}return t}},function(e,t){function r(){}r.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function i(){n.off(e,i),t.apply(r,arguments)}return i._=t,this.on(e,i,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;n<i;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],i=[];if(n&&t)for(var s=0,o=n.length;s<o;s++)n[s].fn!==t&&n[s].fn._!==t&&i.push(n[s]);return i.length?r[e]=i:delete r[e],this}},e.exports=r,e.exports.TinyEmitter=r},function(e,t,r){var n=r(3),i=r(4);e.exports=function(e,t,r){if(!e&&!t&&!r)throw new Error("Missing required arguments");if(!n.string(t))throw new TypeError("Second argument must be a String");if(!n.fn(r))throw new TypeError("Third argument must be a Function");if(n.node(e))return function(e,t,r){return e.addEventListener(t,r),{destroy:function(){e.removeEventListener(t,r)}}}(e,t,r);if(n.nodeList(e))return function(e,t,r){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,r)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,r)}))}}}(e,t,r);if(n.string(e))return function(e,t,r){return i(document.body,e,t,r)}(e,t,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var r=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===r||"[object HTMLCollection]"===r)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,r){var n=r(5);function i(e,t,r,n,i){var o=s.apply(this,arguments);return e.addEventListener(r,o,i),{destroy:function(){e.removeEventListener(r,o,i)}}}function s(e,t,r,i){return function(r){r.delegateTarget=n(r.target,t),r.delegateTarget&&i.call(e,r)}}
36e.exports=function(e,t,r,n,s){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof r?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,r,n,s)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return o(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=r+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=i()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=i()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":s(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=a,u=r(1),l=r.n(u),d=r(2),p=r.n(d),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),f=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.resolveOptions(r),n.listenClick(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),m(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=p()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,r=!!document.queryCommandSupported;return t.forEach((function(e){r=r&&!!document.queryCommandSupported(e)})),r}}]),t}(l.a);function g(e,t){var r="data-clipboard-"+e;if(t.hasAttribute(r))return t.getAttribute(r)}t.default=f}]).default},e.exports=t()},792051:function(e,t){!function(e){"use strict";function t(e){return new n(e)}function r(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}")}function n(e){var t=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(t){return t.map(s).join(e)}function s(e){return t.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}this.parse=function(e,t){var n,i,s=this.parseRows(e,(function(e,s){if(n)return n(e,s-1);i=e,n=t?function(e,t){var n=r(e);return function(r,i){return t(n(r),i,e)}}(e,t):r(e)}));return s.columns=i,s},this.parseRows=function(e,t){var r,i,s={},o={},a=[],c=e.length,u=0,l=0;function d(){if(u>=c)return o;if(i)return i=!1,s;var t,r=u;if(34===e.charCodeAt(r)){for(var a=r;a++<c;)if(34===e.charCodeAt(a)){if(34!==e.charCodeAt(a+1))break;++a}return u=a+2,13===(t=e.charCodeAt(a+1))?(i=!0,10===e.charCodeAt(a+2)&&++u):10===t&&(i=!0),e.slice(r+1,a).replace(/""/g,'"')}for(;u<c;){var l=1;if(10===(t=e.charCodeAt(u++)))i=!0;else if(13===t)i=!0,10===e.charCodeAt(u)&&(++u,++l);else if(t!==n)continue;return e.slice(r,u-l)}return e.slice(r)}for(;(r=d())!==o;){for(var p=[];r!==s&&r!==o;
36)p.push(r),r=d();t&&null==(p=t(p,l++))||a.push(p)}return a},this.format=function(t,r){return null==r&&(r=function(e){var t=Object.create(null),r=[];return e.forEach((function(e){for(var n in e)n in t||r.push(t[n]=n)})),r}(t)),[r.map(s).join(e)].concat(t.map((function(t){return r.map((function(e){return s(t[e])})).join(e)}))).join("\n")},this.formatRows=function(e){return e.map(i).join("\n")}}t.prototype=n.prototype;var i=t(","),s=t("\t");e.version="0.1.14",e.dsv=t,e.csv=i,e.tsv=s}(t)},989282:function(e,t){!function(e){"use strict";function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n;function i(e,r){var n=t(e,r);if(!n)return e+"";var i=n[0],s=n[1];return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}var s={"":function(e,t){e:for(var r,n=(e=e.toPrecision(t)).length,i=1,s=-1;i<n;++i)switch(e[i]){case".":s=r=i;break;case"0":0===s&&(s=i),r=i;break;case"e":break e;default:s>0&&(s=0)}return s>0?e.slice(0,s)+e.slice(r+1):e},"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return i(100*e,t)},r:i,s:function(e,r){var i=t(e,r);if(!i)return e+"";var s=i[0],o=i[1],a=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,c=s.length;return a===c?s:a>c?s+new Array(a-c+1).join("0"):a>0?s.slice(0,a)+"."+s.slice(a):"0."+new Array(1-a).join("0")+t(e,Math.max(0,r+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},o=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function a(e){return new c(e)}function c(e){if(!(t=o.exec(e)))throw new Error("invalid format: "+e);var t,r=t[1]||" ",n=t[2]||">",i=t[3]||"-",a=t[4]||"",c=!!t[5],u=t[6]&&+t[6],l=!!t[7],d=t[8]&&+t[8].slice(1),p=t[9]||"";"n"===p?(l=!0,p="g"):s[p]||(p=""),(c||"0"===r&&"="===n)&&(c=!0,r="0",n="="),this.fill=r,this.align=n,this.sign=i,this.symbol=a,this.zero=c,this.width=u,this.comma=l,this.precision=d,this.type=p}c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var u=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l(e){return e}function d(e){var t,i,o=e.grouping&&e.thousands?(t=e.grouping,i=e.thousands,function(e,r){for(var n=e.length,s=[],o=0,a=t[0],c=0;n>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),s.push(e.substring(n-=a,n+a)),!((c+=a+1)>r));)a=t[o=(o+1)%t.length];return s.reverse().join(i)}):l,c=e.currency,d=e.decimal;function p(e){var t=(e=a(e)).fill,r=e.align,i=e.sign,l=e.symbol,p=e.zero,h=e.width,m=e.comma,f=e.precision,g=e.type,y="$"===l?c[0]:"#"===l&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===l?c[1]:/[%p]/.test(g)?"%":"",v=s[g],w=!g||/[defgprs%]/.test(g);return f=null==f?g?6:12:/[gprs]/.test(g)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),function(e){var s=y,a=b;if("c"===g)a=v(e)+a,e="";else{var c,l=((e=+e)<0||1/e<0)&&(e*=-1,!0);if(e=v(e,f),l){var S=-1,E=e.length;for(l=!1;++S<E;)if(48<(c=e.charCodeAt(S))&&c<58||"x"===g&&96<c&&c<103||"X"===g&&64<c&&c<71){l=!0;break}}if(s=(l?"("===i?i:"-":"-"===i||"("===i?"":i)+s,a=a+("s"===g?u[8+n/3]:"")+(l&&"("===i?")":""),w)for(S=-1,E=e.length;++S<E;)if(48>(c=e.charCodeAt(S))||c>57){a=(46===c?d+e.slice(S+1):e.slice(S))+a,e=e.slice(0,S);break}}m&&!p&&(e=o(e,1/0));var T=s.length+e.length+a.length,I=T<h?new Array(h-T+1).join(t):"";switch(m&&p&&(e=o(I+e,I.length?h-a.length:1/0),I=""),r){case"<":return s+e+a+I;case"=":return s+I+e+a;case"^":return I.slice(0,T=I.length>>1)+s+e+a+I.slice(T)}return I+s+e+a}}return{format:p,formatPrefix:function(e,t){var n=p(((e=a(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),s=Math.pow(10,-i),o=u[8+i/3];return function(e){return n(s*e)+o}}}}var p=d({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),h=d({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),m=d({decimal:",",thousands:" ",grouping:[3],currency:[""," Kč"]}
36),f=d({decimal:",",thousands:"'",grouping:[3],currency:[""," CHF"]}),g=d({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),y=d({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),b=d({decimal:".",thousands:",",grouping:[3],currency:["£",""]}),v=d({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),w=d({decimal:",",thousands:" ",grouping:[3],currency:[""," €"]}),S=d({decimal:",",thousands:" ",grouping:[3],currency:["","$"]}),E=d({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),T=d({decimal:".",thousands:",",grouping:[3],currency:["₪",""]}),I=d({decimal:",",thousands:" ",grouping:[3],currency:[""," Ft"]}),C=d({decimal:",",thousands:".",grouping:[3],currency:["€",""]}),A=d({decimal:".",thousands:",",grouping:[3],currency:["","円"]}),O=d({decimal:".",thousands:",",grouping:[3],currency:["₩",""]}),_=d({decimal:",",thousands:".",grouping:[3],currency:[""," ден."]}),D=d({decimal:",",thousands:".",grouping:[3],currency:["€ ",""]}),P=d({decimal:",",thousands:".",grouping:[3],currency:["","zł"]}),k=d({decimal:",",thousands:".",grouping:[3],currency:["R$",""]}),x=d({decimal:",",thousands:" ",grouping:[3],currency:[""," руб."]}),R=d({decimal:",",thousands:" ",grouping:[3],currency:["","SEK"]}),U=d({decimal:".",thousands:",",grouping:[3],currency:["¥",""]}),M=p.format,N=p.formatPrefix;e.version="0.4.2",e.format=M,e.formatPrefix=N,e.locale=d,e.localeCaEs=h,e.localeCsCz=m,e.localeDeCh=f,e.localeDeDe=g,e.localeEnCa=y,e.localeEnGb=b,e.localeEnUs=p,e.localeEsEs=v,e.localeFiFi=w,e.localeFrCa=S,e.localeFrFr=E,e.localeHeIl=T,e.localeHuHu=I,e.localeItIt=C,e.localeJaJp=A,e.localeKoKr=O,e.localeMkMk=_,e.localeNlNl=D,e.localePlPl=P,e.localePtBr=k,e.localeRuRu=x,e.localeSvSe=R,e.localeZhCn=U,e.formatSpecifier=a,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1}}(t)},690228:function(e,t,r){!function(e,t){"use strict";function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function s(e){var t=e.dateTime,s=e.date,a=e.time,c=e.periods,u=e.days,l=e.shortDays,d=e.months,ne=e.shortMonths,ie=p(c),se=h(c),oe=p(u),ae=h(u),ce=p(l),ue=h(l),le=p(d),de=h(d),pe=p(ne),he=h(ne),me={a:function(e){return l[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ne[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:_,e:_,H:D,I:P,j:k,L:x,m:R,M:U,p:function(e){return c[+(e.getHours()>=12)]},S:M,U:N,w:j,W:$,x:null,X:null,y:F,Y:G,Z:L,"%":re},fe={a:function(e){return l[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ne[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:H,e:H,H:B,I:W,j:q,L:V,m:K,M:z,p:function(e){return c[+(e.getUTCHours()>=12)]},S:Y,U:J,w:Q,W:Z,x:null,X:null,y:X,Y:ee,Z:te,"%":re},ge={a:function(e,t,r){var n=ce.exec(t.slice(r));return n?(e.w=ue[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=oe.exec(t.slice(r));return n?(e.w=ae[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=pe.exec(t.slice(r));return n?(e.m=he[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=le.exec(t.slice(r));return n?(e.m=de[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return ve(e,t,r,n)},d:S,e:S,H:T,I:T,j:E,L:A,m:w,M:I,p:function(e,t,r){var n=ie.exec(t.slice(r));return n?(e.p=se[n[0].toLowerCase()],r+n[0].length):-1},S:C,U:f,w:m,W:g,x:function(e,t,r){return ve(e,s,t,r)},X:function(e,t,r){return ve(e,a,t,r)},y:b,Y:y,Z:v,"%":O};function ye(e,t){return function(r){var n,i,s,a=[],c=-1,u=0,l=e.length;for(r instanceof Date||(r=new Date(+r));++c<l;)37===e.charCodeAt(c)&&(a.push(e.slice(u,c)),null!=(i=o[n=e.charAt(++c)])?n=e.charAt(++c):i="e"===n?" ":"0",(s=t[n])&&(n=s(r,i)),a.push(n),u=c+1);return a.push(e.slice(u,c)),a.join("")}}function be(e,t){return function(r){var s=i(1900);if(ve(s,e,r+="",0)!=r.length)return null;
36if("p"in s&&(s.H=s.H%12+12*s.p),"W"in s||"U"in s){"w"in s||(s.w="W"in s?1:0);var o="Z"in s?n(i(s.y)).getUTCDay():t(i(s.y)).getDay();s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(o+5)%7:s.w+7*s.U-(o+6)%7}return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,n(s)):t(s)}}function ve(e,t,r,n){for(var i,s,a=0,c=t.length,u=r.length;a<c;){if(n>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(s=ge[i in o?t.charAt(a++):i])||(n=s(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return me.x=ye(s,me),me.X=ye(a,me),me.c=ye(t,me),fe.x=ye(s,fe),fe.X=ye(a,fe),fe.c=ye(t,fe),{format:function(e){var t=ye(e+="",me);return t.parse=be(e,r),t.toString=function(){return e},t},utcFormat:function(e){var t=ye(e+="",fe);return t.parse=be(e,n),t.toString=function(){return e},t}}}var o={"-":"",_:" ",0:"0"},a=/^\s*\d+/,c=/^%/,u=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function l(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s<r?new Array(r-s+1).join(t)+i:i)}function d(e){return e.replace(u,"\\$&")}function p(e){return new RegExp("^(?:"+e.map(d).join("|")+")","i")}function h(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function m(e,t,r){var n=a.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function f(e,t,r){var n=a.exec(t.slice(r));return n?(e.U=+n[0],r+n[0].length):-1}function g(e,t,r){var n=a.exec(t.slice(r));return n?(e.W=+n[0],r+n[0].length):-1}function y(e,t,r){var n=a.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function b(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function v(e,t,r){var n=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function w(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function S(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function E(e,t,r){var n=a.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function T(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function I(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=a.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function A(e,t,r){var n=a.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function O(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _(e,t){return l(e.getDate(),t,2)}function D(e,t){return l(e.getHours(),t,2)}function P(e,t){return l(e.getHours()%12||12,t,2)}function k(e,r){return l(1+t.day.count(t.year(e),e),r,3)}function x(e,t){return l(e.getMilliseconds(),t,3)}function R(e,t){return l(e.getMonth()+1,t,2)}function U(e,t){return l(e.getMinutes(),t,2)}function M(e,t){return l(e.getSeconds(),t,2)}function N(e,r){return l(t.sunday.count(t.year(e),e),r,2)}function j(e){return e.getDay()}function $(e,r){return l(t.monday.count(t.year(e),e),r,2)}function F(e,t){return l(e.getFullYear()%100,t,2)}function G(e,t){return l(e.getFullYear()%1e4,t,4)}function L(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+l(t/60|0,"0",2)+l(t%60,"0",2)}function H(e,t){return l(e.getUTCDate(),t,2)}function B(e,t){return l(e.getUTCHours(),t,2)}function W(e,t){return l(e.getUTCHours()%12||12,t,2)}function q(e,r){return l(1+t.utcDay.count(t.utcYear(e),e),r,3)}function V(e,t){return l(e.getUTCMilliseconds(),t,3)}function K(e,t){return l(e.getUTCMonth()+1,t,2)}function z(e,t){return l(e.getUTCMinutes(),t,2)}function Y(e,t){return l(e.getUTCSeconds(),t,2)}function J(e,r){return l(t.utcSunday.count(t.utcYear(e),e),r,2)}function Q(e){return e.getUTCDay()}function Z(e,r){return l(t.utcMonday.count(t.utcYear(e),e),r,2)}function X(e,t){return l(e.getUTCFullYear()%100,t,2)}function ee(e,t){return l(e.getUTCFullYear()%1e4,t,4)}function te(){return"+0000"}function re(){return"%"}var ne=s({dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ie=s({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],shortDays:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],months:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortMonths:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."]}),se=s({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),oe=s({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),ae=s({dateTime:"%a %b %e %X %Y",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
36ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ce=s({dateTime:"%a %e %b %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ue=s({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]}),le=s({dateTime:"%A, %-d. %Bta %Y klo %X",date:"%-d.%-m.%Y",time:"%H:%M:%S",periods:["a.m.","p.m."],days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDays:["Su","Ma","Ti","Ke","To","Pe","La"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortMonths:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"]}),de=s({dateTime:"%a %e %b %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["",""],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim","lun","mar","mer","jeu","ven","sam"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["jan","fév","mar","avr","mai","jui","jul","aoû","sep","oct","nov","déc"]}),pe=s({dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]}),he=s({dateTime:"%A, %e ב%B %Y %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],shortDays:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],shortMonths:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"]}),me=s({dateTime:"%Y. %B %-e., %A %X",date:"%Y. %m. %d.",time:"%H:%M:%S",periods:["de.","du."],days:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],shortDays:["V","H","K","Sze","Cs","P","Szo"],months:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortMonths:["jan.","feb.","már.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."]}),fe=s({dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]}),ge=s({dateTime:"%Y %b %e %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["AM","PM"],days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],shortDays:["日","月","火","水","木","金","土"],months:["睦月","如月","弥生","卯月","皐月","水無月","文月","葉月","長月","神無月","霜月","師走"],shortMonths:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}),ye=s({dateTime:"%Y/%m/%d %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["오전","오후"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],months:["1
36월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}),be=s({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]}),ve=s({dateTime:"%a %e %B %Y %T",date:"%d-%m-%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]}),we=s({dateTime:"%A, %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Niedz.","Pon.","Wt.","Śr.","Czw.","Pt.","Sob."],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Stycz.","Luty","Marz.","Kwie.","Maj","Czerw.","Lipc.","Sierp.","Wrz.","Paźdz.","Listop.","Grudz."]}),Se=s({dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}),Ee=s({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],shortDays:["вс","пн","вт","ср","чт","пт","сб"],months:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],shortMonths:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]}),Te=s({dateTime:"%A den %d %B %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["fm","em"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"]}),Ie=s({dateTime:"%a %b %e %X %Y",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]}),Ce="%Y-%m-%dT%H:%M:%S.%LZ";function Ae(e){return e.toISOString()}Ae.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Ae.toString=function(){return Ce};var Oe=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ae:ne.utcFormat(Ce),_e=ne.format,De=ne.utcFormat;e.version="0.2.1",e.format=_e,e.utcFormat=De,e.locale=s,e.localeCaEs=ie,e.localeDeCh=se,e.localeDeDe=oe,e.localeEnCa=ae,e.localeEnGb=ce,e.localeEnUs=ne,e.localeEsEs=ue,e.localeFiFi=le,e.localeFrCa=de,e.localeFrFr=pe,e.localeHeIl=he,e.localeHuHu=me,e.localeItIt=fe,e.localeJaJp=ge,e.localeKoKr=ye,e.localeMkMk=be,e.localeNlNl=ve,e.localePlPl=we,e.localePtBr=Se,e.localeRuRu=Ee,e.localeSvSe=Te,e.localeZhCn=Ie,e.isoFormat=Oe}(t,r(642800))},642800:function(e,t){!function(e){"use strict";var t=new Date,r=new Date;function n(e,i,s,o){function a(t){return e(t=new Date(+t)),t}return a.floor=a,a.round=function(t){var r=new Date(+t),n=new Date(t-1);return e(r),e(n),i(n,1),t-r<n-t?r:n},a.ceil=function(t){return e(t=new Date(t-1)),i(t,1),t},a.offset=function(e,t){return i(e=new Date(+e),null==t?1:Math.floor(t)),e},a.range=function(t,r,n){var s=[];if(t=new Date(t-1),r=new Date(+r),n=null==n?1:Math.floor(n),!(t<r&&n>0))return s;for(i(t,1),e(t),t<r&&s.push(new Date(+t));i(t,n),e(t),t<r;)s.push(new Date(+t));return s},
37a.filter=function(t){return n((function(r){for(;e(r),!t(r);)r.setTime(r-1)}),(function(e,r){for(;--r>=0;)for(;i(e,1),!t(e););}))},s&&(a.count=function(n,i){return t.setTime(+n),r.setTime(+i),e(t),e(r),Math.floor(s(t,r))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(o?function(t){return o(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var i=n((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};var s=n((function(e){e.setMilliseconds(0)}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getSeconds()})),o=n((function(e){e.setSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),a=n((function(e){e.setMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),c=n((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function u(e){return n((function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var l=u(0),d=u(1),p=u(2),h=u(3),m=u(4),f=u(5),g=u(6),y=n((function(e){e.setHours(0,0,0,0),e.setDate(1)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),b=n((function(e){e.setHours(0,0,0,0),e.setMonth(0,1)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})),v=n((function(e){e.setUTCMilliseconds(0)}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),w=n((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),S=n((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),E=n((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}
37));function T(e){return n((function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var I=T(0),C=T(1),A=T(2),O=T(3),_=T(4),D=T(5),P=T(6),k=n((function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),x=n((function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})),R=i.range,U=s.range,M=o.range,N=a.range,j=c.range,$=l.range,F=d.range,G=p.range,L=h.range,H=m.range,B=f.range,W=g.range,q=l.range,V=y.range,K=b.range,z=i,Y=R,J=v.range,Q=w.range,Z=S.range,X=E.range,ee=I.range,te=C.range,re=A.range,ne=O.range,ie=_.range,se=D.range,oe=P.range,ae=I.range,ce=k.range,ue=x.range;e.version="0.1.1",e.milliseconds=R,e.seconds=U,e.minutes=M,e.hours=N,e.days=j,e.sundays=$,e.mondays=F,e.tuesdays=G,e.wednesdays=L,e.thursdays=H,e.fridays=B,e.saturdays=W,e.weeks=q,e.months=V,e.years=K,e.utcMillisecond=z,e.utcMilliseconds=Y,e.utcSeconds=J,e.utcMinutes=Q,e.utcHours=Z,e.utcDays=X,e.utcSundays=ee,e.utcMondays=te,e.utcTuesdays=re,e.utcWednesdays=ne,e.utcThursdays=ie,e.utcFridays=se,e.utcSaturdays=oe,e.utcWeeks=ae,e.utcMonths=ce,e.utcYears=ue,e.millisecond=i,e.second=s,e.minute=o,e.hour=a,e.day=c,e.sunday=l,e.monday=d,e.tuesday=p,e.wednesday=h,e.thursday=m,e.friday=f,e.saturday=g,e.week=l,e.month=y,e.year=b,e.utcSecond=v,e.utcMinute=w,e.utcHour=S,e.utcDay=E,e.utcSunday=I,e.utcMonday=C,e.utcTuesday=A,e.utcWednesday=O,e.utcThursday=_,e.utcFriday=D,e.utcSaturday=P,e.utcWeek=I,e.utcMonth=k,e.utcYear=x,e.interval=n}(t)},536601:(e,t,r)=>{var n=r(842345),i=r(727715),s=i.utc,o=e.exports;o.$year=n.$func("year",i.year.unit),o.$month=n.$func("month",i.months.unit),o.$date=n.$func("date",i.dates.unit),o.$day=n.$func("day",i.weekdays.unit),o.$hour=n.$func("hour",i.hours.unit),o.$minute=n.$func("minute",i.minutes.unit),o.$second=n.$func("second",i.seconds.unit),o.$utcYear=n.$func("utcYear",s.year.unit),o.$utcMonth=n.$func("utcMonth",s.months.unit),o.$utcDate=n.$func("utcDate",s.dates.unit),o.$utcDay=n.$func("utcDay",s.weekdays.unit),o.$utcHour=n.$func("utcHour",s.hours.unit),o.$utcMinute=n.$func("utcMinute",s.minutes.unit),o.$utcSecond=n.$func("utcSecond",s.seconds.unit)},253412:(e,t,r)=>{var n=r(842345),i=r(978558),s=r(987303);function o(){this._cells={},this._aggr=[],this._stream=!1}var a=o.Flags={ADD_CELL:1,MOD_CELL:2},c=o.prototype;c.stream=function(e){return null==e?this._stream:(this._stream=!!e,this._aggr=[],this)},c.key=function(e){return null==e?this._key:(this._key=n.$(e),this)},c.groupby=function(e){return this._dims=n.array(e).map((function(e,t){if(null==(e=n.isString(e)?{name:e,get:n.$(e)}:n.isFunction(e)?{name:n.name(e)||e.name||"_"+t,get:e}:e.name&&n.isFunction(e.get)?e:null))throw"Invalid groupby argument: "+e;return e})),this.clear()},c.summarize=function(e){e=function(e){if(n.isArray(e))return e;if(null==e)return[];var t,r,i=[];for(t in e)r=n.array(e[t]),i.push({name:t,ops:r});return i}(e),this._count=!0;var t,r,s,o,a,c,u,l=this._aggr=[];for(s=0;s<e.length;++s){for(o=0,t=[],r=e[s];o<r.ops.length;++o)"count"!==(a=r.ops[o])&&(this._count=!1),c=r.as&&r.as[o]||a+("*"===r.name?"":"_"+r.name),t.push(i[a](c));u=r.get&&n.$(r.get)||("*"===r.name?n.identity:n.$(r.name)),l.push({name:r.name,measures:i.create(t,this._stream,u,this._assign)})}return this.clear()},c.count=function(){return this.summarize({"*":"count"})},c._assign=function(e,t,r){e[t]=r},c.clear=function(){return this._cells={},this},c._cellkey=function(e){var t,r=this._dims,n=r.length,i=String(r[0].get(e));for(t=1;t<n;++t)i+="|"+r[t].get(e);return i},c._cell=function(e){var t=this._dims.length?this._cellkey(e):"";return this._cells[t]||(this._cells[t]=this._newcell(e,t))},c._newcell=function(e,t){var r,n={num:0,tuple:this._newtuple(e,t),flag:a.ADD_CELL,aggs:{}},i=this._aggr;for(r=0;r<i.length;++r)n.aggs[i[r].name]=new i[r].measures(n,n.tuple);return n.collect&&(n.data=new s(this._key)),n},c._newtuple=function(e){var t,r,n=this._dims,i={};for(t=0,r=n.length;t<r;++t)i[n[t].name]=n[t].get(e);return this._ingest(i)},c._ingest=n.identity,c._add=function(e){var t,r=this._cell(e),n=this._aggr;if(r.num+=1,!this._count)for(r.collect&&r.data.add(e),t=0;t<n.length;++t)r.aggs[n[t].name].add(e);r.flag|=a.MOD_CELL,this._on_add&&this._on_add(e,r)},c._rem=function(e){var t,r=this._cell(e),n=this._aggr;if(r.num-=1,!this._count)for(r.collect&&r.data.rem(e),t=0;t<n.length;++t)r.aggs[n[t].name].rem(e);r.flag|=a.MOD_CELL,this._on_rem&&this._on_rem(e,r)},c._mod=function(e,t){var r,i=this._cell(t),s=this._cell(e),o=this._aggr;for(i!==s?(i.num-=1,s.num+=1,i.collect&&i.data.rem(t),s.collect&&s.data.add(e)):i.collect&&!n.isObject(e)&&(i.data.rem(t),i.data.add(e)),r=0;r<o.length;++r)i.aggs[o[r].name].rem(t),s.aggs[o[r].name].add(e);i.flag|=a.MOD_CELL,s.flag|=a.MOD_CELL,this._on_mod&&this._on_mod(e,t,i,s)},c._markMod=function(e){this._cell(e).flag|=a.MOD_CELL},c.result=function(){var e,t,r,n=[],i=this._aggr;
37for(r in this._cells){if((e=this._cells[r]).num>0){for(e.collect&&e.data.values(),t=0;t<i.length;++t)e.aggs[i[t].name].set();n.push(e.tuple)}else delete this._cells[r];e.flag=0}return this._rems=!1,n},c.changes=function(e){var t,r,n,i,s=e||{add:[],rem:[],mod:[]},o=this._aggr;for(i in this._cells){for(r=(t=this._cells[i]).flag,t.collect&&t.data.values(),n=0;n<o.length;++n)t.aggs[o[n].name].set();t.num<=0?(s.rem.push(t.tuple),delete this._cells[i],this._on_drop&&this._on_drop(t)):(this._on_keep&&this._on_keep(t),r&a.ADD_CELL?s.add.push(t.tuple):r&a.MOD_CELL&&s.mod.push(t.tuple)),t.flag=0}return this._rems=!1,s},c.execute=function(e){return this.clear().insert(e).result()},c.insert=function(e){this._consolidate();for(var t=0;t<e.length;++t)this._add(e[t]);return this},c.remove=function(e){if(!this._stream)throw"Aggregator not configured for streaming removes. Call stream(true) prior to calling summarize.";for(var t=0;t<e.length;++t)this._rem(e[t]);return this._rems=!0,this},c._consolidate=function(){if(this._rems){for(var e in this._cells)this._cells[e].collect&&this._cells[e].data.values();this._rems=!1}},e.exports=o},987303:(e,t,r)=>{var n=r(842345),i=r(305306),s="__dl_rem__";function o(e){this._add=[],this._rem=[],this._key=e||null,this._last=null}var a=o.prototype;a.add=function(e){this._add.push(e)},a.rem=function(e){this._rem.push(e)},a.values=function(){if(this._get=null,0===this._rem.length)return this._add;var e,t,r,o,a=this._add,c=this._rem,u=this._key,l=Array(a.length-c.length);if(n.isObject(c[0]))if(u)for(o=n.toMap(c,u),e=0,t=0,r=a.length;e<r;++e)o.hasOwnProperty(u(a[e]))||(l[t++]=a[e]);else{for(e=0,r=c.length;e<r;++e)c[e][s]=1;for(e=0,t=0,r=a.length;e<r;++e)a[e][s]||(l[t++]=a[e]);for(e=0,r=c.length;e<r;++e)delete c[e][s]}else for(o=i.count.map(c),e=0,t=0,r=a.length;e<r;++e)o[a[e]]>0?o[a[e]]-=1:l[t++]=a[e];return this._rem=[],this._add=l},a.extent=function(e){if(this._get!==e||!this._ext){var t=this.values(),r=i.extent.index(t,e);this._ext=[t[r[0]],t[r[1]]],this._get=e}return this._ext},a.argmin=function(e){return this.extent(e)[0]},a.argmax=function(e){return this.extent(e)[1]},a.min=function(e){var t=this.extent(e)[0];return null!=t?e(t):1/0},a.max=function(e){var t=this.extent(e)[1];return null!=t?e(t):-1/0},a.quartile=function(e){return this._get===e&&this._q||(this._q=i.quartile(this.values(),e),this._get=e),this._q},a.q1=function(e){return this.quartile(e)[0]},a.q2=function(e){return this.quartile(e)[1]},a.q3=function(e){return this.quartile(e)[2]},e.exports=o},595383:(e,t,r)=>{var n=r(842345),i=r(253412);e.exports=function(){var e=[].reduce.call(arguments,(function(e,t){return e.concat(n.array(t))}),[]);return(new i).groupby(e).summarize({"*":"values"})}},978558:(e,t,r)=>{var n=r(842345),i={values:s({name:"values",init:"cell.collect = true;",set:"cell.data.values()",idx:-1}),count:s({name:"count",set:"cell.num"}),missing:s({name:"missing",set:"this.missing"}),valid:s({name:"valid",set:"this.valid"}),sum:s({name:"sum",init:"this.sum = 0;",add:"this.sum += v;",rem:"this.sum -= v;",set:"this.sum"}),mean:s({name:"mean",init:"this.mean = 0;",add:"var d = v - this.mean; this.mean += d / this.valid;",rem:"var d = v - this.mean; this.mean -= this.valid ? d / this.valid : this.mean;",set:"this.mean"}),average:s({name:"average",set:"this.mean",req:["mean"],idx:1}),variance:s({name:"variance",init:"this.dev = 0;",add:"this.dev += d * (v - this.mean);",rem:"this.dev -= d * (v - this.mean);",set:"this.valid > 1 ? this.dev / (this.valid-1) : 0",req:["mean"],idx:1}),variancep:s({name:"variancep",set:"this.valid > 1 ? this.dev / this.valid : 0",req:["variance"],idx:2}),stdev:s({name:"stdev",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid-1)) : 0",req:["variance"],idx:2}),stdevp:s({name:"stdevp",set:"this.valid > 1 ? Math.sqrt(this.dev / this.valid) : 0",req:["variance"],idx:2}),stderr:s({name:"stderr",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid * (this.valid-1))) : 0",req:["variance"],idx:2}),median:s({name:"median",set:"cell.data.q2(this.get)",req:["values"],idx:3}),q1:s({name:"q1",set:"cell.data.q1(this.get)",req:["values"],idx:3}),q3:s({name:"q3",set:"cell.data.q3(this.get)",req:["values"],idx:3}),distinct:s({name:"distinct",set:"this.distinct(cell.data.values(), this.get)",req:["values"],idx:3}),argmin:s({name:"argmin",add:"if (v < this.min) this.argmin = t;",rem:"if (v <= this.min) this.argmin = null;",set:"this.argmin = this.argmin || cell.data.argmin(this.get)",req:["min"],str:["values"],idx:3}),argmax:s({name:"argmax",add:"if (v > this.max) this.argmax = t;",rem:"if (v >= this.max) this.argmax = null;",set:"this.argmax = this.argmax || cell.data.argmax(this.get)",req:["max"],str:["values"],idx:3}),min:s({name:"min",init:"this.min = +Infinity;",add:"if (v < this.min) this.min = v;",rem:"if (v <= this.min) this.min = NaN;",set:"this.min = (isNaN(this.min) ? cell.data.min(this.get) : this.min)",str:["values"],idx:4}
37),max:s({name:"max",init:"this.max = -Infinity;",add:"if (v > this.max) this.max = v;",rem:"if (v >= this.max) this.max = NaN;",set:"this.max = (isNaN(this.max) ? cell.data.max(this.get) : this.max)",str:["values"],idx:4}),modeskew:s({name:"modeskew",set:"this.dev===0 ? 0 : (this.mean - cell.data.q2(this.get)) / Math.sqrt(this.dev/(this.valid-1))",req:["mean","variance","median"],idx:5})};function s(e){return function(t){var r=n.extend({init:"",add:"",rem:"",idx:0},e);return r.out=t||e.name,r}}i.create=function(e,t,s,o){var a=function(e,t){var r=e.reduce((function e(r,n){function s(t){r[t]||e(r,r[t]=i[t]())}return n.req&&n.req.forEach(s),t&&n.str&&n.str.forEach(s),r}),e.reduce((function(e,t){return e[t.name]=t,e}),{}));return n.vals(r).sort((function(e,t){return e.idx-t.idx}))}(e,t),c="this.cell = cell; this.tuple = t; this.valid = 0; this.missing = 0;",u="if (v==null) this.missing++; if (!this.isValid(v)) return; ++this.valid;",l="if (v==null) this.missing--; if (!this.isValid(v)) return; --this.valid;",d="var t = this.tuple; var cell = this.cell;";return a.forEach((function(e){e.idx<0?(c=e.init+c,u=e.add+u,l=e.rem+l):(c+=e.init,u+=e.add,l+=e.rem)})),e.slice().sort((function(e,t){return e.idx-t.idx})).forEach((function(e){d+="this.assign(t,'"+e.out+"',"+e.set+");"})),d+="return t;",(c=Function("cell","t",c)).prototype.assign=o,c.prototype.add=Function("t","var v = this.get(t);"+u),c.prototype.rem=Function("t","var v = this.get(t);"+l),c.prototype.set=Function(d),c.prototype.get=s,c.prototype.distinct=r(305306).count.distinct,c.prototype.isValid=n.isValid,c.fields=e.map(n.$("out")),c},e.exports=i},543061:(e,t,r)=>{var n=r(842345),i=r(727715),s=1e-15;function o(e){if(!e)throw Error("Missing binning options.");var t,r,i,s,o,u,l,d=e.maxbins||15,p=e.base||10,h=Math.log(p),m=e.div||[5,2],f=e.min,g=e.max,y=g-f;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,function(e,t,r,i){for(;r<i;){var s=r+i>>>1;n.cmp(e[s],t)<0?r=s+1:i=s}return r}(e.steps,y/d,0,e.steps.length))];else{for(r=Math.ceil(Math.log(d)/h),i=e.minstep||0,t=Math.max(i,Math.pow(p,Math.round(Math.log(y)/h)-r));Math.ceil(y/t)>d;)t*=p;for(u=0;u<m.length;++u)(o=t/m[u])>=i&&y/o<=d&&(t=o)}return s=(o=Math.log(t))>=0?0:1+~~(-o/h),l=Math.pow(p,-s-1),{start:f=Math.min(f,Math.floor(f/t+l)*t),stop:g=Math.ceil(g/t)*t,step:t,unit:{precision:s},value:a,index:c}}function a(e){return this.step*Math.floor(e/this.step+s)}function c(e){return Math.floor((e-this.start)/this.step+s)}function u(e){return this.unit.date(a.call(this,e))}function l(e){return c.call(this,this.unit.unit(e))}o.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?i.utc:i,r=e.min,n=e.max,s=e.maxbins||20,a=e.minbins||4,c=+n-+r,d=e.unit?t[e.unit]:t.find(c,a,s),p=o({min:null!=d.min?d.min:d.unit(r),max:null!=d.max?d.max:d.unit(n),maxbins:s,minstep:d.minstep,steps:d.step});return p.unit=d,p.index=l,e.raw||(p.value=u),p},e.exports=o},198376:(e,t,r)=>{var n=r(543061),i=r(274163),s=r(109009),o=r(842345),a=r(305306),c={integer:1,number:1,date:1};function u(e){var t=e.type,r=null;return(null==t||c[t])&&("integer"===t&&null==e.minstep&&(e.minstep=1),r="date"===t?n.date(e):n(e)),r}function l(){var e=arguments,t=0,r=o.isArray(e[t])?e[t++]:null,n=o.isFunction(e[t])||o.isString(e[t])?o.$(e[t++]):null,i=o.extend({},e[t]);if(r&&(i.type=i.type||s(r,n),c[i.type])){var u=a.extent(r,n);i=o.extend({min:u[0],max:u[1]},i)}return n&&(i.accessor=n),i}e.exports={$bin:function(e,t,r){var n=u(r=l(e,t,r));return n?o.$func("bin",n.unit.unit?function(e){return n.value(n.unit.unit(e))}:function(e){return n.value(e)})(r.accessor):r.accessor||o.identity},histogram:function(e,t,r){var n=u(r=l(e,t,r));return n?function(e,t,r){for(var n,s,a=i.range(r.start,r.stop+r.step/2,r.step).map((function(e){return{value:r.value(e),count:0}})),c=0;c<e.length;++c)if(n=t?t(e[c]):e[c],o.isValid(n)){if((s=r.index(n))<0||s>=a.length||!isFinite(s))continue;a[s].count+=1}return a.bins=r,a}(e,r.accessor,n):function(e,t,r){var n=a.unique(e,t),i=a.count.map(e,t);return n.map((function(e){return{value:e,count:i[e]}})).sort(o.comparator(r?"-count":"+value"))}(e,r.accessor,r&&r.sort)}}},481667:(e,t,r)=>{var n=r(842345),i=r(109009),s=r(305306),o=r(416760);e.exports={table:function(e,t){var r=(t=n.extend({separator:" ",minwidth:8,maxwidth:15},t)).fields||n.keys(e[0]),u=i.all(e);
37if(t.start||t.limit){var l=t.start||0,d=t.limit?l+t.limit:e.length;e=e.slice(l,d)}var p=r.map((function(r){var n=a[u[r]]||"",i=o("{{"+r+n+"}}"),c=s.max(e,(function(e){return i(e).length}));return c=Math.max(Math.min(r.length,t.minwidth),c),t.maxwidth>0?Math.min(c,t.maxwidth):c})),h=r.map((function(e,t){return n.truncate(n.pad(e,p[t],"center"),p[t])})).join(t.separator),m=o(r.map((function(e,t){return"{{"+e+(a[u[e]]||"")+"|pad:"+p[t]+","+(c[u[e]]||"right")+"|truncate:"+p[t]+"}}"})).join(t.separator));return h+"\n"+e.map(m).join("\n")},summary:function(e){var t,r,n,i=[];for(t=0,r=(e=e?e.__summary__?e:s.summary(e):this).length;t<r;++t)i.push("-- "+e[t].field+" --"),"string"===e[t].type||e[t].distinct<10?i.push(u(e[t])):i.push(["valid:    "+(n=e[t]).valid,"missing:  "+n.missing,"distinct: "+n.distinct,"min:      "+n.min,"max:      "+n.max,"median:   "+n.median,"mean:     "+n.mean,"stdev:    "+n.stdev,"modeskew: "+n.modeskew].join("\n")),i.push("");return i.join("\n")}};var a={date:'|time:"%m/%d/%Y %H:%M:%S"',number:'|number:".4f"',integer:'|number:"d"'},c={number:"left",integer:"left"};function u(e){var t=["valid:    "+e.valid,"missing:  "+e.missing,"distinct: "+e.distinct,"top values: "],r=e.unique,i=n.keys(r).sort((function(e,t){return r[t]-r[e]})).slice(0,6).map((function(e){return" '"+e+"' ("+r[e]+")"}));return t.concat(i).join("\n")}},560230:(e,t,r)=>{var n,i,s,o,a=r(842345),c=r(642800),u=r(690228),l=r(989282),d=l,p=u,h=new Date(2e3,0,1);function m(e){return e.length>4&&"locale"+(e[0].toUpperCase()+e[1].toLowerCase()+e[3].toUpperCase()+e[4].toLowerCase())}function f(e){var t=a.isString(e)?l[m(e)]:l.locale(e);if(null==t)throw Error("Unrecognized locale: "+e);d=t}function g(e){var t=a.isString(e)?u[m(e)]:u.locale(e);if(null==t)throw Error("Unrecognized locale: "+e);p=t,n=i=s=o=null}e.exports={numberLocale:f,number:function(e){return d.format(e)},numberPrefix:function(e,t){return d.formatPrefix(e,t)},timeLocale:g,time:function(e){return p.format(e)},utc:function(e){return p.utcFormat(e)},locale:function(e){f(e),g(e)},auto:{number:function(e){var t=d.format(".1f")(1)[1];switch(null==e&&(e=","),null==(e=l.formatSpecifier(e)).precision&&(e.precision=12),e.type){case"%":e.precision-=2;break;case"e":e.precision-=1}return function(e,t){return function(r){var n=e(r),i=n.indexOf(t);if(i<0)return n;for(var s=function(e,t){var r,n=e.lastIndexOf("e");if(n>0)return n;for(n=e.length;--n>t;)if((r=e.charCodeAt(n))>=48&&r<=57)return n+1}(n,i),o=s<n.length?n.slice(s):"";--s>i;)if("0"!==n[s]){++s;break}return n.slice(0,s)+o}}(d.format(e),t)},linear:function(e,t,r){var n=function(e,t){e.length||(e=[0]),null==t&&(t=10);var r=e[0],n=e[e.length-1];n<r&&(o=n,n=r,r=o);var i=n-r||(t=1,r||n||1),s=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),o=i/t/s;return o>=y?s*=10:o>=b?s*=5:o>=v&&(s*=2),[Math.ceil(r/s)*s,Math.floor(n/s)*s+s/2,s]}(e,t);switch(null==r&&(r=",f"),(r=l.formatSpecifier(r)).type){case"s":var i=Math.max(Math.abs(n[0]),Math.abs(n[1]));return null==r.precision&&(r.precision=l.precisionPrefix(n[2],i)),d.formatPrefix(r,i);case"":case"e":case"g":case"p":case"r":null==r.precision&&(r.precision=l.precisionRound(n[2],Math.max(Math.abs(n[0]),Math.abs(n[1])))-("e"===r.type));break;case"f":case"%":null==r.precision&&(r.precision=l.precisionFixed(n[2])-2*("%"===r.type))}return d.format(r)},time:function(){return e=p.format,t=e(".%L"),r=e(":%S"),n=e("%I:%M"),i=e("%I %p"),s=e("%a %d"),o=e("%b %d"),a=e("%B"),u=e("%Y"),function(e){var l=+e;return(c.second(e)<l?t:c.minute(e)<l?r:c.hour(e)<l?n:c.day(e)<l?i:c.month(e)<l?c.week(e)<l?s:o:c.year(e)<l?a:u)(e)};var e,t,r,n,i,s,o,a,u},utc:function(){return e=p.utcFormat,t=e(".%L"),r=e(":%S"),n=e("%I:%M"),i=e("%I %p"),s=e("%a %d"),o=e("%b %d"),a=e("%B"),u=e("%Y"),function(e){var l=+e;return(c.utcSecond(e)<l?t:c.utcMinute(e)<l?r:c.utcHour(e)<l?n:c.utcDay(e)<l?i:c.utcMonth(e)<l?c.utcWeek(e)<l?s:o:c.utcYear(e)<l?a:u)(e)};var e,t,r,n,i,s,o,a,u}},month:function(e,t){var r=t?i||(i=p.format("%b")):n||(n=p.format("%B"));return h.setMonth(e),r(h)},day:function(e,t){var r=t?o||(o=p.format("%a")):s||(s=p.format("%A"));return h.setMonth(0),h.setDate(2+e),r(h)},quarter:function(e){return Math.floor(e.getMonth()/3)+1},utcQuarter:function(e){return Math.floor(e.getUTCMonth()/3)+1}};var y=Math.sqrt(50),b=Math.sqrt(10),v=Math.sqrt(2)},274163:(e,t,r)=>{var n=r(842345),i=e.exports;i.repeat=function(e,t){var r,n=Array(t);for(r=0;r<t;++r)n[r]=e;return n},i.zeros=function(e){return i.repeat(0,e)},i.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("Infinite range");var n,i=[],s=-1;
37if(r<0)for(;(n=e+r*++s)>t;)i.push(n);else for(;(n=e+r*++s)<t;)i.push(n);return i},i.random={},i.random.uniform=function(e,t){void 0===t&&(t=void 0===e?1:e,e=0);var r=t-e,n=function(){return e+r*Math.random()};return n.samples=function(e){return i.zeros(e).map(n)},n.pdf=function(n){return n>=e&&n<=t?1/r:0},n.cdf=function(n){return n<e?0:n>t?1:(n-e)/r},n.icdf=function(t){return t>=0&&t<=1?e+t*r:NaN},n},i.random.integer=function(e,t){void 0===t&&(t=e,e=0);var r=t-e,n=function(){return e+Math.floor(r*Math.random())};return n.samples=function(e){return i.zeros(e).map(n)},n.pdf=function(n){return n===Math.floor(n)&&n>=e&&n<t?1/r:0},n.cdf=function(n){var i=Math.floor(n);return i<e?0:i>=t?1:(i-e+1)/r},n.icdf=function(t){return t>=0&&t<=1?e-1+Math.floor(t*r):NaN},n},i.random.normal=function(e,t){var r;e=e||0,t=t||1;var n=function(){var n,i,s=0,o=0;if(void 0!==r)return s=r,r=void 0,s;do{n=(s=2*Math.random()-1)*s+(o=2*Math.random()-1)*o}while(0===n||n>1);return i=Math.sqrt(-2*Math.log(n)/n),r=e+o*i*t,e+s*i*t};return n.samples=function(e){return i.zeros(e).map(n)},n.pdf=function(r){var n=Math.exp(Math.pow(r-e,2)/(-2*Math.pow(t,2)));return 1/(t*Math.sqrt(2*Math.PI))*n},n.cdf=function(r){var n,i=(r-e)/t,s=Math.abs(i);if(s>37)n=0;else{var o=Math.exp(-s*s/2);s<7.07106781186547?(n=o*((((((.0352624965998911*s+.700383064443688)*s+6.37396220353165)*s+33.912866078383)*s+112.079291497871)*s+221.213596169931)*s+220.206867912376),n/=((((((.0883883476483184*s+1.75566716318264)*s+16.064177579207)*s+86.7807322029461)*s+296.564248779674)*s+637.333633378831)*s+793.826512519948)*s+440.413735824752):n=o/(s+1/(s+2/(s+3/(s+4/(s+.65)))))/2.506628274631}return i>0?1-n:n},n.icdf=function(r){if(r<=0||r>=1)return NaN;var n=2*r-1,i=8*(Math.PI-3)/(3*Math.PI*(4-Math.PI)),s=2/(Math.PI*i)+Math.log(1-Math.pow(n,2))/2,o=Math.log(1-n*n)/i,a=(n>0?1:-1)*Math.sqrt(Math.sqrt(s*s-o)-s);return e+t*Math.SQRT2*a},n},i.random.bootstrap=function(e,t){var r=e.filter(n.isValid),s=r.length,o=t?i.random.normal(0,t):null,a=function(){return r[~~(Math.random()*s)]+(o?o():0)};return a.samples=function(e){return i.zeros(e).map(a)},a}},509911:(e,t,r)=>{var n=r(842345),i=r(792051);function s(e,t){if(e){var r=t.header;e=(r?r.join(t.delimiter)+"\n":"")+e}return i.dsv(t.delimiter).parse(e)}s.delimiter=function(e){var t={delimiter:e};return function(e,r){return s(e,r?n.extend(r,t):t)}},e.exports=s},455445:(e,t,r)=>{var n=r(509911);e.exports={json:r(61901),topojson:r(552671),treejson:r(239196),dsv:n,csv:n.delimiter(","),tsv:n.delimiter("\t")}},61901:(e,t,r)=>{var n=r(842345);e.exports=function(e,t){var r=n.isObject(e)&&!n.isBuffer(e)?e:JSON.parse(e);return t&&t.property&&(r=n.accessor(t.property)(r)),r}},552671:(e,t,r)=>{var n=r(61901),i=function(e,t){var r=i.topojson;if(null==r)throw Error("TopoJSON library not loaded.");var s,o=n(e,t);if(t&&t.feature){if(s=o.objects[t.feature])return r.feature(o,s).features;throw Error("Invalid TopoJSON object: "+t.feature)}if(t&&t.mesh){if(s=o.objects[t.mesh])return[r.mesh(o,o.objects[t.mesh])];throw Error("Invalid TopoJSON object: "+t.mesh)}throw Error("Missing TopoJSON feature or mesh parameter.")};i.topojson=r(189106),e.exports=i},239196:(e,t,r)=>{var n=r(61901);e.exports=function(e,t){return r=n(e,t),s=(i=t)&&i.children||"children",o=i&&i.parent||"parent",a=[],function e(t,r){t[o]=r,a.push(t);var n=t[s];if(n)for(var i=0;i<n.length;++i)e(n[i],t)}(r,null),a.root=r,a;var r,i,s,o,a}},201362:(e,t,r)=>{var n=r(842345),i=/^([A-Za-z]+:)?\/\//,s="file://";function o(e,t){return o.loader(e,t)}function a(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function c(e,t){return null!=e&&0===e.lastIndexOf(t,0)}o.loader=function(e,t){var r,n=t||function(e){throw e};try{r=o.sanitizeUrl(e)}catch(e){return void n(e)}if(r)return o.useXHR?o.xhr(r,e,t):c(r,s)?o.file(r.slice(7),e,t):r.indexOf("://")<0?o.file(r,e,t):o.http(r,e,t);n("Invalid URL: "+e.url)},o.sanitizeUrl=function(e){var t=e.url;if(!t&&e.file)return s+e.file;if(e.baseURL&&!i.test(t)&&(c(t,"/")||"/"===e.baseURL[e.baseURL.length-1]||(t="/"+t),t=e.baseURL+t),!o.useXHR&&c(t,"//")&&(t=(e.defaultProtocol||"http")+":"+t),e.domainWhiteList){var n,a;if(o.useXHR){var u=document.createElement("a");u.href=t,""===u.host&&(u.href=u.href),n=u.hostname.toLowerCase(),a=window.location.hostname}else{var l=r(986e3).parse(t);n=l.hostname,a=null}if(a!==n&&!e.domainWhiteList.some((function(e){var t=n.length-e.length;return e===n||t>1&&"."===n[t-1]&&n.lastIndexOf(e)===t})))throw"URL is not whitelisted: "+t}return t},o.xhr=function(e,t,r){var i=!!r,s=new XMLHttpRequest;function c(){var e=s.status;!e&&a(s)||e>=200&&e<300||304===e?r(null,s.responseText):r(s,null)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in s)&&/^(http(s)?:)?\/\//.test(e)&&(s=new XDomainRequest),i&&("onload"in s?s.onload=s.onerror=c:s.onreadystatechange=function(){s.readyState>3&&c()}),s.open("GET",e,i),s.setRequestHeader){var u=n.extend({},o.headers,t.headers);for(var l in u)s.setRequestHeader(l,u[l])}if(s.send(),!i&&a(s))return s.responseText},o.file=function(e,t,n){var i=r(935470);if(!n)return i.readFileSync(e,"utf8");i.readFile(e,n)},o.http=function(e,t,i){var s={url:e,encoding:null,gzip:!0,headers:n.extend({},o.headers,t.headers)};if(!i)return r(279725)("GET",e,s).getBody();r(206259)(s,(function(e,t,r){e||200!==t.statusCode?(e=e||"Load failed with response code "+t.statusCode+".",i(e,null)):i(null,r)}
37))},o.useXHR="undefined"!=typeof XMLHttpRequest,o.headers={},e.exports=o},465676:(e,t,r)=>{var n=r(842345),i=r(109009),s=r(455445),o=r(560230).time;function a(e,t){var r=t&&t.type||"json";return e=s[r](e,t),t&&t.parse&&function(e,t){var r,s,a,c,u,l,d=e.length;for(t="auto"===t?i.inferAll(e):n.duplicate(t),s=(r=n.keys(t)).map((function(e){var r=t[e];if(r&&0===r.indexOf("date:")){var n=r.split(/:(.+)?/,2)[1];if(!("'"===n[0]&&"'"===n[n.length-1]||'"'===n[0]&&'"'===n[n.length-1]))throw Error("Format pattern must be quoted: "+n);return n=n.slice(1,-1),n=o(n),function(e){return n.parse(e)}}if(!i.parsers[r])throw Error("Illegal format pattern: "+e+":"+r);return i.parsers[r]})),c=0,l=r.length;c<d;++c)for(a=e[c],u=0;u<l;++u)a[r[u]]=s[u](a[r[u]]);i.annotation(e,t)}(e,t.parse),e}a.formats=s,e.exports=a},108935:(e,t,r)=>{var n=r(842345),i=r(201362),s=r(465676);e.exports=n.keys(s.formats).reduce((function(e,t){return e[t]=function(e,r,o){n.isString(e)&&(e={url:e}),2===arguments.length&&n.isFunction(r)&&(o=r,r=void 0),(r=n.extend({parse:"auto"},r)).type=t;var a=i(e,o?function(e,t){if(e)o(e,null);else try{t=s(t,r),o(null,t)}catch(e){o(e,null)}}:void 0);if(!o)return s(a,r)},e}),{})},109009:(e,t,r)=>{var n=r(842345),i="__types__",s={boolean:n.boolean,integer:n.number,number:n.number,date:n.date,string:function(e){return null==e||""===e?null:e+""}},o={boolean:function(e){return"true"===e||"false"===e||n.isBoolean(e)},integer:function(e){return o.number(e)&&(e=+e)==~~e},number:function(e){return!isNaN(+e)&&!n.isDate(e)},date:function(e){return!isNaN(Date.parse(e))}};function a(e){return n.keys(e)}function c(e){return"["+e+"]"}function u(e,t){var r,s,o;if(e=n.array(e),t=n.$(t),e[i]&&(r=t(e[i]),n.isString(r)))return r;for(s=0,o=e.length;!n.isValid(r)&&s<o;++s)r=t?t(e[s]):e[s];return n.isDate(r)?"date":n.isNumber(r)?"number":n.isBoolean(r)?"boolean":n.isString(r)?"string":null}function l(e,t,r){var i,s,a;e=n.array(e),t=n.$(t);var c=["boolean","integer","number","date"];for(i=0;i<e.length;++i){for(a=t?t(e[i]):e[i],s=0;s<c.length;++s)r&&r.test(a)||!n.isValid(a)||o[c[s]](a)||(c.splice(s,1),s-=1);if(0===c.length)return"string"}return c[0]}u.annotation=function(e,t){if(!t)return e&&e[i]||null;e[i]=t},u.all=function(e,t){if(e.length){var r=t?n.identity:(t=a(e[0]),c);return t.reduce((function(t,n){return t[n]=u(e,r(n)),t}),{})}},u.infer=l,u.inferAll=function(e,t,r){var i=t?n.identity:(t=a(e[0]),c);return t.reduce((function(t,n){return t[n]=l(e,i(n),r),t}),{})},u.parsers=s,e.exports=u},109578:(e,t,r)=>{var n=r(842345),i={version:r(288231).i8,load:r(201362),read:r(465676),type:r(109009),Aggregator:r(253412),groupby:r(595383),bins:r(543061),$bin:r(198376).$bin,histogram:r(198376).histogram,format:r(560230),template:r(416760),time:r(727715)};n.extend(i,n),n.extend(i,r(536601)),n.extend(i,r(274163)),n.extend(i,r(305306)),n.extend(i,r(108935)),n.extend(i.format,r(481667)),i.print={table:i.format.table,summary:i.format.summary},e.exports=i},305306:(e,t,r)=>{var n=r(842345),i=r(109009),s=r(274163),o=e.exports;function a(e,t,r){var n=e&&e.nullh||0,i=s.random.normal(0,1),a=o.mean(t,r),c=o.stdev(t,r)/Math.sqrt(o.count.valid(t,r));if(0===c)return a-n==0?1:0;var u=(a-n)/c;return 2*i.cdf(-Math.abs(u))}function c(e,t,r,i){var s,a=i?t.map(n.$(r)):t,c=i?t.map(n.$(i)):r,u=o.count(a),l=o.count(c),d=Array();if(u!==l)throw Error("Array lengths must match.");for(s=0;s<u;++s)n.isValid(a[s])&&n.isValid(c[s])&&d.push(a[s]-c[s]);return o.z.test(d,e&&e.nullh||0)}
37function u(e,t,r,i){var a=i?t.map(n.$(r)):t,c=i?t.map(n.$(i)):r,u=o.count.valid(a),l=o.count.valid(c),d=s.random.normal(0,1),p=o.mean(a)-o.mean(c)-(e&&e.nullh||0),h=Math.sqrt(o.variance(a)/u+o.variance(c)/l);if(0===h)return 0===p?1:0;var m=p/h;return 2*d.cdf(-Math.abs(m))}o.unique=function(e,t,r){t=n.$(t),r=r||[];var i,s,o,a={};for(s=0,o=e.length;s<o;++s)(i=t?t(e[s]):e[s])in a||(a[i]=1,r.push(i));return r},o.count=function(e){return e&&e.length||0},o.count.valid=function(e,t){t=n.$(t);var r,i,s,o=0;for(i=0,s=e.length;i<s;++i)r=t?t(e[i]):e[i],n.isValid(r)&&(o+=1);return o},o.count.missing=function(e,t){t=n.$(t);var r,i,s=0;for(r=0,i=e.length;r<i;++r)null==(t?t(e[r]):e[r])&&(s+=1);return s},o.count.distinct=function(e,t){t=n.$(t);var r,i,s,o={},a=0;for(i=0,s=e.length;i<s;++i)(r=t?t(e[i]):e[i])in o||(o[r]=1,a+=1);return a},o.count.map=function(e,t){t=n.$(t);var r,i,s,o={};for(i=0,s=e.length;i<s;++i)o[r=t?t(e[i]):e[i]]=r in o?o[r]+1:1;return o},o.median=function(e,t){return t&&(e=e.map(n.$(t))),e=e.filter(n.isValid).sort(n.cmp),o.quantile(e,.5)},o.quartile=function(e,t){t&&(e=e.map(n.$(t))),e=e.filter(n.isValid).sort(n.cmp);var r=o.quantile;return[r(e,.25),r(e,.5),r(e,.75)]},o.quantile=function(e,t,r){void 0===r&&(r=t,t=n.identity),t=n.$(t);var i=(e.length-1)*r+1,s=Math.floor(i),o=+t(e[s-1]),a=i-s;return a?o+a*(t(e[s])-o):o},o.sum=function(e,t){t=n.$(t);for(var r,i=0,s=0,o=e.length;s<o;++s)r=t?t(e[s]):e[s],n.isValid(r)&&(i+=r);return i},o.mean=function(e,t){t=n.$(t);var r,i,s,o,a=0;for(r=0,s=0,i=e.length;r<i;++r)o=t?t(e[r]):e[r],n.isValid(o)&&(a+=(o-a)/++s);return a},o.mean.geometric=function(e,t){t=n.$(t);var r,i,s,o,a=1;for(o=0,r=0,i=e.length;o<i;++o)if(s=t?t(e[o]):e[o],n.isValid(s)){if(s<=0)throw Error("Geometric mean only defined for positive values.");a*=s,++r}return r>0?Math.pow(a,1/r):0},o.mean.harmonic=function(e,t){t=n.$(t);var r,i,s,o,a=0;for(o=0,r=0,i=e.length;o<i;++o)s=t?t(e[o]):e[o],n.isValid(s)&&(a+=1/s,++r);return r/a},o.variance=function(e,t){if(t=n.$(t),!n.isArray(e)||e.length<2)return 0;var r,i,s,o,a=0,c=0;for(i=0,s=0;i<e.length;++i)o=t?t(e[i]):e[i],n.isValid(o)&&(c+=(r=o-a)*(o-(a+=r/++s)));return c/(s-1)},o.stdev=function(e,t){return Math.sqrt(o.variance(e,t))},o.modeskew=function(e,t){var r=o.mean(e,t),n=o.median(e,t),i=o.stdev(e,t);return 0===i?0:(r-n)/i},o.min=function(e,t){return o.extent(e,t)[0]},o.max=function(e,t){return o.extent(e,t)[1]},o.extent=function(e,t){t=n.$(t);var r,i,s,o,a=e.length;for(o=0;o<a;++o)if(s=t?t(e[o]):e[o],n.isValid(s)){r=i=s;break}for(;o<a;++o)s=t?t(e[o]):e[o],n.isValid(s)&&(s<r&&(r=s),s>i&&(i=s));return[r,i]},o.extent.index=function(e,t){t=n.$(t);var r,i,s,o,a=-1,c=-1,u=e.length;for(o=0;o<u;++o)if(s=t?t(e[o]):e[o],n.isValid(s)){r=i=s,a=c=o;break}for(;o<u;++o)s=t?t(e[o]):e[o],n.isValid(s)&&(s<r&&(r=s,a=o),s>i&&(i=s,c=o));return[a,c]},o.dot=function(e,t,r){var i,s,o=0;if(r)for(t=n.$(t),r=n.$(r),i=0;i<e.length;++i)(s=t(e[i])*r(e[i]))==s&&(o+=s);else{if(e.length!==t.length)throw Error("Array lengths must match.");for(i=0;i<e.length;++i)(s=e[i]*t[i])==s&&(o+=s)}return o},o.dist=function(e,t,r,i){var s,o,a=n.isFunction(r)||n.isString(r),c=e,u=a?e:t,l=a?i:r,d=2===l||null==l,p=e.length,h=0;for(a&&(t=n.$(t),r=n.$(r)),o=0;o<p;++o)s=a?t(c[o])-r(u[o]):c[o]-u[o],h+=d?s*s:Math.pow(Math.abs(s),l);return d?Math.sqrt(h):Math.pow(h,1/l)},o.cohensd=function(e,t,r){var i=r?e.map(n.$(t)):e,s=r?e.map(n.$(r)):t,a=o.mean(i),c=o.mean(s),u=o.count.valid(i),l=o.count.valid(s);if(u+l-2<=0)return 0;var d=o.variance(i),p=o.variance(s),h=Math.sqrt(((u-1)*d+(l-1)*p)/(u+l-2));return 0===h?0:(a-c)/h},o.covariance=function(e,t,r){var i,s,a,c,u,l=r?e.map(n.$(t)):e,d=r?e.map(n.$(r)):t,p=l.length,h=o.mean(l),m=o.mean(d),f=0,g=0;if(p!==d.length)throw Error("Input lengths must match.");for(i=0;i<p;++i)if(s=l[i],c=n.isValid(s),a=d[i],u=n.isValid(a),c&&u)f+=(s-h)*(a-m),++g;else if(c||u)throw Error("Valid values must align.");return f/(g-1)},o.rank=function(e,t){t=n.$(t)||n.identity;var r,i,s,o=e.map((function(e,r){return{idx:r,val:t(e)}})).sort(n.comparator("val")),a=e.length,c=Array(a),u=-1,l={};for(r=0;r<a;++r){if(i=o[r].val,u<0&&l===i)u=r-1;else if(u>-1&&l!==i){for(s=1+(r-1+u)/2;u<r;++u)c[o[u].idx]=s;u=-1}c[o[r].idx]=r+1,l=i}if(u>-1)for(s=1+(a-1+u)/2;u<a;++u)c[o[u].idx]=s;return c},o.cor=function(e,t,r){var i=r;r=i?e.map(n.$(r)):t,t=i?e.map(n.$(t)):e;var s=o.dot(t,r),a=o.mean(t),c=o.mean(r),u=o.stdev(t),l=o.stdev(r),d=e.length;return(s-d*a*c)/((d-1)*u*l)},o.cor.rank=function(e,t,r){var n,i,s,a=r?o.rank(e,t):o.rank(e),c=r?o.rank(e,r):o.rank(t),u=e.length;for(n=0,i=0;n<u;++n)i+=(s=a[n]-c[n])*s;return 1-6*i/(u*(u*u-1))},o.cor.dist=function(e,t,r){var i,s,a,c,u=r?e.map(n.$(t)):e,l=r?e.map(n.$(r)):t,d=o.dist.mat(u),p=o.dist.mat(l),h=d.length;for(i=0,s=0,a=0,c=0;i<h;++i)s+=d[i]*d[i],a+=p[i]*p[i],c+=d[i]*p[i];return Math.sqrt(c/Math.sqrt(s*a))},o.linearRegression=function(e,t,r){var i,s,a=r?e.map(n.$(t)):e,c=r?e.map(n.$(r)):t,u=a.length,l=o.covariance(a,c),d=o.stdev(a),p=o.stdev(c),h=l/(d*d),m=o.mean(c)-h*o.mean(a),f={slope:h,intercept:m,R:l/(d*p),rss:0};for(s=0;s<u;++s)n.isValid(a[s])&&n.isValid(c[s])&&(i=h*a[s]+m-c[s],f.rss+=i*i);return f},o.bootstrap={},o.bootstrap.ci=function(e,t,r,i,a){var c,u,l,d,p,h,m;for(n.isFunction(t)||n.isString(t)?(c=e.map(n.$(t)),u=r,l=i,d=a):(c=e,u=t,l=r,d=i),u=u?+u:1e3,l=l||.05,p=s.random.bootstrap(c,d),m=0,h=Array(u);m<u;++m)h[m]=o.mean(p.samples(c.length));return h.sort(n.numcmp),[o.quantile(h,l/2),o.quantile(h,1-l/2)]},o.z={},o.z.ci=function(e,t,r){var i=e,a=t;(n.isFunction(t)||n.isString(t))&&(i=e.map(n.$(t)),a=r);var c=.05===(a=a||.05)?1.96:s.random.normal(0,1).icdf(1-a/2),u=o.mean(i),l=o.stdev(i)/Math.sqrt(o.count.valid(i));return[u-c*l,u+c*l]},o.z.test=function(e,t,r,i){return n.isFunction(r)||n.isString(r)?(i&&i.paired?c:u)(i,e,t,r):n.isArray(t)?(r&&r.paired?c:u)(r,e,t):n.isFunction(t)||n.isString(t)?a(r,e,t):a(t,e)},o.dist.mat=function(e){var t,r,n,i=e.length,o=i*i,a=Array(o),c=s.zeros(i),u=0;for(r=0;r<i;++r)for(a[r*i+r]=0,n=r+1;n<i;++n)a[r*i+n]=t=Math.abs(e[r]-e[n]),a[n*i+r]=t,c[r]+=t,c[n]+=t;for(r=0;r<i;++r)u+=c[r],c[r]/=i;for(u/=o,r=0;r<i;++r)for(n=r;n<i;++n)a[r*i+n]+=u-c[r]-c[n],a[n*i+r]=a[r*i+n];return a},o.entropy=function(e,t){t=n.$(t);var r,i,s=0,o=0,a=e.length;for(r=0;r<a;++r)s+=t?t(e[r]):e[r];if(0===s)return 0;for(r=0;r<a;++r)(i=(t?t(e[r]):e[r])/s)&&(o+=i*Math.log(i));return-o/Math.LN2},o.mutual=function(e,t,r,i){var s,o,a,c=i?e.map(n.$(t)):e,u=i?e.map(n.$(r)):t,l=i?e.map(n.$(i)):r,d={},p={},h=l.length,m=0,f=0,g=0;for(a=0;a<h;++a)d[c[a]]=0,p[u[a]]=0;for(a=0;a<h;++a)d[c[a]]+=l[a],p[u[a]]+=l[a],m+=l[a];for(o=1/(m*Math.LN2),a=0;a<h;
37++a)0!==l[a]&&(s=m*l[a]/(d[c[a]]*p[u[a]]),f+=l[a]*o*Math.log(s),g+=l[a]*o*Math.log(l[a]/m));return[f,1+f/g]},o.mutual.info=function(e,t,r,n){return o.mutual(e,t,r,n)[0]},o.mutual.dist=function(e,t,r,n){return o.mutual(e,t,r,n)[1]},o.profile=function(e,t){var r,s,a,c,u,l=0,d=0,p=0,h=0,m=null,f=null,g=0,y=[],b={};for(a=0;a<e.length;++a)b[c=t?t(e[a]):e[a]]=c in b?b[c]+1:(h+=1,1),null==c?++p:n.isValid(c)&&(u="string"==typeof c?c.length:c,(null===m||u<m)&&(m=u),(null===f||u>f)&&(f=u),g+=(r=u-l)*(u-(l+=r/++d)),y.push(u));return g/=d-1,s=Math.sqrt(g),y.sort(n.cmp),{type:i(e,t),unique:b,count:e.length,valid:d,missing:p,distinct:h,min:m,max:f,mean:l,stdev:s,median:c=o.quantile(y,.5),q1:o.quantile(y,.25),q3:o.quantile(y,.75),modeskew:0===s?0:(l-c)/s}},o.summary=function(e,t){var r=(t=t||n.keys(e[0])).map((function(t){var r=o.profile(e,n.$(t));return r.field=t,r}));return r.__summary__=!0,r}},416760:(e,t,r)=>{var n=r(842345),i=r(560230),s={formats:[],format_map:{},truncate:n.truncate,pad:n.pad,day:i.day,month:i.month,quarter:i.quarter,utcQuarter:i.utcQuarter};function o(e){var t=a(e,"d");return t="var __t; return "+t+";",new Function("d",t).bind(s)}function a(e,t,r){t=t||"obj";var i=0,s="'",a=c;return e.replace(a,(function(a,c,d){return s+=e.slice(i,d).replace(p,h),i=d+a.length,c&&(s+="'\n+((__t=("+function(e,t,r){var i=e.match(u),s=i.shift().trim(),a=!0;function c(e){return e=e||"",a?(a=!1,p="String("+p+")"+e):p+=e,p}function d(e){var t=v[0];if(!("'"===t[0]&&"'"===t[t.length-1]||'"'===t[0]&&'"'===t[t.length-1]))throw Error("Format pattern must be quoted: "+t);t=t.slice(1,-1),g=m(t,e),a=!1,p="this.formats["+g+"]("+("number"===e?p:"(typeof "+p+'==="number"?new Date('+p+"):"+p+")")+")"}r&&(r[s]=1);for(var p=o.property(t,s),h=0;h<i.length;++h){var f,g,y,b=i[h],v=null;switch((f=b.indexOf(":"))>0&&(b=b.slice(0,f),v=i[h].slice(f+1).match(l).map((function(e){return e.trim()}))),b=b.trim()){case"length":c(".length");break;case"lower":c(".toLowerCase()");break;case"upper":c(".toUpperCase()");break;case"lower-locale":c(".toLocaleLowerCase()");break;case"upper-locale":c(".toLocaleUpperCase()");break;case"trim":c(".trim()");break;case"left":c(".slice(0,"+(g=n.number(v[0]))+")");break;case"right":c(".slice(-"+(g=n.number(v[0]))+")");break;case"mid":y=(g=n.number(v[0]))+n.number(v[1]),c(".slice(+"+g+","+y+")");break;case"slice":c(".slice("+(g=n.number(v[0]))+(v.length>1?","+n.number(v[1]):"")+")");break;case"truncate":g=n.number(v[0]),y="left"!==(y=v[1])&&"middle"!==y&&"center"!==y?"right":y,p="this.truncate("+c()+","+g+",'"+y+"')";break;case"pad":g=n.number(v[0]),y="left"!==(y=v[1])&&"middle"!==y&&"center"!==y?"right":y,p="this.pad("+c()+","+g+",'"+y+"')";break;case"number":d("number");break;case"time":d("time");break;case"time-utc":d("utc");break;case"month":p="this.month("+p+")";break;case"month-abbrev":p="this.month("+p+",true)";break;case"day":p="this.day("+p+")";break;case"day-abbrev":p="this.day("+p+",true)";break;case"quarter":p="this.quarter("+p+")";break;case"quarter-utc":p="this.utcQuarter("+p+")";break;default:throw Error("Unrecognized template filter: "+b)}}return p}(c,t,r)+"))==null?'':__t)+\n'"),a})),s+"'"}o.source=a,o.context=s,o.format=function(e,t){return s.formats[m(e,t)]},e.exports=o,o.clearFormatCache=function(){s.formats=[],s.format_map={}},o.property=function(e,t){return e+"["+n.field(t).map(n.str).join("][")+"]"};var c=/\{\{(.+?)\}\}|$/g,u=/(?:"[^"]*"|\'[^\']*\'|[^\|"]+|[^\|\']+)+/g,l=/(?:"[^"]*"|\'[^\']*\'|[^,"]+|[^,\']+)+/g,d={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},p=/\\|'|\r|\n|\u2028|\u2029/g;function h(e){return"\\"+d[e]}function m(e,t){var r=t+":"+e;if(null==s.format_map[r]){var n=i[t](e),o=s.formats.length;return s.formats.push(n),s.format_map[r]=o,o}return s.format_map[r]}},727715:(e,t,r)=>{var n=r(642800),i=new Date,s=new Date(0,0,1).setFullYear(0),o=new Date(Date.UTC(0,0,1)).setUTCFullYear(0);function a(e){return i.setTime(+e),i}function c(e,t,r,n,i,s){var o={type:e,date:t,unit:r};return n?o.step=n:o.minstep=1,null!=i&&(o.min=i),null!=s&&(o.max=s),o}function u(e,t,r,n,i,s){return c(e,(function(e){return t.offset(r,e)}),(function(e){return t.count(r,e)}),n,i,s)}var l=[u("second",n.second,s),u("minute",n.minute,s),u("hour",n.hour,s),u("day",n.day,s,[1,7]),u("month",n.month,s,[1,3,6]),u("year",n.year,s),c("seconds",(function(e){return new Date(1970,0,1,0,0,e)}),(function(e){return a(e).getSeconds()}),null,0,59),c("minutes",(function(e){return new Date(1970,0,1,0,e)}),(function(e){return a(e).getMinutes()}),null,0,59),c("hours",(function(e){return new Date(1970,0,1,e)}),(function(e){return a(e).getHours()}),null,0,23),c("weekdays",(function(e){return new Date(1970,0,4+e)}),(function(e){return a(e).getDay()}
37),[1],0,6),c("dates",(function(e){return new Date(1970,0,e)}),(function(e){return a(e).getDate()}),[1],1,31),c("months",(function(e){return new Date(1970,e%12,1)}),(function(e){return a(e).getMonth()}),[1],0,11)],d=[u("second",n.utcSecond,o),u("minute",n.utcMinute,o),u("hour",n.utcHour,o),u("day",n.utcDay,o,[1,7]),u("month",n.utcMonth,o,[1,3,6]),u("year",n.utcYear,o),c("seconds",(function(e){return new Date(Date.UTC(1970,0,1,0,0,e))}),(function(e){return a(e).getUTCSeconds()}),null,0,59),c("minutes",(function(e){return new Date(Date.UTC(1970,0,1,0,e))}),(function(e){return a(e).getUTCMinutes()}),null,0,59),c("hours",(function(e){return new Date(Date.UTC(1970,0,1,e))}),(function(e){return a(e).getUTCHours()}),null,0,23),c("weekdays",(function(e){return new Date(Date.UTC(1970,0,4+e))}),(function(e){return a(e).getUTCDay()}),[1],0,6),c("dates",(function(e){return new Date(Date.UTC(1970,0,e))}),(function(e){return a(e).getUTCDate()}),[1],1,31),c("months",(function(e){return new Date(Date.UTC(1970,e%12,1))}),(function(e){return a(e).getUTCMonth()}),[1],0,11)],p=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];function h(e){var t,r,n={};for(t=0,r=e.length;t<r;++t)n[e[t].type]=e[t];return n.find=function(t,r,n){return function(e,t,r,n){var i,s,o,a=p[0];for(i=1,s=p.length;i<s;++i)if(t>(a=p[i])[0]){if((o=t/a[0])>n)return e[p[i-1][1]];if(o>=r)return e[a[1]]}return e[p[s-1][1]]}(e,t,r,n)},n}e.exports=h(l),e.exports.utc=h(d)},842345:e=>{var t=e.exports,r="__name__";t.namedfunc=function(e,t){return t[r]=e,t},t.name=function(e){return null==e?null:e[r]},t.identity=function(e){return e},t.true=t.namedfunc("true",(function(){return!0})),t.false=t.namedfunc("false",(function(){return!1})),t.duplicate=function(e){return JSON.parse(JSON.stringify(e))},t.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.extend=function(e){for(var t,r,n=1,i=arguments.length;n<i;++n)for(r in t=arguments[n])e[r]=t[r];return e},t.length=function(e){return null!=e&&null!=e.length?e.length:null},t.keys=function(e){var t,r=[];for(t in e)r.push(t);return r},t.vals=function(e){var t,r=[];for(t in e)r.push(e[t]);return r},t.toMap=function(e,r){return(r=t.$(r))?e.reduce((function(e,t){return e[r(t)]=1,e}),{}):e.reduce((function(e,t){return e[t]=1,e}),{})},t.keystr=function(e){var t=e.length;if(!t)return"";for(var r=String(e[0]),n=1;n<t;++n)r+="|"+String(e[n]);return r};var n=Object.prototype.toString;t.isObject=function(e){return e===Object(e)},t.isFunction=function(e){return"[object Function]"===n.call(e)},t.isString=function(e){return"string"==typeof value||"[object String]"===n.call(e)},t.isArray=Array.isArray||function(e){return"[object Array]"===n.call(e)},t.isNumber=function(e){return"number"==typeof e||"[object Number]"===n.call(e)},t.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"==n.call(e)},t.isDate=function(e){return"[object Date]"===n.call(e)},t.isValid=function(e){return null!=e&&e==e},t.isBuffer="function"==typeof Buffer&&Buffer.isBuffer||t.false,t.number=function(e){return null==e||""===e?null:+e},t.boolean=function(e){return null==e||""===e?null:"false"!==e&&!!e},t.date=function(e,t){var r=t||Date;return null==e||""===e?null:r.parse(e)},t.array=function(e){return null!=e?t.isArray(e)?e:[e]:[]},t.str=function(e){return t.isArray(e)?"["+e.map(t.str)+"]":t.isObject(e)||t.isString(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e};var i=/\[(.*?)\]|[^.\[]+/g;function s(e,t){var r,n="";for(r=0;r<e;++r)n+=t;return n}function o(e,t,r){var n=0,i=e.split(a);return(e=r?(i=i.reverse()).filter((function(e){return(n+=e.length)<=t})).reverse():i.filter((function(e){return(n+=e.length)<=t}))).length?e.join("").trim():i[0].slice(0,t)}t.field=function(e){return String(e).match(i).map((function(e){return"["!==e[0]?e:"'"!==e[1]&&'"'!==e[1]?e.slice(1,-1):e.slice(2,-2).replace(/\\(["'])/g,"$1")}))},t.accessor=function(e){return null==e||t.isFunction(e)?e:t.namedfunc(e,Function("x","return x["+t.field(e).map(t.str).join("][")+"];"))},t.$=t.accessor,t.mutator=function(e){var r;return t.isString(e)&&(r=t.field(e)).length>1?function(e,t){for(var n=0;n<r.length-1;++n)e=e[r[n]];e[r[n]]=t}:function(t,r){t[e]=r}},t.$func=function(e,r){return function(n){n=t.$(n)||t.identity;
37var i=e+(t.name(n)?"_"+t.name(n):"");return t.namedfunc(i,(function(e){return r(n(e))}))}},t.$valid=t.$func("valid",t.isValid),t.$length=t.$func("length",t.length),t.$in=function(e,r){e=t.$(e);var n=t.isArray(r)?t.toMap(r):r;return function(t){return!!n[e(t)]}},t.comparator=function(e){var r=[];return void 0===e&&(e=[]),e=t.array(e).map((function(e){var n=1;return"-"===e[0]?(n=-1,e=e.slice(1)):"+"===e[0]&&(n=1,e=e.slice(1)),r.push(n),t.accessor(e)})),function(n,i){var s,o,a,c;for(s=0,o=e.length;s<o;++s)if(a=e[s],c=t.cmp(a(n),a(i)))return c*r[s];return 0}},t.cmp=function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0)},t.numcmp=function(e,t){return e-t},t.stablesort=function(e,t,r){var n=e.reduce((function(e,t,n){return e[r(t)]=n,e}),{});return e.sort((function(e,i){var s=t(e),o=t(i);return s<o?-1:s>o?1:n[r(e)]-n[r(i)]})),e},t.permute=function(e){for(var t,r,n=e.length;n;)r=Math.floor(Math.random()*n--),t=e[n],e[n]=e[r],e[r]=t},t.pad=function(e,t,r,n){n=n||" ";var i=t-e.length;if(i<=0)return e;switch(r){case"left":return s(i,n)+e;case"middle":case"center":return s(Math.floor(i/2),n)+e+s(Math.ceil(i/2),n);default:return e+s(i,n)}},t.truncate=function(e,t,r,n,i){var s=e.length;if(s<=t)return e;i=void 0!==i?String(i):"…";var a=Math.max(0,t-i.length);switch(r){case"left":return i+(n?o(e,a,1):e.slice(s-a));case"middle":case"center":var c=Math.ceil(a/2),u=Math.floor(a/2);return(n?o(e,c):e.slice(0,c))+i+(n?o(e,u,1):e.slice(s-u));default:return(n?o(e,a):e.slice(0,a))+i}};var a=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/},314343:function(e){e.exports=function(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:i;return e===i?r:e}},483427:e=>{function t(e,t,r,n){var i=function(e){return null==e||"number"==typeof e||"boolean"==typeof e}(n)?n:r(n),s=t.get(i);return void 0===s&&(s=e.call(this,n),t.set(i,s)),s}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return void 0===s&&(s=e.apply(this,n),t.set(i,s)),s}function n(e,t,r,n,i){return r.bind(t,e,n,i)}function i(e,i){return n(e,this,1===e.length?t:r,i.cache.create(),i.serializer)}function s(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(e){return e in this.cache},o.prototype.get=function(e){return this.cache[e]},o.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new o}};e.exports=function(e,t){var r=t&&t.cache?t.cache:a,n=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:i)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},754155:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EsriCedarChart:()=>vt,defineCustomElement:()=>wt});const n={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,formAssociated:!1,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,
38vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0,experimentalSlotFixes:!1},i="app";let s,o,a,c=0,u=!1,l=!1,d=!1,p=!1,h=null,m=0,f=!1;const g=(e,t="")=>{if(n.profile&&performance.mark){const r=`st:${e}:${t}:${c++}`;return performance.mark(r),()=>performance.measure(`[Stencil] ${e}() <${t}>`,r)}return()=>{}},y="s-id",b="sty-id",v="c-id",w="http://www.w3.org/1999/xlink",S=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],E={},T=e=>"object"==(e=typeof e)||"function"===e,I=(e,t,...r)=>{let i=null,s=null,o=null,a=!1,c=!1;const u=[],l=t=>{for(let r=0;r<t.length;r++)i=t[r],Array.isArray(i)?l(i):null!=i&&"boolean"!=typeof i&&((a="function"!=typeof e&&!T(i))?i=String(i):n.isDev&&"function"!=typeof e&&void 0===i.$flags$&&Je("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),a&&c?u[u.length-1].$text$+=i:u.push(a?C(null,i):i),c=a)};if(l(r),t&&(n.isDev&&"input"===e&&k(t),n.vdomKey&&t.key&&(s=t.key),n.slotRelocation&&t.name&&(o=t.name),n.vdomClass)){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}if(n.isDev&&u.some(O)&&Je("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),n.vdomFunctional&&"function"==typeof e)return e(null===t?{}:t,u,_);const d=C(e,null);return d.$attrs$=t,u.length>0&&(d.$children$=u),n.vdomKey&&(d.$key$=s),n.slotRelocation&&(d.$name$=o),d},C=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return n.vdomAttribute&&(r.$attrs$=null),n.vdomKey&&(r.$key$=null),n.slotRelocation&&(r.$name$=null),r},A={},O=e=>e&&e.$tag$===A,_={forEach:(e,t)=>
38e.map(D).forEach(t),map:(e,t)=>e.map(D).map(t).map(P)},D=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),P=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),I(e.vtag,t,...e.vchildren||[])}const t=C(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},k=e=>{const t=Object.keys(e),r=t.indexOf("value");if(-1===r)return;const n=t.indexOf("type"),i=t.indexOf("min"),s=t.indexOf("max"),o=t.indexOf("step");(r<n||r<i||r<s||r<o)&&Qe('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},x=(e,t,r,i,s,o,a)=>{let c,u,l,d;if(1===o.nodeType){for(c=o.getAttribute(v),c&&(u=c.split("."),u[0]!==a&&"0"!==u[0]||(l={$flags$:0,$hostId$:u[0],$nodeId$:u[1],$depth$:u[2],$index$:u[3],$tag$:o.tagName.toLowerCase(),$elm$:o,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},t.push(l),o.removeAttribute(v),e.$children$||(e.$children$=[]),e.$children$[l.$index$]=l,e=l,i&&"0"===l.$depth$&&(i[l.$index$]=l.$elm$))),d=o.childNodes.length-1;d>=0;d--)x(e,t,r,i,s,o.childNodes[d],a);if(o.shadowRoot)for(d=o.shadowRoot.childNodes.length-1;d>=0;d--)x(e,t,r,i,s,o.shadowRoot.childNodes[d],a)}else if(8===o.nodeType)u=o.nodeValue.split("."),u[1]!==a&&"0"!==u[1]||(c=u[0],l={$flags$:0,$hostId$:u[1],$nodeId$:u[2],$depth$:u[3],$index$:u[4],$elm$:o,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===c?(l.$elm$=o.nextSibling,l.$elm$&&3===l.$elm$.nodeType&&(l.$text$=l.$elm$.textContent,t.push(l),o.remove(),e.$children$||(e.$children$=[]),e.$children$[l.$index$]=l,i&&"0"===l.$depth$&&(i[l.$index$]=l.$elm$))):l.$hostId$===a&&("s"===c?(l.$tag$="slot",u[5]?o["s-sn"]=l.$name$=u[5]:o["s-sn"]="",o["s-sr"]=!0,n.shadowDom&&i&&(l.$elm$=nt.createElement(l.$tag$),l.$name$&&l.$elm$.setAttribute("name",l.$name$),o.parentNode.insertBefore(l.$elm$,o),o.remove(),"0"===l.$depth$&&(i[l.$index$]=l.$elm$)),r.push(l),e.$children$||(e.$children$=[]),e.$children$[l.$index$]=l):"r"===c&&(n.shadowDom&&i?o.remove():n.slotRelocation&&(s["s-cr"]=o,o["s-cn"]=!0))));else if(e&&"style"===e.$tag$){const t=C(null,o.textContent);t.$elm$=o,t.$index$="0",e.$children$=[t]}},R=(e,t)=>{if(1===e.nodeType){let r=0;for(;r<e.childNodes.length;r++)R(e.childNodes[r],t);if(e.shadowRoot)for(r=0;r<e.shadowRoot.childNodes.length;r++)R(e.shadowRoot.childNodes[r],t)}else if(8===e.nodeType){const r=e.nodeValue.split(".");"o"===r[0]&&(t.set(r[1]+"."+r[2],e),e.nodeValue="",e["s-en"]=r[3])}},U=(e,t,r)=>{const i=(e=>n.lazyLoad?qe(e).$hostElement$:e)(e);return{emit:e=>(n.isDev&&!i.isConnected&&Qe(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),M(i,t,{bubbles:!!(4&r),composed:!!(2&r),cancelable:!!(1&r),detail:e}))}},M=(e,t,r)=>{const n=st.ce(t,r);return e.dispatchEvent(n),n},N=new WeakMap,j=(e,t,r)=>{var i;const s=$(t,r),o=et.get(s);if(!n.attachStyles)return s;if(e=11===e.nodeType?e:nt,o)if("string"==typeof o){e=e.head||e;let r,a=N.get(e);if(a||N.set(e,a=new Set),!a.has(s)){if(n.hydrateClientSide&&e.host&&(r=e.querySelector(`[${b}="${s}"]`)))r.innerHTML=o;else{r=nt.createElement("style"),r.innerHTML=o;const t=null!==(i=st.$nonce$)&&void 0!==i?i:function(e){var t,r,n;return null!==(n=null===(r=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===r?void 0:r.getAttribute("content"))&&void 0!==n?n:void 0}(nt);null!=t&&r.setAttribute("nonce",t),(n.hydrateServerSide||n.hotModuleReplacement)&&r.setAttribute(b,s),e.insertBefore(r,e.querySelector("link"))}4&t.$flags$&&(r.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),a&&a.add(s)}}else n.constructableCSS&&!e.adoptedStyleSheets.includes(o)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return s},$=(e,t)=>"sc-"+(n.mode&&t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$),F=(e,t,r,i,s,o)=>{if(r!==i){let a=Ke(e,t),c=t.toLowerCase();if(n.vdomClass&&"class"===t){const t=e.classList,n=L(r),s=L(i);t.remove(...n.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!n.includes(e))))}else if(n.vdomStyle&&"style"===t){if(n.updatable)for(const t in r)i&&null!=i[t]||(!n.hydrateServerSide&&t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in i)r&&i[t]===r[t]||(!n.hydrateServerSide&&t.includes("-")?e.style.setProperty(t,i[t]):e.style[t]=i[t])}else if(n.vdomKey&&"key"===t);else if(n.vdomRef&&"ref"===t)i&&i(e);else if(!n.vdomListener||(n.lazyLoad?a:e.__lookupSetter__(t))||"o"!==t[0]||"n"!==t[1]){if(n.vdomPropOrAttr){const u=T(i);if((a||u&&null!==i)&&!s)try{if(e.tagName.includes("-"))e[t]=i;else{const n=null==i?"":i;"list"===t?a=!1:null!=r&&e[t]==n||(e[t]=n)}}catch(e){}let l=!1;
38n.vdomXlink&&c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,l=!0),null==i||!1===i?!1===i&&""!==e.getAttribute(t)||(n.vdomXlink&&l?e.removeAttributeNS(w,t):e.removeAttribute(t)):(!a||4&o||s)&&!u&&(i=!0===i?"":i,n.vdomXlink&&l?e.setAttributeNS(w,t,i):e.setAttribute(t,i))}}else if(t="-"===t[2]?t.slice(3):Ke(rt,c)?c.slice(2):c[2]+t.slice(3),r||i){const n=t.endsWith(H);t=t.replace(B,""),r&&st.rel(e,t,r,n),i&&st.ael(e,t,i,n)}}},G=/\s/,L=e=>e?e.split(G):[],H="Capture",B=new RegExp(H+"$"),W=(e,t,r,i)=>{const s=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,o=e&&e.$attrs$||E,a=t.$attrs$||E;if(n.updatable)for(i in o)i in a||F(s,i,o[i],void 0,r,t.$flags$);for(i in a)F(s,i,o[i],a[i],r,t.$flags$)},q=(e,t,r,i)=>{const c=t.$children$[r];let l,h,m,f=0;if(n.slotRelocation&&!u&&(d=!0,"slot"===c.$tag$&&(s&&i.classList.add(s+"-s"),c.$flags$|=c.$children$?2:1)),n.isDev&&c.$elm$&&Je(`The JSX ${null!==c.$text$?`"${c.$text$}" text`:`"${c.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),n.vdomText&&null!==c.$text$)l=c.$elm$=nt.createTextNode(c.$text$);else if(n.slotRelocation&&1&c.$flags$)l=c.$elm$=n.isDebug||n.hydrateServerSide?oe(c):nt.createTextNode("");else{if(n.svg&&!p&&(p="svg"===c.$tag$),l=c.$elm$=n.svg?nt.createElementNS(p?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",n.slotRelocation&&2&c.$flags$?"slot-fb":c.$tag$):nt.createElement(n.slotRelocation&&2&c.$flags$?"slot-fb":c.$tag$),n.svg&&p&&"foreignObject"===c.$tag$&&(p=!1),n.vdomAttribute&&W(null,c,p),(n.shadowDom||n.scoped)&&null!=s&&l["s-si"]!==s&&l.classList.add(l["s-si"]=s),c.$children$)for(f=0;f<c.$children$.length;++f)h=q(e,c,f,l),h&&l.appendChild(h);n.svg&&("svg"===c.$tag$?p=!1:"foreignObject"===l.tagName&&(p=!0))}return l["s-hn"]=a,n.slotRelocation&&3&c.$flags$&&(l["s-sr"]=!0,l["s-cr"]=o,l["s-sn"]=c.$name$||"",m=e&&e.$children$&&e.$children$[r],m&&m.$tag$===c.$tag$&&e.$elm$&&(n.experimentalSlotFixes?V(e.$elm$):K(e.$elm$,!1))),l},V=e=>{st.$flags$|=1;const t=e.closest(a.toLowerCase());if(null!=t){const r=Array.from(t.childNodes).find((e=>e["s-cr"])),n=Array.from(e.childNodes);for(const e of r?n.reverse():n)null!=e["s-sh"]&&(t.insertBefore(e,null!=r?r:null),e["s-sh"]=void 0,d=!0)}st.$flags$&=-2},K=(e,t)=>{st.$flags$|=1;const r=e.childNodes;for(let e=r.length-1;e>=0;e--){const n=r[e];n["s-hn"]!==a&&n["s-ol"]&&(Z(n).insertBefore(n,Q(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,d=!0),t&&K(n,t)}st.$flags$&=-2},z=(e,t,r,i,s,o)=>{let c,u=n.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e;for(n.shadowDom&&u.shadowRoot&&u.tagName===a&&(u=u.shadowRoot);s<=o;++s)i[s]&&(c=q(null,r,s,e),c&&(i[s].$elm$=c,u.insertBefore(c,n.slotRelocation?Q(t):t)))},Y=(e,t,r)=>{for(let i=t;i<=r;++i){const t=e[i];if(t){const e=t.$elm$;ie(t),e&&(n.slotRelocation&&(l=!0,e["s-ol"]?e["s-ol"].remove():K(e,!0)),e.remove())}}},J=(e,t,r=!1)=>e.$tag$===t.$tag$&&(n.slotRelocation&&"slot"===e.$tag$?e.$name$===t.$name$:!(n.vdomKey&&!r)||e.$key$===t.$key$),Q=e=>e&&e["s-ol"]||e,Z=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,X=(e,t,r=!1)=>{const i=t.$elm$=e.$elm$,s=e.$children$,o=t.$children$,a=t.$tag$,c=t.$text$;let l;n.vdomText&&null!==c?n.vdomText&&n.slotRelocation&&(l=i["s-cr"])?l.parentNode.textContent=c:n.vdomText&&e.$text$!==c&&(i.data=c):(n.svg&&(p="svg"===a||"foreignObject"!==a&&p),(n.vdomAttribute||n.reflect)&&(n.slot&&"slot"===a&&!u?n.experimentalSlotFixes&&e.$name$!==t.$name$&&(t.$elm$["s-sn"]=t.$name$||"",V(t.$elm$.parentElement)):W(e,t,p)),n.updatable&&null!==s&&null!==o?((e,t,r,i,s=!1)=>{let o,a,c=0,u=0,l=0,d=0,p=t.length-1,h=t[0],m=t[p],f=i.length-1,g=i[0],y=i[f];for(;c<=p&&u<=f;)if(null==h)h=t[++c];else if(null==m)m=t[--p];else if(null==g)g=i[++u];else if(null==y)y=i[--f];else if(J(h,g,s))X(h,g,s),h=t[++c],g=i[++u];else if(J(m,y,s))X(m,y,s),m=t[--p],y=i[--f];else if(J(h,y,s))!n.slotRelocation||"slot"!==h.$tag$&&"slot"!==y.$tag$||K(h.$elm$.parentNode,!1),X(h,y,s),e.
38insertBefore(h.$elm$,m.$elm$.nextSibling),h=t[++c],y=i[--f];else if(J(m,g,s))!n.slotRelocation||"slot"!==h.$tag$&&"slot"!==y.$tag$||K(m.$elm$.parentNode,!1),X(m,g,s),e.insertBefore(m.$elm$,h.$elm$),m=t[--p],g=i[++u];else{if(l=-1,n.vdomKey)for(d=c;d<=p;++d)if(t[d]&&null!==t[d].$key$&&t[d].$key$===g.$key$){l=d;break}n.vdomKey&&l>=0?(a=t[l],a.$tag$!==g.$tag$?o=q(t&&t[u],r,l,e):(X(a,g,s),t[l]=void 0,o=a.$elm$),g=i[++u]):(o=q(t&&t[u],r,u,e),g=i[++u]),o&&(n.slotRelocation?Z(h.$elm$).insertBefore(o,Q(h.$elm$)):h.$elm$.parentNode.insertBefore(o,h.$elm$))}c>p?z(e,null==i[f+1]?null:i[f+1].$elm$,r,i,u,f):n.updatable&&u>f&&Y(t,c,p)})(i,s,t,o,r):null!==o?(n.updatable&&n.vdomText&&null!==e.$text$&&(i.textContent=""),z(i,null,t,o,0,o.length-1)):n.updatable&&null!==s&&Y(s,0,s.length-1),n.svg&&p&&"svg"===a&&(p=!1))},ee=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const r=e["s-sn"];e.hidden=!1;for(const n of t)if(n!==e)if(n["s-hn"]!==e["s-hn"]||""!==r){if(1===n.nodeType&&(r===n.getAttribute("slot")||r===n["s-sn"])){e.hidden=!0;break}}else if(1===n.nodeType||3===n.nodeType&&""!==n.textContent.trim()){e.hidden=!0;break}}ee(e)}},te=[],re=e=>{let t,r,i;for(const s of e.childNodes){if(s["s-sr"]&&(t=s["s-cr"])&&t.parentNode){r=t.parentNode.childNodes;const e=s["s-sn"];for(i=r.length-1;i>=0;i--)if(t=r[i],!(t["s-cn"]||t["s-nr"]||t["s-hn"]===s["s-hn"]||n.experimentalSlotFixes&&t["s-sh"]&&t["s-sh"]===s["s-hn"]))if(ne(t,e)){let r=te.find((e=>e.$nodeToRelocate$===t));l=!0,t["s-sn"]=t["s-sn"]||e,r?(r.$nodeToRelocate$["s-sh"]=s["s-hn"],r.$slotRefNode$=s):(t["s-sh"]=s["s-hn"],te.push({$slotRefNode$:s,$nodeToRelocate$:t})),t["s-sr"]&&te.map((e=>{ne(e.$nodeToRelocate$,t["s-sn"])&&(r=te.find((e=>e.$nodeToRelocate$===t)),r&&!e.$slotRefNode$&&(e.$slotRefNode$=r.$slotRefNode$))}))}else te.some((e=>e.$nodeToRelocate$===t))||te.push({$nodeToRelocate$:t})}1===s.nodeType&&re(s)}},ne=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,ie=e=>{n.vdomRef&&(e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ie))},se=(e,t,r=!1)=>{var i,c,p,h,m;const f=e.$hostElement$,g=e.$cmpMeta$,y=e.$vnode$||C(null,null),b=O(t)?t:I(null,null,t);if(a=f.tagName,n.isDev&&Array.isArray(t)&&t.some(O))throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${a.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n  // Do not return an array\n  return (\n    <Host>{content}</Host>\n  );\n}\n  `);if(n.reflect&&g.$attrsToReflect$&&(b.$attrs$=b.$attrs$||{},g.$attrsToReflect$.map((([e,t])=>b.$attrs$[t]=f[e]))),r&&b.$attrs$)for(const e of Object.keys(b.$attrs$))f.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(b.$attrs$[e]=f[e]);if(b.$tag$=null,b.$flags$|=4,e.$vnode$=b,b.$elm$=y.$elm$=n.shadowDom&&f.shadowRoot||f,(n.scoped||n.shadowDom)&&(s=f["s-sc"]),u=ot&&0!=(1&g.$flags$),n.slotRelocation&&(o=f["s-cr"],l=!1),X(y,b,r),n.slotRelocation){if(st.$flags$|=1,d){re(b.$elm$);for(const e of te){const t=e.$nodeToRelocate$;if(!t["s-ol"]){const e=n.isDebug||n.hydrateServerSide?ae(t):nt.createTextNode("");e["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=e,t)}}for(const e of te){const t=e.$nodeToRelocate$,s=e.$slotRefNode$;if(s){const e=s.parentNode;let r=s.nextSibling;if(!n.experimentalSlotFixes||r&&1===r.nodeType){let n=null===(i=t["s-ol"])||void 0===i?void 0:i.previousSibling;for(;n;){let i=null!==(c=n["s-nr"])&&void 0!==c?c:null;if(i&&i["s-sn"]===t["s-sn"]&&e===i.parentNode&&(i=i.nextSibling,!i||!i["s-nr"])){r=i;break}n=n.previousSibling}}(!r&&e!==t.parentNode||t.nextSibling!==r)&&t!==r&&(n.experimentalSlotFixes||t["s-hn"]||!t["s-ol"]||(t["s-hn"]=t["s-ol"].parentNode.nodeName),e.insertBefore(t,r),1===t.nodeType&&(t.hidden=null!==(p=t["s-ih"])&&void 0!==p&&p))}else 1===t.nodeType&&(r&&(t["s-ih"]=null!==(h=t.hidden)&&void 0!==h&&h),t.hidden=!0)}}l&&ee(b.$elm$),st.$flags$&=-2,te.length=0}if(n.experimentalScopedSlotChanges&&2&g.$flags$)for(const e of b.$elm$.childNodes)e["s-hn"]===a||e["s-sh"]||(r&&null==e["s-ih"]&&(e["s-ih"]=null!==(m=e.hidden)&&void 0!==m&&m),e.hidden=!0);o=void 0},oe=e=>nt.createComment(`<slot${e.$name$?' name="'+e.$name$+'"':""}> (host=${a.toLowerCase()})`),ae=e=>nt.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),ce=(e,t)=>
38{n.asyncLoading&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.$onRenderResolve$=t)))},ue=(e,t)=>{if(n.taskQueue&&n.updatable&&(e.$flags$|=16),n.asyncLoading&&4&e.$flags$)return void(e.$flags$|=512);ce(e,e.$ancestorComponent$);const r=()=>le(e,t);return n.taskQueue?gt(r):r()},le=(e,t)=>{const r=e.$hostElement$,i=g("scheduleUpdate",e.$cmpMeta$.$tagName$),s=n.lazyLoad?e.$lazyInstance$:r;let o;return t?(n.lazyLoad&&n.hostListener&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((([e,t])=>ye(s,e,t))),e.$queuedListeners$=void 0)),be(r,"componentWillLoad"),n.cmpWillLoad&&(o=ye(s,"componentWillLoad"))):(be(r,"componentWillUpdate"),n.cmpWillUpdate&&(o=ye(s,"componentWillUpdate"))),be(r,"componentWillRender"),n.cmpWillRender&&(o=de(o,(()=>ye(s,"componentWillRender")))),i(),de(o,(()=>he(e,s,t)))},de=(e,t)=>pe(e)?e.then(t):t(),pe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,he=async(e,t,r)=>{var i;const s=e.$hostElement$,o=g("update",e.$cmpMeta$.$tagName$),a=s["s-rc"];n.style&&r&&(e=>{const t=e.$cmpMeta$,r=e.$hostElement$,i=t.$flags$,s=g("attachStyles",t.$tagName$),o=j(n.shadowDom&&ot&&r.shadowRoot?r.shadowRoot:r.getRootNode(),t,e.$modeName$);(n.shadowDom||n.scoped)&&n.cssAnnotations&&10&i&&(r["s-sc"]=o,r.classList.add(o+"-h"),n.scoped&&2&i&&r.classList.add(o+"-s")),s()})(e);const c=g("render",e.$cmpMeta$.$tagName$);if(n.isDev&&(e.$flags$|=1024),n.hydrateServerSide?await me(e,t,s,r):me(e,t,s,r),n.isDev&&(e.$renderCount$=void 0===e.$renderCount$?1:e.$renderCount$+1,e.$flags$&=-1025),n.hydrateServerSide)try{we(s),r&&(1&e.$cmpMeta$.$flags$?s["s-en"]="":2&e.$cmpMeta$.$flags$&&(s["s-en"]="c"))}catch(e){ze(e,s)}if(n.asyncLoading&&a&&(a.map((e=>e())),s["s-rc"]=void 0),c(),o(),n.asyncLoading){const t=null!==(i=s["s-p"])&&void 0!==i?i:[],r=()=>fe(e);0===t.length?r():(Promise.all(t).then(r),e.$flags$|=4,t.length=0)}else fe(e)},me=(e,t,r,i)=>{const s=!!n.allRenderFn,o=!!n.lazyLoad,a=!!n.taskQueue,c=!!n.updatable;try{if(h=t,t=(s||t.render)&&t.render(),c&&a&&(e.$flags$&=-17),(c||o)&&(e.$flags$|=2),n.hasRenderFn||n.reflect)if(n.vdomRender||n.reflect){if(n.hydrateServerSide)return Promise.resolve(t).then((t=>se(e,t,i)));se(e,t,i)}else{const n=r.shadowRoot;1&e.$cmpMeta$.$flags$?n.textContent=t:r.textContent=t}}catch(t){ze(t,e.$hostElement$)}return h=null,null},fe=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,i=g("postUpdate",t),s=n.lazyLoad?e.$lazyInstance$:r,o=e.$ancestorComponent$;n.cmpDidRender&&(n.isDev&&(e.$flags$|=1024),ye(s,"componentDidRender"),n.isDev&&(e.$flags$&=-1025)),be(r,"componentDidRender"),64&e.$flags$?(n.cmpDidUpdate&&(n.isDev&&(e.$flags$|=1024),ye(s,"componentDidUpdate"),n.isDev&&(e.$flags$&=-1025)),be(r,"componentDidUpdate"),i()):(e.$flags$|=64,n.asyncLoading&&n.cssAnnotations&&ve(r),n.cmpDidLoad&&(n.isDev&&(e.$flags$|=2048),ye(s,"componentDidLoad"),n.isDev&&(e.$flags$&=-2049)),be(r,"componentDidLoad"),i(),n.asyncLoading&&(e.$onReadyResolve$(r),o||ge(t))),n.method&&n.lazyLoad&&e.$onInstanceResolve$(r),n.asyncLoading&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&ft((()=>ue(e,!1))),e.$flags$&=-517)},ge=e=>{n.cssAnnotations&&ve(nt.documentElement),n.asyncQueue&&(st.$flags$|=2),ft((()=>M(rt,"appload",{detail:{namespace:i}}))),n.profile&&performance.measure&&performance.measure(`[Stencil] ${i} initial load (by ${e})`,"st:app:start")},ye=(e,t,r)=>{if(e&&e[t])try{return e[t](r)}catch(e){ze(e)}},be=(e,t)=>{n.lifecycleDOMEvents&&M(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:i}})},ve=e=>n.hydratedClass?e.classList.add("hydrated"):n.hydratedAttribute?e.setAttribute("hydrated",""):void 0,we=e=>{const t=e.children;if(null!=t)for(let e=0,r=t.length;e<r;e++){const r=t[e];"function"==typeof r.connectedCallback&&r.connectedCallback(),we(r)}},Se=(e,t,r)=>{var i;const s=e.prototype;if(n.formAssociated&&64&t.$flags$&&1&r&&S.forEach((e=>Object.defineProperty(s,e,{value(...t){const r=qe(this),i=n.lazyLoad?r.$hostElement$:this,s=n.lazyLoad?r.$lazyInstance$:i;if(s){const r=s[e];"function"==typeof r&&r.call(s,...t)}else r.$onReadyPromise$.then((r=>{const n=r[e];"function"==typeof n&&n.call(r,...t)}))}}))),n.member&&t.$members$){n.watchCallback&&e.watchers&&(t.$watchers$=e.watchers);const o=Object.entries(t.$members$);if(o.map((([e,[i]])=>{(n.prop||n.state)&&(31&i||(!n.lazyLoad||2&r)&&32&i)?Object.defineProperty(s,e,{get(){return t=e,qe(this).$instanceValues$.get(t);var t},set(s){if(n.isDev){const n=qe(this);0==(1&r)&&0===(n&&8&n.$flags$)&&0!=(31&i)&&0==(1024&i)&&Qe(`@Prop() "${e}" on <${t.$tagName$}>
38 is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`)}((e,t,r,i)=>{const s=qe(e),o=n.lazyLoad?s.$hostElement$:e,a=s.$instanceValues$.get(t),c=s.$flags$,u=n.lazyLoad?s.$lazyInstance$:o;var l,d;l=r,d=i.$members$[t][0],r=null==l||T(l)?l:n.propBoolean&&4&d?"false"!==l&&(""===l||!!l):n.propNumber&&2&d?parseFloat(l):n.propString&&1&d?String(l):l;const p=Number.isNaN(a)&&Number.isNaN(r);if((!n.lazyLoad||!(8&c)||void 0===a)&&r!==a&&!p&&(s.$instanceValues$.set(t,r),n.isDev&&(1024&s.$flags$?Qe(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",o,"\nNew value",r,"\nOld value",a):2048&s.$flags$&&Qe(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",o,"\nNew value",r,"\nOld value",a)),!n.lazyLoad||u)){if(n.watchCallback&&i.$watchers$&&128&c){const e=i.$watchers$[t];e&&e.map((e=>{try{u[e](r,a,t)}catch(e){ze(e,o)}}))}if(n.updatable&&2==(18&c)){if(n.cmpShouldUpdate&&u.componentShouldUpdate&&!1===u.componentShouldUpdate(r,a,t))return;ue(s,!1)}}})(this,e,s,t)}
38,configurable:!0,enumerable:!0}):n.lazyLoad&&n.method&&1&r&&64&i&&Object.defineProperty(s,e,{value(...t){var r;const n=qe(this);return null===(r=null==n?void 0:n.$onInstancePromise$)||void 0===r?void 0:r.then((()=>{var r;return null===(r=n.$lazyInstance$)||void 0===r?void 0:r[e](...t)}))}})})),n.observeAttribute&&(!n.lazyLoad||1&r)){const r=new Map;s.attributeChangedCallback=function(e,i,o){st.jmp((()=>{var a;const c=r.get(e);if(this.hasOwnProperty(c))o=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==o)return;if(null==c){const r=qe(this),s=null==r?void 0:r.$flags$;if(s&&!(8&s)&&128&s&&o!==i){const s=n.lazyLoad?r.$hostElement$:this,c=n.lazyLoad?r.$lazyInstance$:s,u=null===(a=t.$watchers$)||void 0===a?void 0:a[e];null==u||u.forEach((t=>{null!=c[t]&&c[t].call(c,o,i,e)}))}return}}this[c]=(null!==o||"boolean"!=typeof this[c])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(i=t.$watchers$)&&void 0!==i?i:{}),...o.filter((([e,t])=>15&t[0])).map((([e,i])=>{var s;const o=i[1]||e;return r.set(o,e),n.reflect&&512&i[0]&&(null===(s=t.$attrsToReflect$)||void 0===s||s.push([e,o])),o}))]))}}return e},Ee=async(e,t,i,s)=>{let o;if(0==(32&t.$flags$)){t.$flags$|=32;const u=i.$lazyBundleId$;if((n.lazyLoad||n.hydrateClientSide)&&u){if(o=Xe(i,t,s),o.then){const e=(a=`st:load:${i.$tagName$}:${t.$modeName$}`,c=`[Stencil] Load module for <${i.$tagName$}>`,n.profile&&performance.mark?(0===performance.getEntriesByName(a,"mark").length&&performance.mark(a),()=>{0===performance.getEntriesByName(c,"measure").length&&performance.measure(c,a)}):()=>{});o=await o,e()}if((n.isDev||n.isDebug)&&!o)throw new Error(`Constructor for "${i.$tagName$}#${t.$modeName$}" was not found`);n.member&&!o.isProxied&&(n.watchCallback&&(i.$watchers$=o.watchers),Se(o,i,2),o.isProxied=!0);const r=g("createInstance",i.$tagName$);n.member&&(t.$flags$|=8);try{new o(t)}catch(e){ze(e)}n.member&&(t.$flags$&=-9),n.watchCallback&&(t.$flags$|=128),r(),Te(t.$lazyInstance$)}else o=e.constructor,customElements.whenDefined(i.$tagName$).then((()=>t.$flags$|=128));if(n.style&&o.style){let s=o.style;n.mode&&"string"!=typeof s&&(s=s[t.$modeName$=(e=>tt.map((t=>t(e))).find((e=>!!e)))(e)],n.hydrateServerSide&&t.$modeName$&&e.setAttribute("s-mode",t.$modeName$));const a=$(i,t.$modeName$);if(!et.has(a)){const e=g("registerStyles",i.$tagName$);!n.hydrateServerSide&&n.shadowDom&&n.shadowDomShim&&8&i.$flags$&&(s=await r.e(53734).then(r.bind(r,953734)).then((e=>e.scopeCss(s,a,!1)))),((e,t,r)=>{let n=et.get(e);ct&&r?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,et.set(e,n)})(a,s,!!(1&i.$flags$)),e()}}}var a,c;const u=t.$ancestorComponent$,l=()=>ue(t,!0);n.asyncLoading&&u&&u["s-rc"]?u["s-rc"].push(l):l()},Te=e=>{n.lazyLoad&&n.connectedCallback&&ye(e,"connectedCallback")},Ie=e=>{n.lazyLoad&&n.disconnectedCallback&&ye(e,"disconnectedCallback"),n.cmpDidUnload&&ye(e,"componentDidUnload")},Ce=e=>{const t=e.cloneNode;e.cloneNode=function(e){const r=this,i=!!n.shadowDom&&r.shadowRoot&&ot,s=t.call(r,!!i&&e);if(n.slot&&!i&&e){let e,t,i=0;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si"];for(;i<r.childNodes.length;i++)e=r.childNodes[i]["s-nr"],t=o.every((e=>!r.childNodes[i][e])),e&&(n.appendChildSlotFix&&s.__appendChild?s.__appendChild(e.cloneNode(!0)):s.appendChild(e.cloneNode(!0))),t&&s.appendChild(r.childNodes[i].cloneNode(!0))}return s}},Ae=e=>{e.__appendChild=e.appendChild,e.appendChild=function(e){const t=e["s-sn"]=Ne(e),r=je(this.childNodes,t);if(r){const i=$e(r,t),s=i[i.length-1],o=s.parentNode.insertBefore(e,s.nextSibling);return ee(this),(e=>{if(n.updatable){const t=qe(e),r=t.$hostElement$.isConnected;r&&2==(18&t.$flags$)&&ue(t,!1)}})(this),o}return this.__appendChild(e)}},Oe=e=>{e.__removeChild=e.removeChild,e.removeChild=function(e){if(e&&void 0!==e["s-sn"]){const t=je(this.childNodes,e["s-sn"]);if(t){const r=$e(t,e["s-sn"]).find((t=>t===e));if(r)return r.remove(),void ee(this)}}return this.__removeChild(e)}},_e=e=>{const t=e.prepend;e.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const r=e["s-sn"]=Ne(e),n=je(this.childNodes,r);if(n){const t=document.createTextNode("");t["s-nr"]=e,n["s-cr"].parentNode.__appendChild(t),e["s-ol"]=t;const i=$e(n,r)[0];return i.parentNode.insertBefore(e,i.nextSibling)}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.call(this,e)}))}},De=e=>{e.append=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e)),this.appendChild(e)}))}},Pe=e=>{const t=e.insertAdjacentHTML;e.insertAdjacentHTML=function(e,r){if("afterbegin"!==e&&"beforeend"!==e)return t.call(this,e,r);const n=this.ownerDocument.createElement("_");let i;if(n.innerHTML=r,"afterbegin"===e)for(;i=n.firstChild;)this.prepend(i);else if("beforeend"===e)for(;i=n.firstChild;)this.append(i)}},ke=e=>{e.insertAdjacentText=function(e,t){this.insertAdjacentHTML(e,t)}},xe=e=>{const t=e.insertAdjacentElement;e.insertAdjacentElement=function(e,r){return"afterbegin"!==e&&"beforeend"!==e?t.call(this,e,r):"afterbegin"===e?(this.prepend(r),r):"beforeend"===e?(this.append(r),r):r}},Re=e=>{const t=Object.getOwnPropertyDescriptor(Node.prototype,"textContent");Object.defineProperty(e,"__textContent",t),n.experimentalScopedSlotChanges?Object.defineProperty(e,"textContent",{get(){const e=Me(this.childNodes).map((e=>{var t,r;const n=[];let i=e.nextSibling;for(;i&&i["s-sn"]===e["s-sn"];)3!==i.nodeType&&1!==i.nodeType||n.push(null!==(r=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==r?r:""),i=i.nextSibling;return n.filter((e=>""!==e)).join(" ")})).filter((e=>""!==e)).join(" ");return" "+e+" "}
38,set(e){Me(this.childNodes).forEach((t=>{let r=t.nextSibling;for(;r&&r["s-sn"]===t["s-sn"];){const e=r;r=r.nextSibling,e.remove()}if(""===t["s-sn"]){const r=this.ownerDocument.createTextNode(e);r["s-sn"]="",t.parentElement.insertBefore(r,t.nextSibling)}else t.remove()}))}}):Object.defineProperty(e,"textContent",{get(){var e;const t=je(this.childNodes,"");return 3===(null===(e=null==t?void 0:t.nextSibling)||void 0===e?void 0:e.nodeType)?t.nextSibling.textContent:t?t.textContent:this.__textContent},set(e){var t;const r=je(this.childNodes,"");if(3===(null===(t=null==r?void 0:r.nextSibling)||void 0===t?void 0:t.nodeType))r.nextSibling.textContent=e;else if(r)r.textContent=e;else{this.__textContent=e;const t=this["s-cr"];t&&this.insertBefore(t,this.firstChild)}}})},Ue=(e,t)=>{class r extends Array{item(e){return this[e]}}if(8&t.$flags$){const t=e.__lookupGetter__("childNodes");Object.defineProperty(e,"children",{get(){return this.childNodes.map((e=>1===e.nodeType))}}),Object.defineProperty(e,"childElementCount",{get:()=>e.children.length}),Object.defineProperty(e,"childNodes",{get(){const e=t.call(this);if(0==(1&st.$flags$)&&2&qe(this).$flags$){const t=new r;for(let r=0;r<e.length;r++){const n=e[r]["s-nr"];
38n&&t.push(n)}return t}return r.from(e)}})}},Me=e=>{const t=[];for(const r of Array.from(e))r["s-sr"]&&t.push(r),t.push(...Me(r.childNodes));return t},Ne=e=>e["s-sn"]||1===e.nodeType&&e.getAttribute("slot")||"",je=(e,t)=>{let r,n=0;for(;n<e.length;n++){if(r=e[n],r["s-sr"]&&r["s-sn"]===t)return r;if(r=je(r.childNodes,t),r)return r}return null},$e=(e,t)=>{const r=[e];for(;(e=e.nextSibling)&&e["s-sn"]===t;)r.push(e);return r},Fe=(e,t,r,i)=>{n.hostListener&&r&&(n.hostListenerTargetParent&&(r=i?r.filter((([e])=>32&e)):r.filter((([e])=>!(32&e)))),r.map((([r,i,s])=>{const o=n.hostListenerTarget?Le(e,r):e,a=Ge(t,s),c=He(r);st.ael(o,i,a,c),(t.$rmListeners$=t.$rmListeners$||[]).push((()=>st.rel(o,i,a,c)))})))},Ge=(e,t)=>r=>{try{n.lazyLoad?256&e.$flags$?e.$lazyInstance$[t](r):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r]):e.$hostElement$[t](r)}catch(e){ze(e)}},Le=(e,t)=>n.hostListenerTargetDocument&&4&t?nt:n.hostListenerTargetWindow&&8&t?rt:n.hostListenerTargetBody&&16&t?nt.body:n.hostListenerTargetParent&&32&t?e.parentElement:e,He=e=>at?{passive:0!=(1&e),capture:0!=(2&e)}:0!=(2&e);var Be;const We=n.hotModuleReplacement?(Be=window).__STENCIL_HOSTREFS__||(Be.__STENCIL_HOSTREFS__=new WeakMap):new WeakMap,qe=e=>We.get(e),Ve=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return n.isDev&&(r.$renderCount$=0),n.method&&n.lazyLoad&&(r.$onInstancePromise$=new Promise((e=>r.$onInstanceResolve$=e))),n.asyncLoading&&(r.$onReadyPromise$=new Promise((e=>r.$onReadyResolve$=e)),e["s-p"]=[],e["s-rc"]=[]),Fe(e,r,t.$listeners$,!1),We.set(e,r)},Ke=(e,t)=>t in e,ze=(e,t)=>(0,console.error)(e,t),Ye=n.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],Je=(...e)=>console.error(...Ye,...e),Qe=(...e)=>console.warn(...Ye,...e),Ze=new Map,Xe=(e,t,i)=>{const s=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$;if(n.isDev&&"string"!=typeof o)return void Je(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);const a=!n.hotModuleReplacement&&Ze.get(o);return a?a[s]:r(925864)(`./${o}.entry.js${n.hotModuleReplacement&&i?"?s-hmr="+i:""}`).then((e=>(n.hotModuleReplacement||Ze.set(o,e),e[s])),ze)},et=new Map,tt=[],rt="undefined"!=typeof window?window:{},nt=rt.document||{head:{}},it=rt.HTMLElement||class{},st={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,n)=>e.addEventListener(t,r,n),rel:(e,t,r,n)=>e.removeEventListener(t,r,n),ce:(e,t)=>new CustomEvent(e,t)},ot=!n.shadowDomShim||!n.shadowDom||(nt.head.attachShadow+"").indexOf("[native")>-1,at=(()=>{let e=!1;try{nt.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),ct=!!n.constructableCSS&&(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ut=[],lt=[],dt=[],pt=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ze(e)}e.length=0},ht=(e,t)=>{let r=0,n=0;for(;r<e.length&&(n=performance.now())<t;)try{e[r++](n)}catch(e){ze(e)}r===e.length?e.length=0:0!==r&&e.splice(0,r)},mt=()=>{if(n.asyncQueue&&m++,pt(ut),n.asyncQueue){const e=2==(6&st.$flags$)?performance.now()+14*Math.ceil(.1*m):1/0;ht(lt,e),ht(dt,e),lt.length>0&&(dt.push(...lt),lt.length=0),(f=ut.length+lt.length+dt.length>0)?st.raf(mt):m=0}else pt(lt),(f=ut.length>0)&&st.raf(mt)},ft=e=>Promise.resolve(void 0).then(e),gt=((e,t)=>r=>{e.push(r),f||(f=!0,t&&4&st.$flags$?ft(mt):st.raf(mt))})(lt,!0);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var yt={exports:{}};!function(e){var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,r){return r&&!0===r.clone&&t(e)?s((n=e,Array.isArray(n)?[]:{}),e,r):e;var n}
38function i(e,r,i){var o=e.slice();return r.forEach((function(r,a){void 0===o[a]?o[a]=n(r,i):t(r)?o[a]=s(e[a],r,i):-1===e.indexOf(r)&&o.push(n(r,i))})),o}function s(e,r,o){var a=Array.isArray(r);return a===Array.isArray(e)?a?((o||{arrayMerge:i}).arrayMerge||i)(e,r,o):function(e,r,i){var o={};return t(e)&&Object.keys(e).forEach((function(t){o[t]=n(e[t],i)})),Object.keys(r).forEach((function(a){t(r[a])&&e[a]?o[a]=s(e[a],r[a],i):o[a]=n(r[a],i)})),o}(e,r,o):n(r,o)}s.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,r){return s(e,r,t)}))};var o=s,a={bar:{type:"serial",rotate:!1,theme:"calcite",chartCursor:{categoryBalloonEnabled:!1},graphs:[{type:"column",newStack:!0}],legend:{valueAlign:"left",spacing:25},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},"bar-horizontal":{type:"serial",theme:"calcite",rotate:!0,chartCursor:{leaveCursor:!0,valueLineEnabled:!0,categoryBalloonEnabled:!1},graphs:[{type:"column"}],legend:{},valueAxes:[{gridAlpha:.2,stackType:"regular"}],export:{enabled:!0}},line:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},export:{enabled:!0}},area:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:.5,useLineColorForBulletBorder:!0}],legend:{horizontalGap:10,position:"bottom",useGraphSettings:!0,markerSize:10},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},pie:{type:"pie",theme:"calcite",innerRadius:"0%",startDuration:0,graphs:[{}],groupPercent:5,balloon:{fixedPosition:!0},legend:{enabled:!1},export:{enabled:!0}},radar:{type:"radar",valueAxes:[{gridType:"circles",minimum:0}],polarScatter:{minimum:0,maximum:400,step:1},startDuration:0,graphs:[{graphFillAlpha:0}],groupPercent:5,balloon:{fixedPosition:!0},legend:{position:"right",marginRight:100,autoMargins:!1}},scatter:{type:"xy",theme:"calcite",valueAxes:[{axisAlpha:.8,gridAlpha:.2,position:"bottom"},{axisAlpha:.8,gridAlpha:.2,position:"left"}],chartScrollbar:{scrollbarHeight:5,offset:-1,backgroundAlpha:.1,backgroundColor:"#888888",selectedBackgroundColor:"#67b7dc",selectedBackgroundAlpha:1,dragIconWidth:15,dragIconHeight:15},chartCursor:{categoryBalloonEnabled:!0,cursorAlpha:.3,valueLineAlpha:.3,valueLineBalloonEnabled:!0},graphs:[{fillAlphas:0,lineAlpha:0,bullet:"circle",bulletBorderAlpha:.2,bulletAlpha:.8,valueField:null,xField:null,yField:null}],export:{enabled:!0}},timeline:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},categoryAxis:{parseDates:!0},export:{enabled:!0}}};function c(e,t){var r=e.graphs.pop(),n=t.datasets.length>1;if(e.categoryField=n?"categoryField":t.series[0].category.field,e.tabIndex=0,e.legend||(e.legend={}),t.legend&&t.legend.hasOwnProperty("enable")&&(t.legend.visible=t.legend.enable),1===t.series.length&&"pie"!==t.type&&"radar"!==t.type){e.legend.enabled=!1;var i=t.series[0].category.label,s=t.series[0].value.label;"xy"===e.type&&Array.isArray(e.valueAxes)?e.valueAxes.forEach((function(e){"bottom"===e.position?e.title=i:"left"===e.position&&(e.title=s)})):(e.valueAxes||(e.valueAxes=[{}]),e.valueAxes[0].title=t.series[0].value.label,e.valueAxes[0].position="left",e.categoryAxis||(e.categoryAxis={}),e.categoryAxis.title=i)}if(t.legend){var o=t.legend;o.hasOwnProperty("visible")&&(e.legend.enabled=o.visible,e.legend.tabIndex=0),o.position&&["top","bottom","left","right"].indexOf(o.position)>-1&&(e.legend.position=o.position)}if(t.style){var a=t.style;if(a.padding){var c=a.padding;e.autoMargins=!1,c.hasOwnProperty("top")&&(e.marginTop=c.top),c.hasOwnProperty("bottom")&&(e.marginBottom=c.bottom),c.hasOwnProperty("left")&&(e.marginLeft=c.left),c.hasOwnProperty("right")&&(e.marginRight=c.right)}if(a.pie){var u=a.pie;u.hasOwnProperty("innerRadius")&&(e.innerRadius=u.innerRadius),u.hasOwnProperty("expand")&&(e.pullOutRadius=u.expand)}a.colors&&Array.isArray(a.colors)&&(e.colors=a.colors)}
38return t.datasets.forEach((function(i,s){var o=i.name;t.series.forEach((function(s,a){if(i.name===s.source){var c=l(r);c.title=s.value.label,c.valueField=n?o+"_"+s.value.field:s.value.field,c.balloonText="<div>"+s.category.label+": [["+e.categoryField+"]]</div><div>"+c.title+": [["+c.valueField+"]]</div>",s.stack&&c.newStack&&(c.newStack=!1),"pie"===t.type&&(e.titleField=e.categoryField,e.valueField=c.valueField),"xy"===e.type&&s.category&&s.value&&(c.xField=s.category.field,c.yField=s.value.field,c.balloonText="<div>"+s.category.label+": [["+s.category.field+"]]</div><div>"+s.value.label+": [["+s.value.field+"]]</div>","xy"===e.type&&s.size?(c.valueField=s.size.field,c.balloonText=c.balloonText+"<div>"+s.size.label+": [["+c.valueField+"]]</div>"):delete c.valueField),e.graphs.push(c)}}))})),e}function u(e){var t=e;return"time"===t?(console.warn("'time' is no longer a supported type. Please use 'timeline' instead"),t="timeline"):"bubble"===t?(console.warn("'bubble' is no longer a supported type. Please use 'scatter' instead"),t="scatter"):"grouped"===t&&(console.warn("'grouped' is no longer a supported type. Please use 'bar' instead"),t="bar"),l(a[t])}function l(e){return JSON.parse(JSON.stringify(e))}var d=function(e,t,r){if("custom"===t.type)return AmCharts.makeChart(e,t.specification);var n=t.specification&&"string"!=typeof t.specification?l(t.specification):u(t.type),i=l(r);n.dataProvider=i,t.datasets&&(n=c(n,t)),t.overrides&&(n=o(n,t.overrides,{clone:!0}));var s=AmCharts.makeChart(e,n);return"pie"===t.type&&(s.balloonText=function(e){return"<div>"+(e.series[0].category.label?e.series[0].category.label+": ":"")+"[[title]]</div><div>"+(e.series[0].value.label?e.series[0].value.label+": ":"")+"[[percents]]% ([[value]])</div>"}(t)),s};function p(e){return e.features?e.features:e}function h(e){return e.attributes?e.attributes:e}function m(e,t,r){var n=e.name||r;return e.data||t[n]}var f=function(e,t){return f=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])},f(e,t)},g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},g.apply(this,arguments)};function y(e){return Object.keys(e).some((function(t){var r=e[t];if(!r)return!1;switch(r&&r.toParam&&(r=r.toParam()),r.constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}}))}function b(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(n&&n.toParam&&(n=n.toParam()),n||0===n||"boolean"==typeof n||"string"==typeof n){var i;switch(n.constructor.name){case"Array":i=n[0]&&n[0].constructor&&"Object"===n[0].constructor.name?JSON.stringify(n):n.join(",");break;case"Object":i=JSON.stringify(n);break;case"Date":i=n.valueOf();break;case"Function":i=null;break;case"Boolean":i=n+"";break;default:i=n}(i||0===i||"string"==typeof i)&&(t[r]=i)}})),t}function v(e){var t=b(e);return Object.keys(t).map((function(e){return function(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}(e,t[e])})).join("&")}var w=function(e,t,r,n,i){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=i};w.prototype=Object.create(Error.prototype),w.prototype.constructor=w;var S,E=function(e){function t(t,r,n,i,s){void 0===t&&(t="AUTHENTICATION_ERROR"),void 0===r&&(r="AUTHENTICATION_ERROR_CODE");var o=e.call(this,t,r,n,i,s)||this;return o.name="ArcGISAuthError",o.message="AUTHENTICATION_ERROR_CODE"===r?t:r+": "+t,o}return function(e,t){function r(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.retry=function(e,t){var r=this;void 0===t&&(t=3);var n=0,i=function(s,o){e(r.url,r.options).then((function(e){var t=g({},r.options,{authentication:e});return n+=1,C(r.url,t)})).then((function(e){s(e)})).catch((function(e){"ArcGISAuthError"===e.name&&n<t?i(s,o):"ArcGISAuthError"===e.name&&n>=t?o(r):o(e)}))};return new Promise((function(e,t){i(e,t)}))},t}(w),T="@esri/arcgis-rest-js",I={httpMethod:"POST",params:{f:"json"}};function C(e,t){void 0===t&&(t={params:{f:"json"}});var r=g({httpMethod:"POST"},I,t,{params:g({},I.params,t.params),headers:g({},I.headers,t.headers)}),n=[],i=[];if(r.fetch||"undefined"==typeof fetch?(n.push("`fetch`"),i.push("`isomorphic-fetch`")):r.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(n.push("`Promise`"),i.push("`es6-promise`")),"undefined"==typeof FormData&&(n.push("`FormData`"),i.push("`isomorphic-form-data`")),!r.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires global variables for `fetch`, `Promise` and `FormData` to be present in the global scope. You are missing "+n.join(", ")+". We recommend installing the "+i.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var s=r.httpMethod,o=r.authentication,a=r.rawResponse,c=g({f:"json"},r.params),u={method:s,credentials:"same-origin"};return(o?o.getToken(e,{fetch:r.fetch}).catch((function(t){throw t.url=e,t.options=r,t})):Promise.resolve("")).then((function(t){if(t.length&&(c.token=t),"GET"===u.method){var n=""===v(c)?e:e+"?"+v(c);r.maxUrlLength&&n.length>r.maxUrlLength?u.method="POST":e=n}var i=new RegExp("/items/.+/updateResources").test(e);return"POST"===u.method&&(u.body=function(e,t){var r=y(e)||t,n=b(e);if(r){var i=new FormData;
38return Object.keys(n).forEach((function(e){if("undefined"!=typeof Blob&&n[e]instanceof Blob){var t=n.fileName||n[e].name||e;i.append(e,n[e],t)}else i.append(e,n[e])})),i}return v(e)}(c,i)),u.headers=g({},r.headers),"undefined"!=typeof window||u.headers.referer||(u.headers.referer=T),y(c)||i||(u.headers["Content-Type"]="application/x-www-form-urlencoded"),r.fetch(e,u)})).then((function(t){if(!t.ok){var n=t.status,i=t.statusText;throw new w(i,"HTTP "+n,t,e,r)}if(a)return t;switch(c.f){case"json":case"geojson":return t.json();case"html":case"text":return t.text();default:return t.blob()}})).then((function(t){return"json"!==c.f&&"geojson"!==c.f||a?t:function(e,t,r,n){if(e.code>=400){var i=e.message,s=e.code;throw new w(i,s,e,t,n)}if(e.error){var o=e.error,a=(i=o.message,s=o.code,o.messageCode),c=a||s||"UNKNOWN_ERROR_CODE";if(498===s||499===s||"GWM_0003"===a||400===s&&"Unable to generate token."===i)throw new E(i,c,e,t,n);throw new w(i,c,e,t,n)}if("failed"===e.status||"failure"===e.status){i=void 0,s="UNKNOWN_ERROR_CODE";try{i=JSON.parse(e.statusMessage).message,s=JSON.parse(e.statusMessage).code}catch(t){i=e.statusMessage||e.message}throw new w(i,s,e,t,n)}return e}(t,e,0,r)}))}function A(e){return"/"===(e=e.trim())[e.length-1]&&(e=e.slice(0,-1)),e}function O(e,t){var r=t.codedValues.find((function(t){return e===t.code}));return r?r.name:e}!function(e){e.ArcGISRequestError="ArcGISRequestError",e.ArcGISAuthError="ArcGISAuthError"}(S||(S={}));var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)};function D(e){var t=[],r=[];return e&&e.forEach((function(e,n){if(e.url){var i=e.url,s=e.name,o=e.query,a=e.requestOptions;t.push(s||"dataset"+n);var c=_({},a&&a.params,function(e){void 0===e&&(e={});var t={where:"1=1",returnGeometry:!1,returnDistinctValues:!1,returnIdsOnly:!1,returnCountOnly:!1,outFields:"*",sqlFormat:"standard",f:"json"};if(e.bbox){if(e.geometry)throw new Error("Dataset.query can not have both a geometry and a bbox specified");var r=e.bbox.split(",");delete e.bbox,e.geometry=JSON.stringify({xmin:Number(r[0]),ymin:Number(r[1]),xmax:Number(r[2]),ymax:Number(r[3])}),e.inSR="4326"}return Object.keys(e).reduce((function(r,n){var i=e[n];return t[n]="object"==typeof i?JSON.stringify(i):i,r}),t),t}(o)),u=_({},a,{url:i,params:c});r.push(function(e){var t,r,n,i,s=(t=e,r=["where","objectIds","relationParam","time","distance","units","outFields","returnGeometry","maxAllowableOffset","geometryPrecision","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures"],n={httpMethod:"GET",params:g({where:"1=1",outFields:"*"},e.params)},(i=g({params:{}},n,t)).params=r.reduce((function(e,r){return(t[r]||"boolean"==typeof t[r])&&(e[r]=t[r]),e}),i.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce((function(e,t){return i[t]&&(e[t]=i[t]),e}),{}));return C(A(e.url)+"/query",s)}(u).then((function(t){var r=e.domains,n=r&&Object.keys(r).map((function(e){return{name:e,domain:r[e]}}));return n&&n.length>0?function(e){return new Promise((function(t){if(!e.fields)return(r={url:e.url},C(A(r.url),r)).then((function(r){t(e.fields=r.fields)}));var r;t(e.fields)})).then((function(t){var r=function(e){return e.reduce((function(e,t){var r=t.domain;return r&&"codedValue"===r.type&&(e[t.name]=r),e}),{})}(t);if(Object.keys(r).length<1)return e.queryResponse;var n=e.queryResponse.features.map((function(e){var t={};for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)){var i=e.attributes[n],s=r[n];t[n]=null!==i&&s?O(i,s):i}return g({},e,{attributes:t})}));return g({},e.queryResponse,{features:n})}))}({url:u.url,queryResponse:t,fields:n,fetch:undefined}):t}
38)))}})),Promise.all(r).then((function(e){var r=e.reduce((function(e,r,n){return e[t[n]]=r,e}),{});return Promise.resolve(r)}))}var P=function(){function e(e,t){if(!e)throw new Error("A container is required");this._container=e,t&&this.definition(t)}return e.prototype.definition=function(e){return void 0===e?this._definition:(this._definition=e,this)},e.prototype.datasets=function(e){return this._definitionAccessor("datasets",e)},e.prototype.series=function(e){return this._definitionAccessor("series",e)},e.prototype.type=function(e){return this._definitionAccessor("type",e)},e.prototype.specification=function(e){return this._definitionAccessor("specification",e)},e.prototype.overrides=function(e){return this._definitionAccessor("overrides",e)},e.prototype.legend=function(e){return this._definitionAccessor("legend",e)},e.prototype.style=function(e){return this._definitionAccessor("style",e)},e.prototype.data=function(){return this._data},e.prototype.dataset=function(e){var t,r=this.datasets();return r&&r.some((function(r){if(r.name===e)return t=r,!0})),t},e.prototype.query=function(){return D(this.datasets())},e.prototype.updateData=function(e){var t=this.datasets(),r={datasetsData:e,series:this.series()};return this._data=function(e,t){if(e){if(e.length<1)return[];var r=t&&t.datasetsData;return e.length>1?function(e,t,r){var n=e.reduce((function(e,n,i){var s=n.join,o=m(n,r),a=n.name,c=function(e,t){return t.reduce((function(t,r){return r.source===e&&r.value&&t.push(r.value.field),t}),[])}(a,t);return p(o).forEach((function(t){var r=h(t),n=r[s];void 0===e[n]&&(e[n]={categoryField:n}),c.reduce((function(e,t){return e[function(e,t){return e+"_"+t}(a,t)]=r[t],e}),e[n])})),e}),{});return Object.keys(n).map((function(e){return n[e]}))}(e,t&&t.series,r):(n=m(e[0],r,"dataset0"),(i=p(n)).length>0&&i[0].attributes?i.map(h):i)}var n,i}(t,r),this},e.prototype.render=function(){return function(e,t,r){if((!e||!t||!r)&&t.type&&"custom"!==t.type)throw new Error("Element Id, definition, and data are all required.");t.type&&"custom"===t.type?d(e,t):d(e,t,r)}(this._container,this.definition(),this.data()),this},e.prototype.show=function(){var e=this;return this.query().then((function(t){return e.updateData(t).render()}))},e.prototype._definitionAccessor=function(e,t){var r=this._definition;if(void 0===t)return r?r[e]:void 0;if(r)return r[e]=t,this;var n={};return n[e]=t,this.definition(n)},e}();e.Chart=P,Object.defineProperty(e,"__esModule",{value:!0})}(yt.exports);const bt=((e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};var i,s;n.member&&(r.$members$=t[2]),n.hostListener&&(r.$listeners$=t[3]),n.watchCallback&&(r.$watchers$=e.$watchers$),n.reflect&&(r.$attrsToReflect$=[]),n.shadowDom&&!ot&&1&r.$flags$&&(r.$flags$|=8),n.experimentalSlotFixes?n.scoped&&2&r.$flags$&&(i=e.prototype,s=r,Ce(i),Ae(i),De(i),_e(i),xe(i),Pe(i),ke(i),Re(i),Ue(i,s),Oe(i)):(n.slotChildNodesFix&&Ue(e.prototype,r),n.cloneNodeFix&&Ce(e.prototype),
39n.appendChildSlotFix&&Ae(e.prototype),n.scopedSlotTextContentFix&&2&r.$flags$&&Re(e.prototype));const o=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){Ve(this,r)},connectedCallback(){(e=>{if(0==(1&st.$flags$)){const t=qe(e),r=t.$cmpMeta$,i=g("connectedCallback",r.$tagName$);if(n.hostListenerTargetParent&&Fe(e,t,r.$listeners$,!0),1&t.$flags$)Fe(e,t,r.$listeners$,!1),(null==t?void 0:t.$lazyInstance$)?Te(t.$lazyInstance$):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>Te(t.$lazyInstance$)));else{let i;if(t.$flags$|=1,n.hydrateClientSide&&(i=e.getAttribute(y),i)){if(n.shadowDom&&ot&&1&r.$flags$){const t=n.mode?j(e.shadowRoot,r,e.getAttribute("s-mode")):j(e.shadowRoot,r);e.classList.remove(t+"-h",t+"-s")}((e,t,r,i)=>{const s=g("hydrateClient",t),o=e.shadowRoot,a=[],c=n.shadowDom&&o?[]:null,u=i.$vnode$=C(t,null);st.$orgLocNodes$||R(nt.body,st.$orgLocNodes$=new Map),e[y]=r,e.removeAttribute(y),x(u,a,[],c,e,e,r),a.map((e=>{const r=e.$hostId$+"."+e.$nodeId$,n=st.$orgLocNodes$.get(r),i=e.$elm$;n&&ot&&""===n["s-en"]&&n.parentNode.insertBefore(i,n.nextSibling),o||(i["s-hn"]=t,n&&(i["s-ol"]=n,i["s-ol"]["s-nr"]=i)),st.$orgLocNodes$.delete(r)})),n.shadowDom&&o&&c.map((e=>{e&&o.appendChild(e)})),s()})(e,r.$tagName$,i,t)}if(n.slotRelocation&&!i&&(n.hydrateServerSide||(n.slot||n.shadowDom)&&12&r.$flags$)&&(e=>
39{const t=e["s-cr"]=nt.createComment(n.isDebug?`content-ref (host=${e.localName})`:"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e),n.asyncLoading){let r=e;for(;r=r.parentNode||r.host;)if(n.hydrateClientSide&&1===r.nodeType&&r.hasAttribute("s-id")&&r["s-p"]||r["s-p"]){ce(t,t.$ancestorComponent$=r);break}}n.prop&&!n.hydrateServerSide&&r.$members$&&Object.entries(r.$members$).map((([t,[r]])=>{if(31&r&&e.hasOwnProperty(t)){const r=e[t];delete e[t],e[t]=r}})),n.initializeNextTick?ft((()=>Ee(e,t,r))):Ee(e,t,r)}i()}})(this),n.connectedCallback&&o&&o.call(this)},disconnectedCallback(){(async e=>{if(0==(1&st.$flags$)){const t=qe(e);n.hostListener&&t.$rmListeners$&&(t.$rmListeners$.map((e=>e())),t.$rmListeners$=void 0),n.lazyLoad?(null==t?void 0:t.$lazyInstance$)?Ie(t.$lazyInstance$):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>Ie(t.$lazyInstance$))):Ie(e)}})(this),n.disconnectedCallback&&a&&a.call(this)},__attachShadow(){ot?n.shadowDelegatesFocus?this.attachShadow({mode:"open",delegatesFocus:!!(16&r.$flags$)}):this.attachShadow({mode:"open"}):this.shadowRoot=this}}),e.is=r.$tagName$,Se(e,r,3)})(class extends it{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.esriCedarChartUpdateStart=U(this,"esriCedarChartUpdateStart",7),this.esriCedarChartUpdateEnd=U(this,"esriCedarChartUpdateEnd",7),this.esriCedarChartError=U(this,"esriCedarChartError",7),this.definition=void 0,this.timeout=void 0,this.timeoutErrorMessage="The queries to the service(s) are not responding within the designated timeout period.",this.transform=void 0}get _isRtl(){return null!==this.element.closest('[dir="rtl"]')}get _classes(){const e="chart";return this._isRtl?e+" rtl":e}componentDidLoad(){this._showChart()}_destroyChart(){delete this._chart}async _showChart(){try{if(this.esriCedarChartUpdateStart.emit(),this._destroyChart(),!this.definition)return;await async function(e){switch(await r.e(36782).then(r.t.bind(r,36782,23)),await r.e(39001).then(r.t.bind(r,939001,23)),e){case"area":case"bar":case"line":case"timeline":await r.e(14400).then(r.t.bind(r,214400,23));break;case"pie":await r.e(10646).then(r.t.bind(r,10646,23));break;case"radar":await r.e(75920).then(r.t.bind(r,697208,23));break;case"scatter":await r.e(44611).then(r.t.bind(r,144611,23));break;default:throw new Error("Invalid chart type")}}(this.definition.type);const{timeout:e,timeoutErrorMessage:t,transform:n}=this;this._chart=await(async(e,t,r={})=>{const n=new yt.exports.Chart(e,t);let i;const{timeout:s,timeoutErrorMessage:o,transform:a}=r;var c,u;if(i=s?await Promise.race([n.query(),(c=s,u=o,new Promise(((e,t)=>{setTimeout((()=>{t(new Error(u))}),c)})))]):await n.query(),"function"==typeof a)for(const e in i)if(i.hasOwnProperty(e)){const t=n.dataset(e);i[e]=a(i[e],t)}return n.updateData(i),n.render(),n})(this._container,this.definition,{timeout:e,timeoutErrorMessage:t,transform:n}),this.esriCedarChartUpdateEnd.emit(this._chart)}catch(e){console.error(e),this.esriCedarChartError.emit(e)}}render(){return I(A,{key:"a5a7ef2a1a519d81e1b2d8b7d58bbc1e9a3df255"},I("div",{key:"2e46e7eea083c5a70249f99bc7fe09129efa01a2",class:this._classes,ref:e=>this._container=e}))}get element(){return this}static get watchers(){return{definition:["_showChart"],timeout:["_showChart"],timeoutErrorMessage:["_showChart"],transform:["_showChart"]}}static get style(){return":host {\n  display: block;\n}\n\n.chart {\n  width: 100%;\n  height: 100%;\n  position: relative;\n}\n\n.chart.rtl .amChartsLegend svg {\n  position: inherit !important;\n  text {\n    text-anchor: end !important;\n  }\n}\n"}},[1,"esri-cedar-chart",{definition:[16],timeout:[2],timeoutErrorMessage:[1,"timeout-error-message"],transform:[16]},void 0,{definition:["_showChart"],timeout:["_showChart"],timeoutErrorMessage:["_showChart"],transform:["_showChart"]}]),vt=bt,wt=function(){"undefined"!=typeof customElements&&["esri-cedar-chart"].forEach((e=>{"esri-cedar-chart"===e&&(customElements.get(e)||customElements.define(e,bt))}))}},752692:e=>{const t=function(e,t,r){return t===r?0:t<r?-e:null==t?1:null==r?-1:e},r=function(e,r,n,i){return t(e,n[r],i[r])},n=function(e,r,n,i){return t(e,r(n),r(i))},i=function(e,t,r,n,i,s){return c(e(i),e(s),t,r,n,i,s)},s=function(e,t,r,n,i,s){return c(i[e],s[e],t,r,n,i,s)},o=function(e,t,r,n,i,s){const o=e.asc||e.desc,c=e.asc?1:-1;if(!o)throw Error("sort: Invalid 'by' sorting configuration.\n      Expecting object with 'asc' or 'desc' key");return a(o)(o,t,r,c,i,s)},a=function(e){const t=typeof e;return"string"===t?s:"function"===t?i:o},c=function(e,r,n,i,s,o,c){return e===r||null==e&&null==r?n.length>i?a(n[i])(n[i],n,i+1,s,o,c):0:t(s,e,r)},u=function(e,i,s){if(!Array.isArray(i))return i;let o;return Array.isArray(s)&&s.length<2&&([s]=s),o=s?"string"==typeof s?r.bind(void 0,e,s):"function"==typeof s?n.bind(void 0,e,s):a(s[0]).bind(void 0,s.shift(),s,0,e):t.bind(void 0,e),i.sort(o)};e.exports=function(e){return{asc:t=>u(1,e,t),desc:t=>u(-1,e,t),by:t=>{if(!Array.isArray(e))return e;if(!Array.isArray(t))throw Error("sort: Invalid usage of 'by' sorter. Array syntax is required.\n          Did you mean to use 'asc' or 'desc' sorter instead?");if(1===t.length){const r=t[0].asc?1:-1,n=t[0].asc||t[0].desc;if(!n)throw Error("sort: Invalid 'by' sorting configuration.\n            Expecting object with 'asc' or 'desc' key");return u(r,e,n)}const r=o.bind(void 0,t.shift(),t,0,void 0);return e.sort(r)}}}},745594:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,a){if(!r[o]){if(!t[o]){if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var s=void 0,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 10,729 bytes, line 39
39+/=";r.encode=function(e){for(var t,r,i,o,a,c,u,l=[],d=0,p=e.length,h=p,m="string"!==n.getTypeOf(e);d<e.length;)h=p-d,i=m?(t=e[d++],r=d<p?e[d++]:0,d<p?e[d++]:0):(t=e.charCodeAt(d++),r=d<p?e.charCodeAt(d++):0,d<p?e.charCodeAt(d++):0),o=t>>2,a=(3&t)<<4|r>>4,c=1<h?(15&r)<<2|i>>6:64,u=2<h?63&i:64,l.push(s.charAt(o)+s.charAt(a)+s.charAt(c)+s.charAt(u));return l.join("")},r.decode=function(e){var t,r,n,o,a,c,u=0,l=0;if("data:"===e.substr(0,5))throw new Error("Invalid base64 input, it looks like a data url.");var d,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&p--,e.charAt(e.length-2)===s.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=i.uint8array?new Uint8Array(0|p):new Array(0|p);u<e.length;)t=s.indexOf(e.charAt(u++))<<2|(o=s.indexOf(e.charAt(u++)))>>4,r=(15&o)<<4|(a=s.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(c=s.indexOf(e.charAt(u++))),d[l++]=t,64!==a&&(d[l++]=r),64!==c&&(d[l++]=n);return d}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),o=e("./stream/DataLengthProbe");function a(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var s=i,o=0+r;e^=-1;for(var a=0;a<o;a++)e=e>>>8^s[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r,n){var s=i,o=0+r;e^=-1;for(var a=0;a<o;a++)e=e>>>8^s[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),o=e("./stream/GenericWorker"),a=n?"uint8array":"array";function c(e,t){o.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new c("Deflate",e)},r.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,r,i,o,l){var d,p,h=e.file,m=e.compression,f=l!==a.utf8encode,g=s.transformTo("string",l(h.name)),y=s.transformTo("string",a.utf8encode(h.name)),b=h.comment,v=s.transformTo("string",l(b)),w=s.transformTo("string",a.utf8encode(b)),S=y.length!==h.name.length,E=w.length!==b.length,T="",I="",C="",A=h.dir,O=h.date,_={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(_.crc32=e.crc32,_.compressedSize=e.compressedSize,_.uncompressedSize=e.uncompressedSize);var D=0;t&&(D|=8),f||!S&&!E||(D|=2048);var P=0,k=0;A&&(P|=16),"UNIX"===o?(k=798,P|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,A)):(k=20,P|=function(e){return 63&(e||0)}(h.dosPermissions)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),S&&(I=n(1,1)+n(c(g),4)+y,T+="up"+n(I.length,2)+I),E&&(C=n(1,1)+n(c(v),4)+w,T+="uc"+n(C.length,2)+C);var x="";return x+="\n\0",x+=n(D,2),x+=m.magic,x+=n(d,2),x+=n(p,2),x+=n(_.crc32,4),x+=n(_.compressedSize,4),x+=n(_.uncompressedSize,4),x+=n(g.length,2),x+=n(T.length,2),{fileRecord:u.LOCAL_FILE_HEADER+x+g+T,dirRecord:u.CENTRAL_FILE_HEADER+n(k,2)+x+n(v.length,2)+"\0\0\0\0"+n(P,4)+n(i,4)+g+T+v}}var s=e("../utils"),o=e("../stream/GenericWorker"),a=e("../utf8"),c=e("../crc32"),u=e("../signature");function l(e,t,r,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(l,o),l.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return u.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,o){var a=s.transformTo("string",o(i));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},l.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},l.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var s=new i(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach((function(e,r){o++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},c=r.dir,u=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:e,dir:c,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./external"),s=e("./utf8"),o=e("./zipEntries"),a=e("./stream/Crc32Probe"),c=e("./nodejsUtils");function u(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),c.isNode&&c.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip f
39ile",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new o(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var s=0;s<n.length;s++)r.push(u(n[s]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),s=i.files,o=0;o<s.length;o++){var a=s[o],c=a.fileNameStr,u=n.resolve(a.fileNameStr);r.file(u,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(u).unsafeOriginalName=c)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var n=e("readable-stream").Readable;function i(e,t,r){n.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),r&&r(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function n(e,t,r){var n,i=s.getTypeOf(t),a=s.extend(r||{},c);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(n=m(e))&&g.call(this,n,!0);var d,y="string"===i&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!y),(t instanceof u&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string"),d=t instanceof u||t instanceof o?t:p.isNode&&p.isStream(t)?new h(e,t):s.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new l(e,d,a);this.files[e]=b}var i=e("./utf8"),s=e("./utils"),o=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),c=e("./defaults"),u=e("./compressedObject"),l=e("./zipObject"),d=e("./generate"),p=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:c.createFolders,e=f(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];
vendor: 36,104 bytes, lines 39-40
39return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(y(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(y(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=g.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=d.generateWorker(this,r,n)}catch(e){(t=new o("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),o=e("./StringReader"),a=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new c(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK��",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK�\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),o=e("../base64"),a=e("../support"),c=e("../external"),u=null;if(a.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,t,r){var o=t;switch(t){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=t,this._mimeType=r,n.checkSupport(o),this._worker=e.pipe(new i(o)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}l.prototype={accumulate:function(e){return function(e,t){return new c.Promise((function(r,i){var s=[],a=e._internalType,c=e._outputType,u=e._mimeType;e.on("data",(function(e,r){s.push(e),t&&t(r)})).on("error",(function(e){s=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(c,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,s),u);r(e)}catch(e){i(e)}s=[]})).resume()}))}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){"use strict";for(var n=e("./utils"),i=e("./support"),s=e("./nodejsUtils"),o=e("./stream/GenericWorker"),a=new Array(256),c=0;c<256;c++)a[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(){o.call(this,"utf-8 decode"),this.leftOver=null}function l(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return i.nodebuffer?s.newBufferFrom(e,"utf-8"):function(e){var t,r,n,s,o,a=e.length,c=0;for(s=0;s<a;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(c):new Array(c),s=o=0;o<c;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),r<128?t[o++]=r:(r<2048?t[o++]=192|r>>>6:(r<65536?t[o++]=224|r>>>12:(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63),t[o++]=128|r>>>6&63),t[o++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,s,o=e.length,c=new Array(2*o);for(t=r=0;t<o;)if((i=e[t++])<128)c[r++]=i;else if(4<(s=a[i]))c[r++]=65533,t+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&t<o;)i=i<<6|63&e[t++],s--;1<s?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,o),u.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:r.utf8decode(c),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,n.inherits(l,o),l.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),s=e("./nodejsUtils"),o=e("./external");function a(e){return e}function c(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(e){return!1}}()}};function l(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return u.stringifyByChar(e)}function d(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=l;var p={};p.string={string:a,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,s.allocBuffer(e.length))}},p.array={string:l,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(e)}},p.arraybuffer={string:function(e){return l(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:l,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return s.newBufferFrom(e)}},p.nodebuffer={string:l,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return p.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return p[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&s.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,s,a,u){return o.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new o.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var l=r.getTypeOf(t);return l?("arraybuffer"===l?t=r.transformTo("uint8array",t):"string"===l&&(u?t=i.decode(t):s&&!0!==a&&(t=function(e){return c(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):o.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),o=e("./zipEntry"),a=e("./support");function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),s=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),c=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,
40length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var s=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||o(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||o(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=e("./stream/StreamHelper"),s=e("./stream/DataWorker"),o=e("./utf8"),a=e("./compressedObject"),c=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!n&&(t=t.pipe(new o.Utf8EncodeWorker)),!s&&n&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new c("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof c?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<u.length;d++)n.prototype[u[d]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var s=0,o=new i(l),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),r=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var c=new e.MessageChannel;c.port1.onmessage=l,r=function(){c.port2.postMessage(0)}}var u=[];function l(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var n=e("immediate");function i(){}var s={},o=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n((function(){var n;try{n=t(r)}catch(n){return s.reject(e,n)}n===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,n)}))}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,s.reject(e,t))}function i(t){r||(r=!0,s.resolve(e,t))}var o=m((function(){t(i,n)}));"error"===o.status&&n(o.value)}function m(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=u).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var r=new this.constructor(i);return this.state!==c?d(r,this.state===a?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){s.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},s.resolve=function(e,t){var r=m(p,t);if("error"===r.status)return s.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=a,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},u.resolve=function(e){return e instanceof this?e:s.resolve(new this(i),e)},u.reject=function(e){var t=new this(i);return s.reject(t,e)},u.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var o=new Array(r),a=0,c=-1,u=new this(i);++c<r;)l(e[c],c);return u;function l(e,i){t.resolve(e).then((function(e){o[i]=e,++a!==r||n||(n=!0,s.resolve(u,o))}),(function(e){n||(n=!0,s.reject(u,e))}))}},u.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,o=-1,a=new this(i);++o<t;)n=e[o],this.resolve(n).then((function(e){r||(r=!0,s.resolve(a,e))}),(function(e){r||(r=!0,s.reject(a,e))}));return a}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var n=e("./zlib/deflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/messages"),a=e("./zlib/zstream"),c=Object.prototype.toString,u=0,l=-1,d=0,p=8;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({level:l,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==u)throw new Error(o[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,m))!==u)throw new Error(o[r]);this._dict_set=!0}}function m(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}h.prototype.push=function(e,t){var r,o,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=s.string2buf(e):"[object ArrayBuffer]"===c.call(e)?a.input=new 
vendor: 35,858 bytes, line 40
40Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=n.deflate(a,o))&&r!==u)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u):2!==o||(this.onEnd(u),!(a.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=h,r.deflate=m,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/constants"),a=e("./zlib/messages"),c=e("./zlib/zstream"),u=e("./zlib/gzheader"),l=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function p(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,c,u,d,p,h=this.strm,m=this.options.chunkSize,f=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?h.input=s.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(m),h.next_out=0,h.avail_out=m),(r=n.inflate(h,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(p="string"==typeof f?s.string2buf(f):"[object ArrayBuffer]"===l.call(f)?new Uint8Array(f):f,r=n.inflateSetDictionary(this.strm,p)),r===o.Z_BUF_ERROR&&!0===g&&(r=o.Z_OK,g=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==o.Z_STREAM_END&&(0!==h.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=s.utf8border(h.output,h.next_out),u=h.next_out-c,d=s.buf2string(h.output,c),h.next_out=u,h.avail_out=m-u,u&&i.arraySet(h.output,h.output,c,u,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(h.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=d,r.inflate=p,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},r.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,o;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],o.set(s,i),i+=s.length;return o}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var n=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function c(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o<t;o++)r+=String.fromCharCode(e[o]);return r}o[254]=o[254]=1,r.string2buf=function(e){var t,r,i,s,o,a=e.length,c=0;for(s=0;s<a;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(c),s=o=0;o<c;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?t[o++]=r:(r<2048?t[o++]=192|r>>>6:(r<65536?t[o++]=224|r>>>12:(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63),t[o++]=128|r>>>6&63),t[o++]=128|63&r);return t},r.buf2binstring=function(e){return c(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,a=t||e.length,u=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)u[n++]=i;else if(4<(s=o[i]))u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&e[r++],s--;1<s?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return c(u,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--o;);i%=65521,s%=65521}return i|s<<16|0}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var s=n,o=i+r;e^=-1;for(var a=i;a<o;a++)e=e>>>8^s[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),s=e("./trees"),o=e("./adler32"),a=e("./crc32"),c=e("./messages"),u=0,l=0,d=-2,p=2,h=8,m=286,f=30,g=19,y=2*m+1,b=15,v=3,w=258,S=w+v+1,E=42,T=113;function I(e,t){return e.msg=c[t],t}function C(e){return(e<<1)-(4<e?9:0)}function A(e){for(var t=e.length;0<=--t;)e[t]=0}function O(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function _(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,O(e.strm)}function D(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var r,n,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-S?e.strstart-(e.w_size-S):0,u=e.window,l=e.w_mask,d=e.prev,p=e.strstart+w,h=u[s+o-1],m=u[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+o]===m&&u[r+o-1]===h&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<p);if(n=w-(p-s),s=p-w,o<n){if(e.match_start=t,a<=(o=n))break;h=u[s+o-1],m=u[s+o]}}}while((t=d[t&l])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function x(e){var t,r,n,s,c,u,l,d,p,h,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-S)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;n=e.head[--t],e.head[t]=m<=n?n-m:0,--r;);for(t=r=m;n=e.prev[--t],e.prev[t]=m<=n?n-m:0,--r;);s+=m}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.lookahead,h=void 0,(p=s)<(h=u.avail_in)&&(h=p),r=0===h?0:(u.avail_in-=h,i.arraySet(l,u.input,u.next_in,h,d),1===u.state.wrap?u.adler=o(u.adler,l,h,d):2===u.state.wrap&&(u.adler=a(u.adler,l,h,d)),u.next_in+=h,u.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=v)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+v-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<v)););}while(e.lookahead<S&&0!==e.strm.avail_in)}function R(e,t){for(var r,n;;){if(e.lookahead<S){if(x(e),e.lookahead<S&&t===u)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=v&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-S&&(e.match_length=k(e,r)),e.match_length>=v)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-v),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=v){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<v-1?e.strstart:v-1,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function U(e,t){for(var r,n,i;;){if(e.lookahead<S){if(x(e),e.lookahead<S&&t===u)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=v&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=v-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-S&&(e.match_length=k(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===v&&4096<e.strstart-e.match_start)&&(e.match_length=v-1)),e.prev_length>=v&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-v,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-v),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=v-1,e.strstart++,n&&(_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=s._tr_tally(e,0,e.window[e.strstart-1]))&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<v-1?e.strstart:v-1,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function M(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function N(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=h,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*y),this.dyn_dtree=new i.Buf16(2*(2*f+1)),this.bl_tree=new i.Buf16(2*(2*g+1)),A(this.dyn_ltree),A(this.dyn_dtree),A(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(b+1),this.heap=new i.Buf16(2*m+1),A(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*m+1),A(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=p,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?E:T,e.adler=2===t.wrap?0:1,t.last_flush=u,s._tr_init(t),l):I(e,d)}function $(e){var t=j(e);return t===l&&function(e){e.window_size=2*e.w_size,A(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=v-1,e.match_available=0,e.ins_h=0}(e.state),t}function F(e,t,r,n,s,o){if(!e)return d;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||9<s||r!==h||n<8||15<n||t<0||9<t||o<0||4<o)return I(e,d);8===n&&(n=9);var c=new N;return(e.state=c).strm=e,c.wrap=a,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=s+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+v-1)/v),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<s+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=o,c.method=r,$(e)}n=[new M(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-S&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(_(e,!1),e.strm.avail_out),1)})),new M(4,4,8,4,R),new M(4,5,16,8,R),new M(4,6,32,32,R),new M(4,4,16,16,U),new M(8,16,32,32,U),new M(8,16,128,128,U),new M(8,32,128,256,U),new M(32,128,258,1024,U),new M(32,258,258,4096,U)],r.deflateInit=function(e,t){return F(e,t,h,15,8,0)},r.deflateInit2=F,r.deflateReset=$,r.deflateResetKeep=j,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},r.deflate=function(e,t){var r,i,o,c;if(!e||!e.state||5<t||t<0)return e?I(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return I(e,0===e.avail_out?-5:d);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===E)if(2===i.wrap)e.adler=0,D(i,31),D(i,139),D(i,8),i.gzhead?(D(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),D(i,255&i.gzhead.time),D(i,i.gzhead.time>>8&255),D(i,i.gzhead.time>>16&255),D(i,i.gzhead.time>>24&255),D(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),D(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(D(i,255&i.gzhead.extra.length),D(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(D(i,0),D(i,0),D(i,0),D(i,0),D(i,0),D(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),D(i,3),i.status=T);else{var p=h+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=T,P(i,p),0!==i.strstart&&(P(i,e.adler>>>16),P(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),O(e),o=i.pending,i.pending!==i.pending_buf_size));)D(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),O(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,D(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),O(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,D(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&O(e),i.pending+2<=i.pending_buf_size&&(D(i,255&e.adler),D(i,e.adler>>8&255),e.adler=0,i.status=T)):i.status=T),0!==i.pending){if(O(e),0===e.avail_out)return i.last_flush=-1,l}else if(0===e.avail_in&&C(t)<=C(r)&&4!==t)return I(e,-5);if(666===i.status&&0!==e.avail_in)return I(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&666!==i.status){var m=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=w){if(x(e),e.lookahead<=w&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=v&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){o=e.strstart+w;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=w-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=v?(r=s._tr_tally(e,1,e.match_length-v),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==m&&4!==m||(i.status=666),1===m||3===m)return 0===e.avail_out&&(i.last_flush=-1),l;if(2===m&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(A(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),O(e),0===e.avail_out))return i.last_flush=-1,l}return 4!==t?l:i.wrap<=0?1:(2===i.wrap?(D(i,255&e.adler),D(i,e.adler>>8&255),D(i,e.adler>>16&255),D(i,e.adler>>24&255),D(i,255&e.total_in),D(i,e.total_in>>8&255),D(i,e.total_in>>16&255),D(i,e.total_in>>24&255)):(P(i,e.adler>>>16),P(i,65535&e.adler)),O(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?l:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==E&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?I(e,d):(e.state=null,t===T?I(e,-3):l):d},r.deflateSetDictionary=function(e,t){var r,n,s,a,c,u,p,h,m=t.length;if(!e||!e.state)return d;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==E||r.lookahead)return d;for(1===a&&(e.adler=o(e.adler,t,m,0)),r.wrap=0,m>=r.w_size&&(0===a&&(A(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,m-r.w_size,r.w_size,0),t=h,m=r.w_size),c=e.avail_in,u=e.next_in,p=e.input,e.avail_in=m,e.next_in=0,e.input=t,x(r);r.lookahead>=v;){for(n=r.strstart,s=r.lookahead-(v-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+v-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--s;);r.strstart=n,r.lookahead=v-1,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=v-1,r.match_available=0,e.next_in=u,e.input=p,e.avail_in=c,r.wrap=a,l},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,s,o,a,c,u,l,d,p,h,m,f,g,y,b,v,w,S,E,T,I,C,A;r=e.state,n=e.next_in,C=e.input,i=n+(e.avail_in-5),s=e.next_out,A=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,d=r.wnext,p=r.window,h=r.hold,m=r.bits,f=r.lencode,g=r.distcode,y=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{m<15&&(h+=C[n++]<<m,m+=8,h+=C[n++]<<m,m+=8),v=f[h&y];t:for(;;){if(h>>>=w=v>>>24,m-=w,0==(w=v>>>16&255))A[s++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=f[(65535&v)+(h&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}S=65535&v,(w&=15)&&(m<w&&(h+=C[n++]<<m,m+=8),S+=h&(1<<w)-1,h>>>=w,m-=w),m<15&&(h+=C[n++]<<m,m+=8,h+=C[n++]<<m,m+=8),v=g[h&b];r:for(;;){if(h>>>=w=v>>>24,m-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=g[(65535&v)+(h&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&v,m<(w&=15)&&(h+=C[n++]<<m,(m+=8)<w&&(h+=C[n++]<<m,m+=8)),c<(E+=h&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=w,m-=w,(w=s-o)<E){if(l<(w=E-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(I=p,(T=0)===d){if(T+=u-w,w<S){for(S-=w;A[s++]=p[T++],--w;);T=s-E,I=A}}else if(d<w){if(T+=u+d-w,(w-=d)<S){for(S-=w;A[s++]=p[T++],--w;);if(T=0,d<S){for(S-=w=d;A[s++]=p[T++],--w;);T=s-E,I=A}}}else if(T+=d-w,w<S){for(S-=w;A[s++]=p[T++],--w;);T=s-E,I=A}for(;2<S;)A[s++]=I[T++],A[s++]=I[T++],A[s++]=I[T++],S-=3;S&&(A[s++]=I[T++],1<S&&(A[s++]=I[T++]))}else{for(T=s-E;A[s++]=A[T++],A[s++]=A[T++],A[s++]=A[T++],2<(S-=3););S&&(A[s++]=A[T++],1<S&&(A[s++]=A[T++]))}break}}break}}while(n<i&&s<a);n-=S=m>>3,h&=(1<<(m-=S<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<a?a-s+257:257-(s-a),r.hold=h,r.bits=m}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),s=e("./crc32"),o=e("./inffast"),a=e("./inftrees"),c=0,u=-2,l=1,d=852,p=592;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=l,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(d),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,c):u}function g(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):u}function y(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,g(e))):u}function b(e,t){var r,n;return e?(n=new m,(e.state=n).window=null,(r=y(e,t))!==c&&(e.state=null),r):u}var v,w,S=!0;function E(e){if(S){var t;for(v=new n.Buf32(512),w=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,w,0,e.work,{bits:5}),S=!1}e.lencode=v,e.lenbits=9,e.distcode=w,e.distbits=5}function T(e,t,r,i){var s,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(s=o.wsize-o.wnext)&&(s=i),n.arraySet(o.window,t,r-i,s,o.wnext),(i-=s)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}r.inflateReset=g,r.inflateReset2=y,r.inflateResetKeep=f,r.inflateInit=function(e){return b(e,15)},r.inflateInit2=b,r.inflate=function(e,t){var r,d,p,m,f,g,y,b,v,w,S,I,C,A,O,_,D,P,k,x,R,U,M,N,j=0,$=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(r=e.state).mode&&(r.mode=13),f=e.next_out,p=e.output,y=e.avail_out,m=e.next_in,d=e.input,g=e.avail_in,b=r.hold,v=r.bits,w=g,S=y,U=c;e:for(;;)switch(r.mode){case l:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(2&r.wrap&&35615===b){$[r.check=0]=255&b,$[1]=b>>>8&255,r.check=s(r.check,$,2,0),v=b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&b)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,R=8+(15&(b>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&b?10:12,v=b=0;break;case 2:for(;v<16;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(r.flags=b,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=b>>8&1),512&r.flags&&($[0]=255&b,$[1]=b>>>8&255,r.check=s(r.check,$,2,0)),v=b=0,r.mode=3;case 3:for(;v<32;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.head&&(r.head.time=b),512&r.flags&&($[0]=255&b,$[1]=b>>>8&255,$[2]=b>>>16&255,$[3]=b>>>24&255,r.check=s(r.check,$,4,0)),v=b=0,r.mode=4;case 4:for(;v<16;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.head&&(r.head.xflags=255&b,r.head.os=b>>8),512&r.flags&&($[0]=255&b,$[1]=b>>>8&255,r.check=s(r.check,$,2,0)),v=b=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.length=b,r.head&&(r.head.extra_len=b),512&r.flags&&($[0]=255&b,$[1]=b>>>8&255,r.check=s(r.check,$,2,0)),v=b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(I=r.length)&&(I=g),I&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,m,I,R)),512&r.flags&&(r.check=s(r.check,d,I,m)),g-=I,m+=I,r.length-=I),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(I=0;R=d[m+I++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R)),R&&I<g;);if(512&r.flags&&(r.check=s(r.check,d,I,m)),g-=I,m+=I,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(I=0;R=d[m+I++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R)),R&&I<g;);if(512&r.flags&&(r.check=s(r.check,d,I,m)),g-=I,m+=I,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(b!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=b=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}e.adler=r.check=h(b),v=b=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=f,e.avail_out=y,e.next_in=m,e.avail_in=g,r.hold=b,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){b>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}switch(r.last=1&b,v-=1,3&(b>>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6!==t)break;b>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}b>>>=2,v-=2;break;case 14:for(b>>>=7&v,v-=7&v;v<32;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&b,v=b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(I=r.length){if(g<I&&(I=g),y<I&&(I=y),0===I)break e;n.arraySet(p,d,m,I,f),g-=I,m+=I,y-=I,f+=I,r.length-=I;break}r.mode=12;break;case 17:for(;v<14;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(r.nlen=257+(31&b),b>>>=5,v-=5,r.ndist=1+(31&b),b>>>=5,v-=5,r.ncode=4+(15&b),b>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;v<3;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.lens[F[r.have++]]=7&b,b>>>=3,v-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},U=a(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,U){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;_=(j=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,D=65535&j,!((O=j>>>24)<=v);){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(D<16)b>>>=O,v-=O,r.lens[r.have++]=D;else{if(16===D){for(N=O+2;v<N;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(b>>>=O,v-=O,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],I=3+(3&b),b>>>=2,v-=2}else if(17===D){for(N=O+3;v<N;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}v-=O,R=0,I=3+(7&(b>>>=O)),b>>>=3,v-=3}else{for(N=O+7;v<N;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}v-=O,R=0,I=11+(127&(b>>>=O)),b>>>=7,v-=7}if(r.have+I>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;I--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,M={bits:r.lenbits},U=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,U){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},U=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,U){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=y){e.next_out=f,e.avail_out=y,e.next_in=m,e.avail_in=g,r.hold=b,r.bits=v,o(e,S),f=e.next_out,p=e.output,y=e.avail_out,m=e.next_in,d=e.input,g=e.avail_in,b=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;_=(j=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,D=65535&j,!((O=j>>>24)<=v);){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(_&&0==(240&_)){for(P=O,k=_,x=D;_=(j=r.lencode[x+((b&(1<<P+k)-1)>>P)])>>>16&255,D=65535&j,!(P+(O=j>>>24)<=v);){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}b>>>=P,v-=P,r.back+=P}if(b>>>=O,v-=O,r.back+=O,r.length=D,0===_){r.mode=26;break}if(32&_){r.back=-1,r.mode=12;break}if(64&_){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&_,r.mode=22;case 22:if(r.extra){for(N=r.extra;v<N;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.length+=b&(1<<r.extra)-1,b>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;_=(j=r.distcode[b&(1<<r.distbits)-1])>>>16&255,D=65535&j,!((O=j>>>24)<=v);){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(0==(240&_)){for(P=O,k=_,x=D;_=(j=r.distcode[x+((b&(1<<P+k)-1)>>P)])>>>16&255,D=65535&j,!(P+(O=j>>>24)<=v);){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}b>>>=P,v-=P,r.back+=P}if(b>>>=O,v-=O,r.back+=O,64&_){e.msg="invalid distance code",r.mode=30;break}r.offset=D,r.extra=15&_,r.mode=24;case 24:if(r.extra){for(N=r.extra;v<N;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}r.offset+=b&(1<<r.extra)-1,b>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===y)break e;if(I=S-y,r.offset>I){if((I=r.offset-I)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}C=I>r.wnext?(I-=r.wnext,r.wsize-I):r.wnext-I,I>r.length&&(I=r.length),A=r.window}else A=p,C=f-r.offset,I=r.length;for(y<I&&(I=y),y-=I,r.length-=I;p[f++]=A[C++],--I;);0===r.length&&(r.mode=21);break;case 26:if(0===y)break e;p[f++]=r.length,y--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===g)break e;g--,b|=d[m++]<<v,v+=8}if(S-=y,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?s(r.check,p,S,f-S):i(r.check,p,S,f-S)),S=y,(r.flags?b:h(b))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=b=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===g)break e;g--,b+=d[m++]<<v,v+=8}if(b!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=b=0}r.mode=29;case 29:U=1;break e;case 30:U=-3;break e;case 31:return-4;default:return u}return e.next_out=f,e.avail_out=y,e.next_in=m,e.avail_in=g,r.hold=b,r.bits=v,(r.wsize||S!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&T(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,S-=e.avail_out,e.total_in+=w,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?s(r.check,p,S,e.next_out-S):i(r.check,p,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===S||4===t)&&U===c&&(U=-5),U)},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?u:((r.head=t).done=!1,c):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:T(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,c):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,c,u,l,d,p){var h,m,f,g,y,b,v,w,S,E=p.bits,T=0,I=0,C=0,A=0,O=0,_=0,D=0,P=0,k=0,x=0,R=null,U=0,M=new n.Buf16(16),N=new n.Buf16(16),j=null,$=0;for(T=0;T<=15;T++)M[T]=0;for(I=0;I<c;I++)M[t[r+I]]++;for(O=E,A=15;1<=A&&0===M[A];A--);if(A<O&&(O=A),0===A)return u[l++]=20971520,u[l++]=20971520,p.bits=1,0;for(C=1;C<A&&0===M[C];C++);for(O<C&&(O=C),T=P=1;T<=15;T++)if(P<<=1,(P-=M[T])<0)return-1;if(0<P&&(0===e||1!==A))return-1;for(N[1]=0,T=1;T<15;T++)N[T+1]=N[T]+M[T];for(I=0;I<c;I++)0!==t[r+I]&&(d[N[t[r+I]]++]=I);
vendor: 9,855 bytes, lines 40-41
40if(b=0===e?(R=j=d,19):1===e?(R=i,U-=257,j=s,$-=257,256):(R=o,j=a,-1),T=C,y=l,D=I=x=0,f=-1,g=(k=1<<(_=O))-1,1===e&&852<k||2===e&&592<k)return 1;for(;;){for(v=T-D,S=d[I]<b?(w=0,d[I]):d[I]>b?(w=j[$+d[I]],R[U+d[I]]):(w=96,0),h=1<<T-D,C=m=1<<_;u[y+(x>>D)+(m-=h)]=v<<24|w<<16|S|0,0!==m;);for(h=1<<T-1;x&h;)h>>=1;if(0!==h?(x&=h-1,x+=h):x=0,I++,0==--M[T]){if(T===A)break;T=t[r+d[I]]}if(O<T&&(x&g)!==f){for(0===D&&(D=O),y+=C,P=1<<(_=T-D);_+D<A&&!((P-=M[_+D])<=0);)_++,P<<=1;if(k+=1<<_,1===e&&852<k||2===e&&592<k)return 1;u[f=x&g]=O<<24|_<<16|y-l|0}}return 0!==x&&(u[y+x]=T-D<<24|64<<16|0),p.bits=O,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var n=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var s=256,o=286,a=15,c=16,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var m=new Array(60);i(m);var f=new Array(512);i(f);var g=new Array(256);i(g);var y=new Array(29);i(y);var b,v,w,S=new Array(30);function E(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function T(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function I(e){return e<256?f[e]:f[256+(e>>>7)]}function C(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function A(e,t,r){e.bi_valid>c-r?(e.bi_buf|=t<<e.bi_valid&65535,C(e,e.bi_buf),e.bi_buf=t>>c-e.bi_valid,e.bi_valid+=r-c):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function O(e,t,r){A(e,r[2*t],r[2*t+1])}function _(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function D(e,t,r){var n,i,s=new Array(a+1),o=0;for(n=1;n<=a;n++)s[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var c=e[2*i+1];0!==c&&(e[2*i]=_(s[c]++,c))}}function P(e){var t;for(t=0;t<o;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function k(e){8<e.bi_valid?C(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function R(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&x(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!x(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function U(e,t,r){var n,i,o,a,c=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===n?O(e,i,t):(O(e,(o=g[i])+s+1,t),0!==(a=u[o])&&A(e,i-=y[o],a),O(e,o=I(--n),r),0!==(a=l[o])&&A(e,n-=S[o],a)),c<e.last_lit;);O(e,256,t)}function M(e,t){var r,n,i,s=t.dyn_tree,o=t.stat_desc.static_tree,c=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==s[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,c&&(e.static_len-=o[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;1<=r;r--)R(e,s,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],R(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,R(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,o,c,u=t.dyn_tree,l=t.max_code,d=t.stat_desc.static_tree,p=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,g=0;for(s=0;s<=a;s++)e.bl_count[s]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)f<(s=u[2*u[2*(n=e.heap[r])+1]+1]+1)&&(s=f,g++),u[2*n+1]=s,l<n||(e.bl_count[s]++,o=0,m<=n&&(o=h[n-m]),c=u[2*n],e.opt_len+=c*(s+o),p&&(e.static_len+=c*(d[2*n+1]+o)));if(0!==g){do{for(s=f-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[f]--,g-=2}while(0<g);for(s=f;0!==s;s--)for(n=e.bl_count[s];0!==n;)l<(i=e.heap[--r])||(u[2*i+1]!==s&&(e.opt_len+=(s-u[2*i+1])*u[2*i],u[2*i+1]=s),n--)}}(e,t),D(s,l,e.bl_count)}function N(e,t,r){var n,i,s=-1,o=t[1],a=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++a<c&&i===o||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=i,u=(a=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4))}function j(e,t,r){var n,i,s=-1,o=t[1],a=0,c=7,u=4;for(0===o&&(c=138,u=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++a<c&&i===o)){if(a<u)for(;O(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==s&&(O(e,i,e.bl_tree),a--),O(e,16,e.bl_tree),A(e,a-3,2)):a<=10?(O(e,17,e.bl_tree),A(e,a-3,3)):(O(e,18,e.bl_tree),A(e,a-11,7));s=i,u=(a=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4)}}i(S);var $=!1;function F(e,t,r,i){A(e,0+(i?1:0),3),function(e,t,r,i){k(e),C(e,r),C(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}r._tr_init=function(e){$||(function(){var e,t,r,n,i,s=new Array(a+1);for(n=r=0;n<28;n++)for(y[n]=r,e=0;e<1<<u[n];e++)g[r++]=n;for(g[r-1]=n,n=i=0;n<16;n++)for(S[n]=i,e=0;e<1<<l[n];e++)f[i++]=n;for(i>>=7;n<30;n++)for(S[n]=i<<7,e=0;e<1<<l[n]-7;e++)f[256+i++]=n;for(t=0;t<=a;t++)s[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,s[8]++;for(;e<=255;)h[2*e+1]=9,e++,s[9]++;for(;e<=279;)h[2*e+1]=7,e++,s[7]++;for(;e<=287;)h[2*e+1]=8,e++,s[8]++;for(D(h,287,s),e=0;e<30;e++)m[2*e+1]=5,m[2*e]=_(e,5);b=new E(h,u,257,o,a),v=new E(m,l,0,30,a),w=new E(new Array(0),d,0,19,7)}(),$=!0),
41e.l_desc=new T(e.dyn_ltree,b),e.d_desc=new T(e.dyn_dtree,v),e.bl_desc=new T(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,P(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var i,o,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<s;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),M(e,e.l_desc),M(e,e.d_desc),a=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),M(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==t?F(e,t,r,n):4===e.strategy||o===i?(A(e,2+(n?1:0),3),U(e,h,m)):(A(e,4+(n?1:0),3),function(e,t,r,n){var i;for(A(e,t-257,5),A(e,r-1,5),A(e,n-4,4),i=0;i<n;i++)A(e,e.bl_tree[2*p[i]+1],3);j(e,e.dyn_ltree,t-1),j(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),U(e,e.dyn_ltree,e.dyn_dtree)),P(e),n&&k(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(g[r]+s+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){A(e,2,3),O(e,256,h),function(e){16===e.bi_valid?(C(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,n,i,s,o=1,a={},c=!1,u=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(s="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){i.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(n=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(p,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return a[o]=i,r(o),o++},l.clearImmediate=d}function d(e){delete a[e]}function p(e){if(c)setTimeout(p,0,e);else{var r=a[e];if(r){c=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{d(e),c=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},856201:(e,t,r)=>{"use strict";function n(e){this.j={},this.jr=[],this.jd=null,this.t=e}r.r(t),r.d(t,{default:()=>Ge}),n.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var r=t,n=this.j[e];if(n)return r&&(n.t=r),n;n=i();var s=c(this,e);return s?(Object.assign(n.j,s.j),n.jr.append(s.jr),n.jr=s.jd,n.t=r||s.t):n.t=r,this.j[e]=n,n}};var i=function(){return new n},s=function(e){return new n(e)},o=function(e,t,r){e.j[t]||(e.j[t]=r)},a=function(e,t,r){e.jr.push([t,r])},c=function(e,t){var r=e.j[t];
41if(r)return r;for(var n=0;n<e.jr.length;n++){var i=e.jr[n][0],s=e.jr[n][1];if(i.test(t))return s}return e.jd},u=function(e,t,r){for(var n=0;n<t.length;n++)o(e,t[n],r)},l=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0],i=t[r][1];o(e,n,i)}},d=function(e,t,r,n){for(var i,s=0,a=t.length;s<a&&(i=e.j[t[s]]);)e=i,s++;if(s>=a)return[];for(;s<a-1;)i=n(),o(e,t[s],i),e=i,s++;o(e,t[a-1],r)},p="DOMAIN",h="LOCALHOST",m="TLD",f="NUM",g="PROTOCOL",y="MAILTO",b="WS",v="NL",w="OPENBRACE",S="OPENBRACKET",E="OPENANGLEBRACKET",T="OPENPAREN",I="CLOSEBRACE",C="CLOSEBRACKET",A="CLOSEANGLEBRACKET",O="CLOSEPAREN",_="AMPERSAND",D="APOSTROPHE",P="ASTERISK",k="AT",x="BACKSLASH",R="BACKTICK",U="CARET",M="COLON",N="COMMA",j="DOLLAR",$="DOT",F="EQUALS",G="EXCLAMATION",L="HYPHEN",H="PERCENT",B="PIPE",W="PLUS",q="POUND",V="QUERY",K="QUOTE",z="SEMI",Y="SLASH",J="TILDE",Q="UNDERSCORE",Z="SYM",X=Object.freeze({__proto__:null,DOMAIN:p,LOCALHOST:h,TLD:m,NUM:f,PROTOCOL:g,MAILTO:y,WS:b,NL:v,OPENBRACE:w,OPENBRACKET:S,OPENANGLEBRACKET:E,OPENPAREN:T,CLOSEBRACE:I,CLOSEBRACKET:C,CLOSEANGLEBRACKET:A,CLOSEPAREN:O,AMPERSAND:_,APOSTROPHE:D,ASTERISK:P,AT:k,BACKSLASH:x,BACKTICK:R,CARET:U,COLON:M,COMMA:N,DOLLAR:j,DOT:$,EQUALS:F,EXCLAMATION:G,HYPHEN:L,PERCENT:H,PIPE:B,PLUS:W,POUND:q,QUERY:V,QUOTE:K,SEMI:z,SLASH:Y,TILDE:J,UNDERSCORE:Q,SYM:Z}),ee="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov mov
41ie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე Õ°Õ¡Õµ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 ä
41ºšé©¬é€Š 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),te=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
41D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,re=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,ne=/\uFE0F/,ie=/\d/,se=/\s/;function oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=i(),r=s(f),n=s(p),c=i(),u=s(b),X=[[ie,n],[te,n],[re,n],[ne,n]],oe=function(){var e=s(p);return e.j={"-":c},e.jr=[].concat(X),e},ae=function(e){var t=oe();return t.t=e,t};l(t,[["'",s(D)],["{",s(w)],["[",s(S)],["<",s(E)],["(",s(T)],["}",s(I)],["]",s(C)],[">",s(A)],[")",s(O)],["&",s(_)],["*",s(P)],["@",s(k)],["`",s(R)],["^",s(U)],[":",s(M)],[",",s(N)],["$",s(j)],[".",s($)],["=",s(F)],["!",s(G)],["-",s(L)],["%",s(H)],["|",s(B)],["+",s(W)],["#",s(q)],["?",s(V)],['"',s(K)],["/",s(Y)],[";",s(z)],["~",s(J)],["_",s(Q)],["\\",s(x)]]),o(t,"\n",s(v)),a(t,se,u),o(u,"\n",i()),a(u,se,u);for(var ce=0;ce<ee.length;ce++)d(t,ee[ce],ae(m),oe);var ue=oe(),le=oe(),de=oe(),pe=oe();d(t,"file",ue,oe),d(t,"ftp",le,oe),d(t,"http",de,oe),d(t,"mailto",pe,oe);var he=oe(),me=s(g),fe=s(y);o(le,"s",he),o(le,":",me),o(de,"s",he),o(de,":",me),o(ue,":",me),o(he,":",me),o(pe,":",fe);for(var ge=oe(),ye=0;ye<e.length;ye++)d(t,e[ye],ge,oe);return o(ge,":",me),d(t,"localhost",ae(h),oe),a(t,ie,r),a(t,te,n),a(t,re,n),a(t,ne,n),a(r,ie,r),a(r,te,n),a(r,re,n),a(r,ne,n),o(r,"-",c),o(n,"-",c),o(c,"-",c),a(n,ie,n),a(n,te,n),a(n,re,n),a(n,ne,n),a(c,ie,n),a(c,te,n),a(c,re,n),a(c,ne,n),t.jd=s(Z),t}function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}var ce={defaultProtocol:"http",events:null,format:le,formatHref:le,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function ue(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:ce.defaultProtocol,this.events="events"in e?e.events:ce.events,this.format="format"in e?e.format:ce.format,this.formatHref="formatHref"in e?e.formatHref:ce.formatHref,this.nl2br="nl2br"in e?e.nl2br:ce.nl2br,this.tagName="tagName"in e?e.tagName:ce.tagName,this.target="target"in e?e.target:ce.target,this.rel="rel"in e?e.rel:ce.rel,this.validate="validate"in e?e.validate:ce.validate,this.truncate="truncate"in e?e.truncate:ce.truncate,this.className="
41className"in e?e.className:ce.className,this.attributes=e.attributes||ce.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:ce.ignoreTags),r=0;r<t.length;r++)this.ignoreTags.push(t[r].toUpperCase())}function le(e){return e}function de(){}function pe(e,t){function r(t,r){this.t=e,this.v=t,this.tk=r}return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Object.create(e.prototype);for(var i in r)n[i]=r[i];n.constructor=t,t.prototype=n}(de,r,t),r}ue.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,r){var n,i=this[e];if(!i)return i;switch(ae(i)){case"function":return i(t,r.t);case"object":return"function"==typeof(n=r.t in i?i[r.t]:ce[e])?n(t,r.t):n}return i},getObject:function(e,t,r){var n=this[e];return"function"==typeof n?n(t,r.t):n}},de.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var he=pe("email",{isLink:!0}),me=pe("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),fe=pe("text"),ge=pe("nl"),ye=pe("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce.defaultProtocol,t=this.tk,r=!1,n=!1,i=[],s=0;t[s].t===g;)r=!0,i.push(t[s].v),s++;for(;t[s].t===Y;)n=!0,i.push(t[s].v),s++;for(;s<t.length;s++)i.push(t[s].v);return i=i.join(""),r||n||(i="".concat(e,"://").concat(i)),i},hasProtocol:function(){return this.tk[0].t===g}}),be=Object.freeze({__proto__:null,MultiToken:de,Base:de,createTokenClass:pe,MailtoEmail:he,Email:me,Text:fe,Nl:ge,Url:ye});function ve(){var e=i(),t=i(),r=i(),n=i(),a=i(),c=i(),l=i(),d=s(ye),b=i(),X=s(ye),ee=s(ye),te=i(),re=i(),ne=i(),ie=i(),se=i(),oe=s(ye),ae=s(ye),ce=s(ye),ue=s(ye),le=i(),de=i(),pe=i(),fe=i(),be=i(),ve=i(),we=s(me),Se=i(),Ee=s(me),Te=s(he),Ie=i(),Ce=i(),Ae=i(),Oe=i(),_e=s(ge);o(e,v,_e),o(e,g,t),o(e,y,r),o(t,Y,n),o(n,Y,a),o(e,m,c),o(e,p,c),o(e,h,d),o(e,f,c),o(a,m,ee),o(a,p,ee),o(a,f,ee),o(a,h,ee),o(c,$,l),o(be,$,ve),o(l,m,d),o(l,p,c),o(l,f,c),o(l,h,c),o(ve,m,we),o(ve,p,be),o(ve,f,be),o(ve,h,be),o(d,$,l),o(we,$,ve),o(d,M,b),o(d,Y,ee),o(b,f,X),o(X,Y,ee),o(we,M,Se),o(Se,f,Ee);var De=[_,P,k,x,R,U,j,p,F,L,h,f,H,B,W,q,g,Y,Z,J,m,Q],Pe=[D,A,I,C,O,M,N,$,G,E,w,S,T,V,K,z];o(ee,w,re),o(ee,S,ne),o(ee,E,ie),o(ee,T,se),o(te,w,re),o(te,S,ne),o(te,E,ie),o(te,T,se),o(re,I,ee),o(ne,C,ee),o(ie,A,ee),o(se,O,ee),o(oe,I,ee),o(ae,C,ee),o(ce,A,ee),o(ue,O,ee),o(le,I,ee),o(de,C,ee),o(pe,A,ee),o(fe,O,ee),u(re,De,oe),u(ne,De,ae),u(ie,De,ce),u(se,De,ue),u(re,Pe,le),u(ne,Pe,de),u(ie,Pe,pe),u(se,Pe,fe),u(oe,De,oe),u(ae,De,ae),u(ce,De,ce),u(ue,De,ue),u(oe,Pe,oe),u(ae,Pe,ae),u(ce,Pe,ce),u(ue,Pe,ue),u(le,De,oe),u(de,De,ae),u(pe,De,ce),u(fe,De,ue),u(le,Pe,le),u(de,Pe,de),u(pe,Pe,pe),u(fe,Pe,fe),u(ee,De,ee),u(te,De,ee),u(ee,Pe,te),u(te,Pe,te),o(r,m,Te),o(r,p,Te),o(r,f,Te),o(r,h,Te),u(Te,De,Te),u(Te,Pe,Ie),u(Ie,De,Te),u(Ie,Pe,Ie);var ke=[_,D,P,x,R,U,I,j,p,F,L,f,w,H,B,W,q,V,Y,Z,J,m,Q];return u(c,ke,Ce),o(c,k,Ae),u(d,ke,Ce),o(d,k,Ae),u(l,ke,Ce),u(Ce,ke,Ce),o(Ce,k,Ae),o(Ce,$,Oe),u(Oe,ke,Ce),o(Ae,m,be),o(Ae,p,be),o(Ae,f,be),o(Ae,h,we),e}function we(e,t,r){var n=r[0].s,i=r[r.length-1].e;return new e(t.substr(n,i-n),r)}"undefined"!=typeof console&&console&&console.warn;var Se={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1},Ee={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"'},Te=/^#[xX]([A-Fa-f0-9]+)$/,Ie=/^#([0-9]+)$/,Ce=/^([A-Za-z0-9]+)$/,Ae=function(){function e(e){this.named=e}return e.prototype.parse=function(e){if(e){var t=e.match(Te);return t?String.fromCharCode(parseInt(t[1],16)):(t=e.match(Ie))?String.fromCharCode(parseInt(t[1],10)):(t=e.match(Ce))?this.named[t[1]]||"&"+t[1]+";":void 0}},e}(),Oe=/[\t\n\f ]/,_e=/[A-Za-z]/,De=/\r\n?/g;function Pe(e){return Oe.test(e)}function ke(e){return _e.test(e)}
vendor: 4,212 bytes, line 41
41var xe=function(){function e(e,t,r){void 0===r&&(r="precompile"),this.delegate=e,this.entityParser=t,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||ke(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){Pe(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();Pe(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();Pe(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!Pe(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),r="PUBLIC"===t.toUpperCase(),n="SYSTEM"===t.toUpperCase();(r||n)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),r?this.transitionTo("afterDoctypePublicKeyword"):n&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();Pe(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();Pe(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();Pe(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctype
41SystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();Pe(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();Pe(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();Pe(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Pe(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Pe(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Pe(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Pe(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Pe(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Pe(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||ke(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(De,"\n")}(e);this.index<this.input.length;){var t=this.states[this.state];if(void 0===t)throw new Error("unhandled state "+this.state);t.call(this)}},e.prototype.tokenizeEOF=function(){this.flushData()},e.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},e.prototype.peek=function(){return this.input.charAt(this.index)},e.prototype.consume=function(){var e=this.peek();return this.index++,"\n"===e?(this.line++,this.column=0):this.column++,e},e.prototype.consumeCharRef=function(){var e=this.input.indexOf(";",this.index);if(-1!==e){var t=this.input.slice(this.index,e),r=this.entityParser.parse(t);if(r){for(var n=t.length;n;)this.consume(),n--;return this.consume(),r}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(e){this.tagNameBuffer+=e,this.delegate.appendToTagName(e)},e.prototype.isIgnoredEndTag=function(){var e=this.tagNameBuffer;return"title"===e&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===e&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),Re=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new xe(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t<arguments.length;t++)if(e.type===arguments[t])return e;throw new Error("token type was unexpectedly "+e.type)},e.prototype.push=function(e){this.token=e,this.tokens.push(e)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(e){this.current("Doctype").name+=e},e.prototype.appendToDoctypePublicIdentifier=function(e){var t=this.current("Doctype");void 0===t.publicIdentifier?t.publicIdentifier=e:t.publicIdentifier+=e},e.prototype.appendToDoctypeSystemIdentifier=function(e){var t=this.current("Doctype");void 0===t.systemIdentifier?t.systemIdentifier=e:t.systemIdentifier+=e},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(e){this.current("Chars").chars+=e},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(e){this.current("Comment").chars+=e},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(e){this.current("StartTag","EndTag").tagName+=e},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(e){this.currentAttribute()[0]+=e},e.prototype.beginAttributeValue=function(e){this.currentAttribute()[2]=e},e.prototype.appendToAttributeValue=function(e){this.currentAttribute()[1]+=e},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(e){this.current().syntaxError=e},e}(),Ue=ue,Me="StartTag",Ne="EndTag",je="Chars",$e="Comment",Fe="Doctype";function Ge(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t=e,new Re(new Ae(Ee),void 0).tokenize(t)),i=[],s=[];r=new Ue(r);for(var o=0;o<n.length;o++){var a=n[o];if(a.type!==Me)if(a.type===je){var c=Le(a.chars,r);i.push.apply(i,c)}else i.push(a);else{i.push(a);var u=a.tagName.toUpperCase();if(!("A"===u||r.ignoreTags.indexOf(u)>=0))continue;var l=i.length;He(u,n,++o,i),o+=i.length-l-1}}for(var d=0;d<i.length;d++){var p=i[d];switch(p.type){case Me:var h="<"+p.tagName;p.attributes.length>0&&(h+=" "+Be(p.attributes).join(" ")),h+=">",s.push(h);break;case Ne:s.push("</".concat(p.tagName,">"));break;case je:s.push(p.chars);break;case $e:s.push("\x3c!--".concat(p.chars,"--\x3e"));break;case Fe:var m="<!DOCTYPE ".concat(p.name);p.publicIdentifier&&(m+=' PUBLIC "'.concat(p.publicIdentifier,'"')),p.systemIdentifier&&(m+=' "'.concat(p.systemIdentifier,'"')),m+=">",s.push(m)}}return s.join("")}function Le(e,t){for(var r=function(e){return Se.initialized||function(){Se.scanner={start:oe(Se.customProtocols),tokens:X},Se.parser={start:ve(),tokens:be};for(var e={createTokenClass:pe},t=0;t<Se.pluginQueue.length;t++)Se.pluginQueue[t][1]({scanner:Se.scanner,parser:Se.parser,utils:e});Se.initialized=!0}(),function(e,t,r){for(var n=r.length,i=0,s=[],o=[];i<n;){for(var a=e,u=null,l=null,d=0,p=null,h=-1;i<n&&!(u=c(a,r[i].t));)o.push(r[i++]);for(;i<n&&(l=u||c(a,r[i].t));)u=null,(a=l).accepts()?(h=0,p=a):h>=0&&h++,i++,d++;if(h<0)for(var m=i-d;m<i;m++)o.push(r[m]);else{o.length>
410&&(s.push(we(fe,t,o)),o=[]),i-=h,d-=h;var f=p.t,g=r.slice(i-d,i);s.push(we(f,t,g))}}return o.length>0&&s.push(we(fe,t,o)),s}(Se.parser.start,e,function(e,t){for(var r=function(e){for(var t=[],r=e.length,n=0;n<r;){var i=e.charCodeAt(n),s=void 0,o=i<55296||i>56319||n+1===r||(s=e.charCodeAt(n+1))<56320||s>57343?e[n]:e.slice(n,n+2);t.push(o),n+=o.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),n=r.length,i=[],s=0,o=0;o<n;){for(var a=e,u=null,l=0,d=null,p=-1,h=-1;o<n&&(u=c(a,r[o]));)(a=u).accepts()?(p=0,h=0,d=a):p>=0&&(p+=r[o].length,h++),l+=r[o].length,s+=r[o].length,o++;s-=p,o-=h,l-=p,i.push({t:d.t,v:t.substr(s-l,l),s:s-l,e:s})}return i}(Se.scanner.start,e))}(e),n=[],i=0;i<r.length;i++){var s=r[i];if("nl"===s.t&&t.nl2br)n.push({type:Me,tagName:"br",attributes:[],selfClosing:!0});else if(s.isLink&&t.check(s)){var o=t.resolve(s),a=o.formatted,u=o.formattedHref,l=o.tagName,d=o.className,p=o.target,h=o.rel,m=o.attributes,f=o.truncate,g=[["href",u]];for(var y in d&&g.push(["class",d]),p&&g.push(["target",p]),h&&g.push(["rel",h]),f&&a.length>f&&(a=a.substring(0,f)+"…"),m)g.push([y,m[y]]);n.push({type:Me,tagName:l,attributes:g,selfClosing:!1}),n.push({type:je,chars:a}),n.push({type:Ne,tagName:l})}else n.push({type:je,chars:s.toString()})}return n}function He(e,t,r,n){for(var i=1;r<t.length&&i>0;){var s=t[r];s.type===Me&&s.tagName.toUpperCase()===e?i++:s.type===Ne&&s.tagName.toUpperCase()===e&&i--,n.push(s),r++}return n}function Be(e){for(var t=[],r=0;r<e.length;r++){var n=e[r][0],i=e[r][1];t.push("".concat(n,'="').concat(i.replace(/"/g,"&quot;"),'"'))}return t}},519541:(e,t,r)=>{var n;!function(i){var s=/^\s+/,o=/\s+$/,a=0,c=i.round,u=i.min,l=i.max,d=i.random;function p(e,t){if(t=t||{},(e=e||"")instanceof p)return e;if(!(this instanceof p))return new p(e,t);var r=function(e){var t,r,n,a={r:0,g:0,b:0},c=1,d=null,p=null,h=null,m=!1,f=!1;return"string"==typeof e&&(e=function(e){e=e.replace(s,"").replace(o,"").toLowerCase();var t,r=!1;if(P[e])e=P[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=B.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=B.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=B.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=B.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=B.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=B.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=B.hex8.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:F(t[4]),format:r?"name":"hex8"}:(t=B.hex6.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:r?"name":"hex"}:(t=B.hex4.exec(e))?{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=B.hex3.exec(e))&&{
42r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(t=e.r,r=e.g,n=e.b,a={r:255*R(t,255),g:255*R(r,255),b:255*R(n,255)},m=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(d=j(e.s),p=j(e.v),a=function(e,t,r){e=6*R(e,360),t=R(t,100),r=R(r,100);var n=i.floor(e),s=e-n,o=r*(1-t),a=r*(1-s*t),c=r*(1-(1-s)*t),u=n%6;return{r:255*[r,a,o,o,c,r][u],g:255*[c,r,r,a,o,o][u],b:255*[o,o,c,r,r,a][u]}}(e.h,d,p),m=!0,f="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(d=j(e.s),h=j(e.l),a=function(e,t,r){var n,i,s;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=R(e,360),t=R(t,100),r=R(r,100),0===t)n=i=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=o(c,a,e+1/3),i=o(c,a,e),s=o(c,a,e-1/3)}return{r:255*n,g:255*i,b:255*s}}(e.h,d,h),m=!0,f="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=x(c),{ok:m,format:e.format||f,r:u(255,l(a.r,0)),g:u(255,l(a.g,0)),b:u(255,l(a.b,0)),a:c}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=a++}
vendor: 7,082 bytes, line 42
42function h(e,t,r){e=R(e,255),t=R(t,255),r=R(r,255);var n,i,s=l(e,t,r),o=u(e,t,r),a=(s+o)/2;if(s==o)n=i=0;else{var c=s-o;switch(i=a>.5?c/(2-s-o):c/(s+o),s){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:i,l:a}}function m(e,t,r){e=R(e,255),t=R(t,255),r=R(r,255);var n,i,s=l(e,t,r),o=u(e,t,r),a=s,c=s-o;if(i=0===s?0:c/s,s==o)n=0;else{switch(s){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:i,v:a}}function f(e,t,r,n){var i=[N(c(e).toString(16)),N(c(t).toString(16)),N(c(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,r,n){return[N($(n)),N(c(e).toString(16)),N(c(t).toString(16)),N(c(r).toString(16))].join("")}function y(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.s-=t/100,r.s=U(r.s),p(r)}function b(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.s+=t/100,r.s=U(r.s),p(r)}function v(e){return p(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.l+=t/100,r.l=U(r.l),p(r)}function S(e,t){t=0===t?0:t||10;var r=p(e).toRgb();return r.r=l(0,u(255,r.r-c(-t/100*255))),r.g=l(0,u(255,r.g-c(-t/100*255))),r.b=l(0,u(255,r.b-c(-t/100*255))),p(r)}function E(e,t){t=0===t?0:t||10;var r=p(e).toHsl();return r.l-=t/100,r.l=U(r.l),p(r)}function T(e,t){var r=p(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,p(r)}function I(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function C(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+120)%360,s:t.s,l:t.l}),p({h:(r+240)%360,s:t.s,l:t.l})]}function A(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+90)%360,s:t.s,l:t.l}),p({h:(r+180)%360,s:t.s,l:t.l}),p({h:(r+270)%360,s:t.s,l:t.l})]}function O(e){var t=p(e).toHsl(),r=t.h;return[p(e),p({h:(r+72)%360,s:t.s,l:t.l}),p({h:(r+216)%360,s:t.s,l:t.l})]}function _(e,t,r){t=t||6,r=r||30;var n=p(e).toHsl(),i=360/r,s=[p(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(p(n));return s}function D(e,t){t=t||6;for(var r=p(e).toHsv(),n=r.h,i=r.s,s=r.v,o=[],a=1/t;t--;)o.push(p({h:n,s:i,v:s})),s=(s+a)%1;return o}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=x(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var s=[N(c(e).toString(16)),N(c(t).toString(16)),N(c(r).toString(16)),N($(n))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*R(this._r,255))+"%",g:c(100*R(this._g,255))+"%",b:c(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*R(this._r,255))+"%, "+c(100*R(this._g,255))+"%, "+c(100*R(this._b,255))+"%)":"rgba("+c(100*R(this._r,255))+"%, "+c(100*R(this._g,255))+"%, "+c(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=p(e);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(I,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:j(e[n]));e=r}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,r){r=0===r?0:r||50;var n=p(e).toRgb(),i=p(t).toRgb(),s=r/100;return p({r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)
vendor: 2,230 bytes, line 42
42*s+n.a})},p.readability=function(e,t){var r=p(e),n=p(t);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(e,t,r){var n,i,s,o,a,c=p.readability(e,t);switch(i=!1,(s=r,"AA"!==(o=((s=s||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(a=(s.size||"small").toLowerCase())&&"large"!==a&&(a="small"),n={level:o,size:a}).level+n.size){case"AAsmall":case"AAAlarge":i=c>=4.5;break;case"AAlarge":i=c>=3;break;case"AAAsmall":i=c>=7}return i},p.mostReadable=function(e,t,r){var n,i,s,o,a=null,c=0;i=(r=r||{}).includeFallbackColors,s=r.level,o=r.size;for(var u=0;u<t.length;u++)(n=p.readability(e,t[u]))>c&&(c=n,a=p(t[u]));return p.isReadable(e,a,{level:s,size:o})||!i?a:(r.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],r))};var P=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
420",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=p.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(P);function x(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,l(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function U(e){return u(1,l(0,e))}function M(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function j(e){return e<=1&&(e=100*e+"%"),e}function $(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return M(e)/255}var G,L,H,B=(L="[\\s|\\(]+("+(G="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+G+")[,|\\s]+("+G+")\\s*\\)?",H="[\\s|\\(]+("+G+")[,|\\s]+("+G+")[,|\\s]+("+G+")[,|\\s]+("+G+")\\s*\\)?",{CSS_UNIT:new RegExp(G),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"
42+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(n=function(){return p}.call(t,r,t,e))||(e.exports=n)}(Math)},881976:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ue});for(var n="undefined"!=typeof window&&"undefined"!=typeof document,i=["Edge","Trident","Firefox"],s=0,o=0;o<i.length;o+=1)if(n&&navigator.userAgent.indexOf(i[o])>=0){s=1;break}var a=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),s))}};function c(e){return e&&"[object Function]"==={}.toString.call(e)}function u(e,t){if(1!==e.nodeType)return[];var r=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?r[t]:r}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function d(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=u(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:d(l(e))}var p=n&&!(!window.MSInputMethodContext||!document.documentMode),h=n&&/MSIE 10/.test(navigator.userAgent);function m(e){return 11===e?p:10===e?h:p||h}function f(e){if(!e)return document.documentElement;for(var t=m(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===u(r,"position")?f(r):r:e?e.ownerDocument.documentElement:document.documentElement}function g(e){return null!==e.parentNode?g(e.parentNode):e}function y(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,s=document.createRange();s.setStart(n,0),s.setEnd(i,0);var o,a,c=s.commonAncestorContainer;if(e!==c&&t!==c||n.contains(i))return"BODY"===(a=(o=c).nodeName)||"HTML"!==a&&f(o.firstElementChild)!==o?f(c):c;var u=g(e);return u.host?y(u.host,t):y(e,g(t).host)}function b(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var n=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||n)[t]}return e[t]}function v(e,t){var r="x"===t?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(e["border"+r+"Width"],10)+parseFloat(e["border"+n+"Width"],10)}function w(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],m(10)?parseInt(r["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}function S(e){var t=e.body,r=e.documentElement,n=m(10)&&getComputedStyle(r);return{height:w("Height",t,r,n),width:w("Width",t,r,n)}}var E=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),T=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function C(e){return I({},e,{right:e.left+e.width,bottom:e.top+e.height})}function A(e){var t={};try{if(m(10)){t=e.getBoundingClientRect();var r=b(e,"top"),n=b(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?S(e.ownerDocument):{},o=s.width||e.clientWidth||i.right-i.left,a=s.height||e.clientHeight||i.bottom-i.top,c=e.offsetWidth-o,l=e.offsetHeight-a;if(c||l){var d=u(e);c-=v(d,"x"),l-=v(d,"y"),i.width-=c,i.height-=l}return C(i)}function O(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=m(10),i="HTML"===t.nodeName,s=A(e),o=A(t),a=d(e),c=u(t),l=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);r&&i&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var h=C({top:s.top-o.top-l,left:s.left-o.left-p,width:s.width,height:s.height});
vendor: 5,734 bytes, line 42
42if(h.marginTop=0,h.marginLeft=0,!n&&i){var f=parseFloat(c.marginTop,10),g=parseFloat(c.marginLeft,10);h.top-=l-f,h.bottom-=l-f,h.left-=p-g,h.right-=p-g,h.marginTop=f,h.marginLeft=g}return(n&&!r?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(h=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=b(t,"top"),i=b(t,"left"),s=r?-1:1;return e.top+=n*s,e.bottom+=n*s,e.left+=i*s,e.right+=i*s,e}(h,t)),h}function _(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===u(e,"position"))return!0;var r=l(e);return!!r&&_(r)}function D(e){if(!e||!e.parentElement||m())return document.documentElement;for(var t=e.parentElement;t&&"none"===u(t,"transform");)t=t.parentElement;return t||document.documentElement}function P(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},o=i?D(e):y(e,t);if("viewport"===n)s=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.ownerDocument.documentElement,n=O(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),s=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:b(r),a=t?0:b(r,"left");return C({top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:i,height:s})}(o,i);else{var a=void 0;"scrollParent"===n?"BODY"===(a=d(l(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===n?e.ownerDocument.documentElement:n;var c=O(a,o,i);if("HTML"!==a.nodeName||_(o))s=c;else{var u=S(e.ownerDocument),p=u.height,h=u.width;s.top+=c.top-c.marginTop,s.bottom=p+c.top,s.left+=c.left-c.marginLeft,s.right=h+c.left}}var m="number"==typeof(r=r||0);return s.left+=m?r:r.left||0,s.top+=m?r:r.top||0,s.right-=m?r:r.right||0,s.bottom-=m?r:r.bottom||0,s}function k(e,t,r,n,i){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=P(r,n,s,i),a={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},c=Object.keys(a).map((function(e){return I({key:e},a[e],{area:(t=a[e],t.width*t.height)});var t})).sort((function(e,t){return t.area-e.area})),u=c.filter((function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight})),l=u.length>0?u[0].key:c[0].key,d=e.split("-")[1];return l+(d?"-"+d:"")}function x(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return O(r,n?D(t):y(t,r),n)}function R(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),n=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+n,height:e.offsetHeight+r}}function U(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function M(e,t,r){r=r.split("-")[0];var n=R(e),i={width:n.width,height:n.height},s=-1!==["right","left"].indexOf(r),o=s?"top":"left",a=s?"left":"top",c=s?"height":"width",u=s?"width":"height";return i[o]=t[o]+t[c]/2-n[c]/2,i[a]=r===a?t[a]-n[u]:t[U(a)],i}function N(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function j(e,t,r){return(void 0===r?e:e.slice(0,function(e,t,r){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===r}));var n=N(e,(function(e){return e[t]===r}));return e.indexOf(n)}(e,"name",r))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=e.function||e.fn;e.enabled&&c(r)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=r(t,e))})),t}function $(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=x(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=k(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=j(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function F(e,t){return e.some((function(e){var r=e.name;return e.enabled&&r===t}))}function G(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],s=i?""+i+r:e;if(void 0!==document.body.style[s])return s}return null}function L(){return this.state.isDestroyed=!0,F(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[G("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e){var t=e.ownerDocument;return t?t.defaultView:window}function B(e,t,r,n){var i="BODY"===e.nodeName,s=i?e.ownerDocument.defaultView:e;s.addEventListener(t,r,{passive:!0}),i||B(d(s.parentNode),t,r,n),n.push(s)}function W(e,t,r,n){r.updateBound=n,H(e).addEventListener("resize",r.updateBound,{passive:!0});var i=d(e);return B(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function q(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function V(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,H(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEac
vendor: 8,145 bytes, line 42
42h((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function K(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function z(e,t){Object.keys(t).forEach((function(r){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(r)&&K(t[r])&&(n="px"),e.style[r]=t[r]+n}))}var Y=n&&/Firefox/i.test(navigator.userAgent);function J(e,t,r){var n=N(e,(function(e){return e.name===t})),i=!!n&&e.some((function(e){return e.name===r&&e.enabled&&e.order<n.order}));if(!i){var s="`"+t+"`",o="`"+r+"`";console.warn(o+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return i}var Q=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Z=Q.slice(3);function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Z.indexOf(e),n=Z.slice(r+1).concat(Z.slice(0,r));return t?n.reverse():n}var ee={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,s=i.reference,o=i.popper,a=-1!==["bottom","top"].indexOf(r),c=a?"left":"top",u=a?"width":"height",l={start:T({},c,s[c]),end:T({},c,s[c]+s[u]-o[u])};e.offsets.popper=I({},o,l[n])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var r,n=t.offset,i=e.placement,s=e.offsets,o=s.popper,a=s.reference,c=i.split("-")[0];return r=K(+n)?[+n,0]:function(e,t,r,n){var i=[0,0],s=-1!==["right","left"].indexOf(n),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=o.indexOf(N(o,(function(e){return-1!==e.search(/,|\s/)})));o[a]&&-1===o[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==a?[o.slice(0,a).concat([o[a].split(c)[0]]),[o[a].split(c)[1]].concat(o.slice(a+1))]:[o];return(u=u.map((function(e,n){var i=(1===n?!s:s)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+i[1],o=i[2];return s?0===o.indexOf("%")?C("%p"===o?r:n)[t]/100*s:"vh"===o||"vw"===o?("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*s:s:e}(e,i,t,r)}))}))).forEach((function(e,t){e.forEach((function(r,n){K(r)&&(i[t]+=r*("-"===e[n-1]?-1:1))}))})),i}(n,o,a,c),"left"===c?(o.top+=r[0],o.left-=r[1]):"right"===c?(o.top+=r[0],o.left+=r[1]):"top"===c?(o.left+=r[0],o.top-=r[1]):"bottom"===c&&(o.left+=r[0],o.top+=r[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var r=t.boundariesElement||f(e.instance.popper);e.instance.reference===r&&(r=f(r));var n=G("transform"),i=e.instance.popper.style,s=i.top,o=i.left,a=i[n];i.top="",i.left="",i[n]="";var c=P(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=s,i.left=o,i[n]=a,t.boundaries=c;var u=t.priority,l=e.offsets.popper,d={primary:function(e){var r=l[e];return l[e]<c[e]&&!t.escapeWithReference&&(r=Math.max(l[e],c[e])),T({},e,r)},secondary:function(e){var r="right"===e?"left":"top",n=l[r];return l[e]>c[e]&&!t.escapeWithReference&&(n=Math.min(l[r],c[e]-("right"===e?l.width:l.height))),T({},r,n)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=I({},l,d[t](e))})),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],s=Math.floor,o=-1!==["top","bottom"].indexOf(i),a=o?"right":"bottom",c=o?"left":"top",u=o?"width":"height";return r[a]<s(n[c])&&(e.offsets.popper[c]=s(n[c])-r[u]),r[c]>s(n[a])&&(e.offsets.popper[c]=s(n[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var r;if(!J(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],s=e.offsets,o=s.popper,a=s.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",d=c?"Top":"Left",p=d.toLowerCase(),h=c?"left":"top",m=c?"bottom":"right",f=R(n)[l];a[m]-f<o[p]&&(e.offsets.popper[p]-=o[p]-(a[m]-f)),a[p]+f>o[m]&&(e.offsets.popper[p]+=a[p]+f-o[m]),e.offsets.popper=C(e.offsets.popper);var g=a[p]+a[l]/2-f/2,y=u(e.instance.popper),b=parseFloat(y["margin"+d],10),v=parseFloat(y["border"+d+"Width"],10),w=g-e.offsets.popper[p]-b-v;return w=Math.max(Math.min(o[l]-f,w),0),e.arrowElement=n,e.offsets.arrow=(T(r={},p,Math.round(w)),T(r,h,""),r),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(F(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var r=P(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=U(n),s=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case"flip":o=[n,i];break;case"clockwise":o=X(n);break;case"counterclockwise":o=X(n,!0);break;default:o=t.behavior}return o.forEach((function(a,c){if(n!==a||o.length===c+1)return e;n=e.placement.split("-")[0],i=U(n);var u=e.offsets.popper,l=e.offsets.reference,d=Math.floor,p="left"===n&&d(u.right)>d(l.left)||"right"===n&&d(u.left)<d(l.right)||"top"===n&&d(u.bottom)>d(l.top)||"bottom"===n&&d(u.top)<d(l.bottom),h=d(u.left)<d(r.left),m=d(u.right)>d(r.right),f=d(u.top)<d(r.top),g=d(u.bottom)>d(r.bottom),y="left"===n&&h||"right"===n&&m||"top"===n&&f||"bottom"===n&&g,b=-1!==["top","bottom"].indexOf(n),v=!!t.flipVariations&&(b&&"start"===s&&h||b&&"end"===s&&m||!b&&"start"===s&&f||!b&&"end"===s&&g),w=!!t.flipVariationsByContent&&(b&&"start"===s&&m||b&&"end"===s&&h||!b&&"start"===s&&g||!b&&"end"===s&&f),S=v||w;(p||y||S)&&(e.flipped=!0,(p||y)&&(n=o[c+1]),S&&(s=function(e){return"end"===e?"start":"start"===e?"end":e}(s)),e.placement=n+(s?"-"+s:""),e.offsets.popper=I({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=j(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,s=n.reference,o=-1!==["left","right"].indexOf(r),a=-1===["top","left"].indexOf(r);return i[o?"left":"top"]=s[r]-(a?i[o?"width":"height"]:0),e.placement=U(t),e.offsets.popper=C(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!J(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=N(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var r=t.x,n=t.y,i=e.offsets.popper,s=N(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==s&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o,a,c=void 0!==s?s:t.gpuAcceleration,u=f(e.instance.popper),l=A(u),d={position:i.position},p=function(e,t){var r=e.offsets,n=r.popper,i=r.reference,s=Math.round,o=Math.floor,a=function(e){return e},c=s(i.width),u=s(n.width),l=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?l||d||c%2==u%2?s:o:a,h=t?s:a;return{left:p(c%2==1&&u%2==1&&!d&&t?n.left-1:n.left),top:h(n.top),bottom:h(n.bottom),right:p(n.right)}}(e,window.devicePixelRatio<2||!Y),h="bottom"===r?"top":"bottom",m="right"===n?"left":"right",g=G("transform");if(a="bottom"===h?"HTML"===u.nodeName?-u.clientHeight+p.bottom:-l.he
42ight+p.bottom:p.top,o="right"===m?"HTML"===u.nodeName?-u.clientWidth+p.right:-l.width+p.right:p.left,c&&g)d[g]="translate3d("+o+"px, "+a+"px, 0)",d[h]=0,d[m]=0,d.willChange="transform";else{var y="bottom"===h?-1:1,b="right"===m?-1:1;d[h]=a*y,d[m]=o*b,d.willChange=h+", "+m}var v={"x-placement":e.placement};return e.attributes=I({},v,e.attributes),e.styles=I({},d,e.styles),e.arrowStyles=I({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,r;return z(e.instance.popper,e.styles),t=e.instance.popper,r=e.attributes,Object.keys(r).forEach((function(e){!1!==r[e]?t.setAttribute(e,r[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&z(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,r,n,i){var s=x(i,t,e,r.positionFixed),o=k(r.placement,s,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),z(t,{position:r.positionFixed?"fixed":"absolute"}),r},gpuAcceleration:void 0}},te={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:ee},re=function(){function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=a(this.update.bind(this)),this.options=I({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(I({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){n.options.modifiers[t]=I({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return I({name:e},n.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&c(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return E(e,[{key:"update",value:function(){return $.call(this)}},{key:"destroy",value:function(){return L.call(this)}},{key:"enableEventListeners",value:function(){return q.call(this)}},{key:"disableEventListeners",value:function(){return V.call(this)}}]),e}();re.Utils=("undefined"!=typeof window?window:r.g).PopperUtils,re.placements=Q,re.Defaults=te;const ne=re;var ie=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oe={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},ae=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ce.call(this),r=se({},oe,r),t.jquery&&(t=t[0]),this.reference=t,this.options=r;var n="string"==typeof r.trigger?r.trigger.split(" ").filter((function(e){return-1!==["click","hover","focus"].indexOf(e)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(t,n,r)}return ie(e,[{key:"_create",value:function(e,t,r,n){var i=window.document.createElement("div");i.innerHTML=t.trim();var s=i.childNodes[0];s.id="tooltip_"+Math.random().toString(36).substr(2,10),s.setAttribute("aria-hidden","false");var o=i.querySelector(this.options.innerSelector);return this._addTitleContent(e,r,n,o),s}},{key:"_addTitleContent",value:function(e,t,r,n){if(1===t.nodeType||11===t.nodeType)r&&n.appendChild(t);else if((s=t)&&"[object Function]"==={}.toString.call(s)){var i=t.call(e);r?n.innerHTML=i:n.textContent=i}else r?n.innerHTML=t:n.textContent=t;var s}},{key:"_show",value:function(e,t){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(
42),this;var r=e.getAttribute("title")||t.title;if(!r)return this;var n=this._create(e,t.template,r,t.html);e.setAttribute("aria-describedby",n.id);var i=this._findContainer(t.container,e);return this._append(n,i),this._popperOptions=se({},t.popperOptions,{placement:t.placement}),this._popperOptions.modifiers=se({},this._popperOptions.modifiers,{arrow:se({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:t.arrowSelector}),offset:se({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:t.offset})}),t.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:t.boundariesElement}),this.popperInstance=new ne(e,n,this._popperOptions),this._tooltipNode=n,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var e=this;return this._events.forEach((function(t){var r=t.func,n=t.event;e.reference.removeEventListener(n,r)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}},{key:"_append",value:function(e,t){t.appendChild(e)}},{key:"_setEventListeners",value:function(e,t,r){var n=this,i=[],s=[];t.forEach((function(e){switch(e){case"hover":i.push("mouseenter"),s.push("mouseleave");break;case"focus":i.push("focus"),s.push("blur");break;case"click":i.push("click"),s.push("click")}})),i.forEach((function(t){var i=function(t){!0!==n._isOpening&&(t.usedByTooltip=!0,n._scheduleShow(e,r.delay,r,t))};n._events.push({event:t,func:i}),e.addEventListener(t,i)})),s.forEach((function(t){var i=function(t){!0!==t.usedByTooltip&&n._scheduleHide(e,r.delay,r,t)};n._events.push({event:t,func:i}),e.addEventListener(t,i),"click"===t&&r.closeOnClickOutside&&document.addEventListener("mousedown",(function(t){if(n._isOpening){var r=n.popperInstance.popper;e.contains(t.target)||r.contains(t.target)||i(t)}}),!0)}))}},{key:"_scheduleShow",value:function(e,t,r){var n=this;this._isOpening=!0;var i=t&&t.show||t||0;this._showTimeout=window.setTimeout((function(){return n._show(e,r)}),i)}},{key:"_scheduleHide",value:function(e,t,r,n){var i=this;this._isOpening=!1;var s=t&&t.hide||t||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===n.type&&i._setTooltipNodeEvent(n,e,t,r))return;i._hide(e,r)}}),s)}},{key:"_updateTitleContent",value:function(e){if(void 0!==this._tooltipNode){var t=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(t,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,e,this.options.html,t),this.options.title=e,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=e)}},{key:"_clearTitleContent",value:function(e,t,r){1===r.nodeType||11===r.nodeType?t&&e.removeChild(r):t?e.innerHTML="":e.textContent=""}}]),e}(),ce=function(){var e=this;this.show=function(){return e._show(e.reference,e.options)},this.hide=function(){return e._hide()},this.dispose=function(){return e._dispose()},this.toggle=function(){return e._isOpen?e.hide():e.show()},this.updateTitleContent=function(t){return e._updateTitleContent(t)},this._events=[],this._setTooltipNodeEvent=function(t,r,n,i){var s=t.relatedreference||t.toElement||t.relatedTarget;return!!e._tooltipNode.contains(s)&&(e._tooltipNode.addEventListener(t.type,(function n(s){var o=s.relatedreference||s.toElement||s.relatedTarget;e._tooltipNode.removeEventListener(t.type,n),r.contains(o)||e._scheduleHide(r,i.delay,i,s)})),!0)}};const ue=ae},189106:(e,t,r)=>{"use strict";function n(e){return e}function i(e){if(null==e)return n;var t,r,i=e.scale[0],s=e.scale[1],o=e.translate[0],a=e.translate[1];
vendor: 5,455 bytes, line 42
42return function(e,n){n||(t=r=0);var c=2,u=e.length,l=new Array(u);for(l[0]=(t+=e[0])*i+o,l[1]=(r+=e[1])*s+a;c<u;)l[c]=e[c],++c;return l}}function s(e){var t,r=i(e.transform),n=1/0,s=n,o=-n,a=-n;function c(e){(e=r(e))[0]<n&&(n=e[0]),e[0]>o&&(o=e[0]),e[1]<s&&(s=e[1]),e[1]>a&&(a=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":c(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(c)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,c=e.length;++i<c;)(t=r(e[i],i))[0]<n&&(n=t[0]),t[0]>o&&(o=t[0]),t[1]<s&&(s=t[1]),t[1]>a&&(a=t[1])})),e.objects)u(e.objects[t]);return[n,s,o,a]}function o(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)}function a(e,t){var r=t.id,n=t.bbox,i=null==t.properties?{}:t.properties,s=c(e,t);return null==r&&null==n?{type:"Feature",properties:i,geometry:s}:null==n?{type:"Feature",id:r,properties:i,geometry:s}:{type:"Feature",id:r,bbox:n,properties:i,geometry:s}}function c(e,t){var r=i(e.transform),n=e.arcs;function s(e,t){t.length&&t.pop();for(var i=n[e<0?~e:e],s=0,o=i.length;s<o;++s)t.push(r(i[s],s));e<0&&function(e,t){for(var r,n=e.length,i=n-t;i<--n;)r=e[i],e[i++]=e[n],e[n]=r}(t,o)}function o(e){return r(e)}function a(e){for(var t=[],r=0,n=e.length;r<n;++r)s(e[r],t);return t.length<2&&t.push(t[0]),t}function c(e){for(var t=a(e);t.length<4;)t.push(t[0]);return t}function u(e){return e.map(c)}return function e(t){var r,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(e)};case"Point":r=o(t.coordinates);break;case"MultiPoint":r=t.coordinates.map(o);break;case"LineString":r=a(t.arcs);break;case"MultiLineString":r=t.arcs.map(a);break;case"Polygon":r=u(t.arcs);break;case"MultiPolygon":r=t.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(t)}function u(e,t){var r={},n={},i={},s=[],o=-1;function a(e,t){for(var n in e){var i=e[n];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){r[e<0?~e:e]=1})),s.push(i)}}return t.forEach((function(r,n){var i,s=e.arcs[r<0?~r:r];s.length<3&&!s[1][0]&&!s[1][1]&&(i=t[++o],t[o]=r,t[n]=i)})),t.forEach((function(t){var r,s,o=function(t){var r,n=e.arcs[t<0?~t:t],i=n[0];return e.transform?(r=[0,0],n.forEach((function(e){r[0]+=e[0],r[1]+=e[1]}))):r=n[n.length-1],t<0?[r,i]:[i,r]}(t),a=o[0],c=o[1];if(r=i[a])if(delete i[r.end],r.push(t),r.end=c,s=n[c]){delete n[s.start];var u=s===r?r:r.concat(s);n[u.start=r.start]=i[u.end=s.end]=u}else n[r.start]=i[r.end]=r;else if(r=n[c])if(delete n[r.start],r.unshift(t),r.start=a,s=i[a]){delete i[s.end];var l=s===r?r:s.concat(r);n[l.start=s.start]=i[l.end=r.end]=l}else n[r.start]=i[r.end]=r;else n[(r=[t]).start=a]=i[r.end=c]=r})),a(i,n),a(n,i),t.forEach((function(e){r[e<0?~e:e]||s.push([e])})),s}function l(e){return c(e,d.apply(this,arguments))}function d(e,t,r){var n,i,s;if(arguments.length>1)n=function(e,t,r){var n,i=[],s=[];function o(e){var t=e<0?~e:e;(s[t]||(s[t]=[])).push({i:e,g:n})}function a(e){e.forEach(o)}function c(e){e.forEach(a)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":a(t.arcs);break;case"MultiLineString":case"Polygon":c(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(c)}(t.arcs)}}(t),s.forEach(null==r?function(e){i.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,r);else for(i=0,n=new Array(s=e.arcs.length);i<s;++i)n[i]=i;return{type:"MultiLineString",arcs:u(e,n)}}function p(e){return c(e,h.apply(this,arguments))}function h(e,t){var r={},n=[],i=[];function s(e){e.forEach((function(t){t.forEach((function(t){(r[t=t<0?~t:t]||(r[t]=[])).push(e)}))})),n.push(e)}function o(t){return function(e){for(var t,r=-1,n=e.length,i=e[n-1],s=0;++r<n;)t=i,i=e[r],s+=t[0]*i[1]-t[1]*i[0];return Math.abs(s)}(c(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}})),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,i.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){r[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var n,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){r[e<0?~e:e].length<2&&i.push(e)}))}))})),(n=(i=u(e,i)).length)>1)for(var s,a,c=1,l=o(i[0]);c<n;++c)(s=o(i[c]))>l&&(a=i[0],i[0]=i[c],i[c]=a,l=s);return i})).filter((function(e){return e.length>0}))}}function m(e,t){for(var r=0,n=e.length;r<n;){var i=r+n>>>1;e[i]<t?r=i+1:n=i}return r}function f(e){var t={},r=e.map((function(){return[]}));function n(e,r){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(r):t[e]=[r]}))}function i(e,t){e.forEach((function(e){n(e,t)}))}var s={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(e,t){e.forEach((function(e){i(e,t)}))}};for(var o in e.forEach((function e(t,r){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,r)})):t.type in s&&s[t.type](t.arcs,r)})),t)for(var a=t[o],c=a.length,u=0;u<c;++u)for(var l=u+1;l<c;++l){var d,p=a[u],h=a[l];(d=r[p])[o=m(d,h)]!==h&&d.splice(o,0,h),(d=r[h])[o=m(d,p)]!==p&&d.splice(o,0,p)}return r}function g(e){if(null==e)return n;var t,r,i=e.scale[0],s=e.scale[1],o=e.translate[0],a=e.translate[1];
42return function(e,n){n||(t=r=0);var c=2,u=e.length,l=new Array(u),d=Math.round((e[0]-o)/i),p=Math.round((e[1]-a)/s);for(l[0]=d-t,t=d,l[1]=p-r,r=p;c<u;)l[c]=e[c],++c;return l}}function y(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)c=e.bbox;else{if(!((r=Math.floor(t))>=2))throw new Error("n must be ≥2");var r,n=(c=e.bbox||s(e))[0],i=c[1],o=c[2],a=c[3];t={scale:[o-n?(o-n)/(r-1):1,a-i?(a-i)/(r-1):1],translate:[n,i]}}var c,u,l=g(t),d=e.objects,p={};function h(e){return l(e)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"Point":t={type:"Point",coordinates:h(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(h)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(u in d)p[u]=m(d[u]);return{type:"Topology",bbox:c,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,r=0,n=1,i=e.length,s=new Array(i);for(s[0]=l(e[0],0);++r<i;)((t=l(e[r],r))[0]||t[1])&&(s[n++]=t);return 1===n&&(s[n++]=[0,0]),s.length=n,s}))}}r.r(t),r.d(t,{bbox:()=>s,feature:()=>o,merge:()=>p,mergeArcs:()=>h,mesh:()=>l,meshArcs:()=>d,neighbors:()=>f,quantize:()=>y,transform:()=>i,untransform:()=>g})},732247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>s,__asyncDelegator:()=>S,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>O,__classPrivateFieldSet:()=>_,__createBinding:()=>p,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>A,__importStar:()=>
vendor: 4,686 bytes, lines 42-43
42C,__makeTemplateObject:()=>T,__metadata:()=>u,__param:()=>c,__read:()=>f,__rest:()=>o,__spread:()=>g,__spreadArray:()=>b,__spreadArrays:()=>y,__values:()=>m});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(o,a)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){
43o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}var p=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function h(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||p(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function w(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){
43s.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(c,u):l(s[0][2],r)}catch(e){l(s[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&p(t,e,r);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function _(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}},796079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addFeatures=void 0;const n=r(152176);t.addFeatures=function(e){const t=`${(0,n.cleanUrl)(e.url)}/addFeatures`,r=(0,n.appendCustomParams)(e,["features","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},e.params)});return(0,n.request)(t,r)}},560436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addAttachment=void 0;const n=r(152176);t.addAttachment=function(e){const t=Object.assign({params:{}},e);return t.params.attachment=e.attachment,(0,n.request)(`${(0,n.cleanUrl)(t.url)}/${t.featureId}/addAttachment`,t)}},209405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addToServiceDefinition=void 0;const n=r(152176);t.addToServiceDefinition=function(e,t){const r=`${(0,n.cleanUrl)(e).replace("/rest/services","/rest/admin/services")}/addToDefinition`;return t.params=Object.assign({addToDefinition:{}},t.params),t.layers&&t.layers.length>0&&(t.params.addToDefinition.layers=t.layers),t.tables&&t.tables.length>0&&(t.params.addToDefinition.tables=t.tables),(0,n.request)(r,t)}},616558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyEdits=void 0;const n=r(152176);t.applyEdits=function(e){const t=`${(0,n.cleanUrl)(e.url)}/applyEdits`,r=(0,n.appendCustomParams)(e,["adds","updates","deletes","useGlobalIds","attachments","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},e.params)});return(0,n.request)(t,r)}},101748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFeatureService=void 0;const n=r(152176),i=r(425356);t.createFeatureService=function(e){return(0,i.determineOwner)(e).then((t=>{const r=Object.assign(Object.assign({},e),{rawResponse:!1}),s=`${(0,i.getPortalUrl)(e)}/content/users/${t}${r.folderId&&"/"!==r.folderId?"/"+r.folderId:""}/createService`;return r.params=Object.assign({createParameters:r.item,outputType:"featureService"},r.params),(0,n.request)(s,r)}))}},874837:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.decodeValues=void 0;const n=r(996661);function i(e,t){const r=t.codedValues.find((t=>e===t.code));return r?r.name:e}t.decodeValues=function(e){let t;return t=e.fields?Promise.resolve(e.fields):(0,n.getLayer)({url:e.url}).then((e=>e.fields)),t.then((t=>{const r=function(e){return e.reduce(((e,t)=>{const r=t.domain;return r&&"codedValue"===r.type&&(e[t.name]=r),e}),{})}(t);if(Object.keys(r).length<1)return e.queryResponse;const n=e.queryResponse.features.map((e=>{const t={};for(const n in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,n))continue;const s=e.attributes[n],o=r[n];t[n]=null!==s&&o?i(s,o):s}return Object.assign(Object.assign({},e),{attributes:t})}));return Object.assign(Object.assign({},e.queryResponse),{features:n})}))}},546802:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteFeatures=void 0;const n=r(152176);t.deleteFeatures=function(e){const t=`${(0,n.cleanUrl)(e.url)}/deleteFeatures`,r=(0,n.appendCustomParams)(e,["where","objectIds","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},e.params)});return(0,n.request)(t,r)}},92906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteAttachments=void 0;const n=r(152176);t.deleteAttachments=function(e){const t=Object.assign({params:{}},e);return t.params.attachmentIds=e.attachmentIds,(0,n.request)(`${(0,n.cleanUrl)(t.url)}/${t.featureId}/deleteAttachments`,t)}},264094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllLayersAndTables=void 0;const n=r(732247),i=r(152176),s=r(766513);t.getAllLayersAndTables=function(e){const{url:t}=e,r=(0,n.__rest)(e,["url"]),o=`${(0,s.parseServiceUrl)(t)}/layers`;return(0,i.request)(o,r)}},963306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAttachments=void 0;const n=r(152176);t.getAttachments=function(e){const t=Object.assign({httpMethod:"GET"},e);return(0,n.request)(`${(0,n.cleanUrl)(t.url)}/${t.featureId}/attachments`,t)}},996661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLayer=void 0;const n=r(152176);t.getLayer=function(e){return(0,n.request)((0,n.cleanUrl)(e.url),e)}},294459:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getService=void 0;const n=r(152176);t.getService=function(e){return(0,n.request)((0,n.cleanUrl)(e.url),e)}},59657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getServiceAdminInfo=void 0;const n=r(152176);t.getServiceAdminInfo=function(e,t){const r=e.replace("/rest/services","/rest/admin/services");return(0,n.request)(r,{authentication:t,params:{f:"json"}})}},498625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getViewSources=void 0;const n=r(152176);t.getViewSources=function(e,t){return(0,n.request)(`${e}/sources`,{authentication:t})}},766513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseServiceUrl=void 0;const n=r(152176),i=new RegExp(/.+(?:map|feature|image)server/i);t.parseServiceUrl=function(e){const t=e.match(i);return t?t[0]:function(e){const t=e.split("?")[0];return(0,n.cleanUrl)(t)}(e)}},883276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(732247);(0,n.__exportStar)(r(796079),t),(0,n.__exportStar)(r(560436),t),(0,n.__exportStar)(r(209405),t),(0,n.__exportStar)(r(616558),t),(0,n.__exportStar)(r(101748),t),(0,n.__exportStar)(r(874837),t),(0,n.__exportStar)(r(546802),t),(0,n.__exportStar)(r(92906),t),(0,n.__exportStar)(r(264094),t),(0,n.__exportStar)(r(963306),t),(0,n.__exportStar)(r(996661),t),(0,n.__exportStar)(r(294459),t),(0,n.__exportStar)(r(59657),t),(0,n.__exportStar)(r(498625),t),(0,n.__exportStar)(r(766513),t),(0,n.__exportStar)(r(323175),t),(0,n.__exportStar)(r(256338),t),(0,n.__exportStar)(r(598007),t),(0,n.__exportStar)(r(485986),t),(0,n.__exportStar)(r(742358),t)},323175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryFeatures=t.getFeature=void 0;const n=r(152176);t.getFeature=function(e){const t=`${(0,n.cleanUrl)(e.url)}/${e.id}`,r=Object.assign({httpMethod:"GET"},e);return(0,n.request)(t,r).then((e=>r.rawResponse?e:e.feature))},t.queryFeatures=function(e){const t=(0,n.appendCustomParams)(e,["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:Object.assign({where:"1=1",outFields:"*"},e.params)});return(0,n.request)(`${(0,n.cleanUrl)(e.url)}/query`,t)}},256338:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.queryRelated=void 0;const n=r(152176);t.queryRelated=function(e){const t=(0,n.appendCustomParams)(e,["objectIds","relationshipId","definitionExpression","outFields"],{httpMethod:"GET",params:Object.assign({definitionExpression:"1=1",outFields:"*",relationshipId:0},e.params)});return(0,n.request)(`${(0,n.cleanUrl)(e.url)}/queryRelatedRecords`,t)}},598007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateFeatures=void 0;const n=r(152176);t.updateFeatures=function(e){const t=`${(0,n.cleanUrl)(e.url)}/updateFeatures`,r=(0,n.appendCustomParams)(e,["features","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},e.params)});return(0,n.request)(t,r)}},485986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAttachment=void 0;const n=r(152176);t.updateAttachment=function(e){const t=Object.assign({params:{}},e);return t.params.attachment=e.attachment,t.params.attachmentId=e.attachmentId,(0,n.request)(`${(0,n.cleanUrl)(t.url)}/${t.featureId}/updateAttachment`,t)}},742358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateServiceDefinition=void 0;const n=r(152176);t.updateServiceDefinition=function(e,t){const r=`${(0,n.cleanUrl)(e).replace("/rest/services","/rest/admin/services")}/updateDefinition`;return t.params=Object.assign({updateDefinition:{}},t.params),t.updateDefinition&&(t.params.updateDefinition=t.updateDefinition),(0,n.request)(r,t)}},414010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bulkGeocode=void 0;const n=r(152176),i=r(653440);t.bulkGeocode=function(e){const t=Object.assign({endpoint:i.ARCGIS_ONLINE_BULK_GEOCODING_URL,params:{}},e);return t.params.addresses={records:e.addresses.map((e=>({attributes:e})))},e.authentication||t.endpoint!==i.ARCGIS_ONLINE_BULK_GEOCODING_URL?(0,n.request)(`${(0,n.cleanUrl)(t.endpoint)}/geocodeAddresses`,t).then((e=>{if(t.rawResponse)return e;const r=e.spatialReference;return e.locations.forEach((function(e){e.location&&(e.location.spatialReference=r)})),e})):Promise.reject("bulk geocoding using the ArcGIS service requires authentication")}},860412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.geocode=void 0;const n=r(152176),i=r(653440),s=r(268280);t.geocode=function(e){let t,r={};return"string"==typeof e?(r.params={singleLine:e},t=i.ARCGIS_ONLINE_GEOCODING_URL):(t=e.endpoint||i.ARCGIS_ONLINE_GEOCODING_URL,r=(0,n.appendCustomParams)(e,["singleLine","address","address2","address3","neighborhood","city","subregion","region","postal","postalExt","countryCode","outFields","magicKey"],{params:Object.assign({},e.params)}),r.params.postal&&"number"==typeof r.params.postal&&(0,n.warn)("The postal code should be a string. Issues can arise when using it as a number, especially if they start with zero.")),(0,n.request)(`${(0,n.cleanUrl)(t)}/findAddressCandidates`,r).then((t=>{if("string"!=typeof e&&e.rawResponse)return t;const r=t.spatialReference;if(t.candidates.forEach((function(e){e.location.spatialReference=r,e.extent&&(e.extent.spatialReference=r)})),4326===r.wkid){const e=t.candidates.map((e=>({type:"Feature",geometry:(0,s.arcgisToGeoJSON)(e.location),properties:Object.assign({address:e.address,score:e.score},e.attributes)})));t.geoJson={type:"FeatureCollection",features:e}}return t}))}},653440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGeocodeService=t.ARCGIS_ONLINE_BULK_GEOCODING_URL=t.ARCGIS_ONLINE_GEOCODING_URL=void 0;const n=r(152176);t.ARCGIS_ONLINE_GEOCODING_URL="https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/",t.ARCGIS_ONLINE_BULK_GEOCODING_URL="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/",t.getGeocodeService=function(e){const r=e&&e.endpoint||t.ARCGIS_ONLINE_GEOCODING_URL,i=Object.assign({httpMethod:"GET",maxUrlLength:2e3},e);return(0,n.request)(r,i)}},860120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(732247);(0,n.__exportStar)(r(860412),t),(0,n.__exportStar)(r(849752),t),(0,n.__exportStar)(r(751567),t),(0,n.__exportStar)(r(414010),t),(0,n.__exportStar)(r(653440),t)},751567:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.reverseGeocode=void 0;const n=r(152176),i=r(653440);function s(e,t){const r=Object.assign({endpoint:i.ARCGIS_ONLINE_GEOCODING_URL,params:{}},t);return function(e){return 2===e.length||3===e.length}(e)?r.params.location=e.join():function(e){return void 0!==e.latitude||void 0!==e.lat}(e)?(e.lat&&(r.params.location=e.long+","+e.lat),e.latitude&&(r.params.location=e.longitude+","+e.latitude)):r.params.location=e,(0,n.request)(`${(0,n.cleanUrl)(r.endpoint)}/reverseGeocode`,r)}t.reverseGeocode=s,t.default={reverseGeocode:s}},849752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.suggest=void 0;const n=r(152176),i=r(653440);function s(e,t){const r=Object.assign({endpoint:i.ARCGIS_ONLINE_GEOCODING_URL,params:{}},t);return r.params.text=e,(0,n.request)(`${(0,n.cleanUrl)(r.endpoint)}/suggest`,r)}t.suggest=s,t.default={suggest:s}},174618:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGroupUsers=void 0;const n=r(152176),i=r(552945),s=r(697593);function o(e,t,r){return!t||t.length<1?[]:(0,s.chunk)(t,25).map((t=>function(e,t,r){return Object.assign({},r,{[e]:t,params:Object.assign(Object.assign({},r.params),{[e]:t})})}(e,t,r)))}function a(e){const t=e.filter((e=>e.notAdded)).reduce(((e,t)=>e.concat(t.notAdded)),[]),r=e.filter((e=>e.errors)).reduce(((e,t)=>e.concat(t.errors)),[]),n={notAdded:t};return r.length>0&&(n.errors=r),n}t.addGroupUsers=function(e){const t=e.id,r=`${(0,i.getPortalUrl)(e)}/community/groups/${t}/addUsers`,s=Object.assign({},e,{admins:void 0,users:void 0}),c=[...o("users",e.users,s),...o("admins",e.admins,s)].map((e=>function(e,t){return(0,n.request)(e,t).catch((e=>({errors:[e]})))}(r,e)));return Promise.all(c).then(a)}},482157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGroup=void 0;const n=r(152176),i=r(552945);t.createGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/createGroup`;return e.params=Object.assign(Object.assign({},e.params),e.group),(0,n.request)(t,e)}},318276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchGroupUsers=t.getGroupUsers=t.getGroupContent=t.getGroupCategorySchema=t.getGroup=void 0;const n=r(152176),i=r(552945);t.getGroup=function(e,t){const r=`${(0,i.getPortalUrl)(t)}/community/groups/${e}`,s=Object.assign({httpMethod:"GET"},t);return(0,n.request)(r,s)},t.getGroupCategorySchema=function(e,t){const r=`${(0,i.getPortalUrl)(t)}/community/groups/${e}/categorySchema`,s=Object.assign({httpMethod:"GET"},t);return(0,n.request)(r,s)},t.getGroupContent=function(e,t){const r=`${(0,i.getPortalUrl)(t)}/content/groups/${e}`,s=Object.assign(Object.assign({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(s.params=Object.assign({},t.paging)),(0,n.request)(r,s)},t.getGroupUsers=function(e,t){const r=`${(0,i.getPortalUrl)(t)}/community/groups/${e}/users`,s=Object.assign({httpMethod:"GET"},t);return(0,n.request)(r,s)},t.searchGroupUsers=function(e,t){const r=`${(0,i.getPortalUrl)(t)}/community/groups/${e}/userlist`,s=(0,n.appendCustomParams)(t||{},["name","num","start","sortField","sortOrder","joined","memberType"],{httpMethod:"GET"});return(0,n.request)(r,s)}},511093:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inviteGroupUsers=void 0;const n=r(152176),i=r(552945),s=r(697593);function o(e){const t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat(t.errors||[])),[]),n={success:t};return r.length>0&&(n.errors=r),n}t.inviteGroupUsers=function(e){const t=e.id,r=`${(0,i.getPortalUrl)(e)}/community/groups/${t}/invite`,a=function(e){return(0,s.chunk)(e.users,25).map((t=>function(e,t){const r=Object.assign({},t);return r.params=Object.assign(Object.assign({},r.params),{users:e,role:r.role,expiration:r.expiration}),r}(t,e)))}(e).map((e=>function(e,t){return(0,n.request)(e,t).catch((e=>({errors:[e]})))}(r,e)));return Promise.all(a).then(o)}},809438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.leaveGroup=t.joinGroup=void 0;const n=r(152176),i=r(552945);t.joinGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/join`;return(0,n.request)(t,e)},t.leaveGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/leave`;return(0,n.request)(t,e)}},144838:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.createGroupNotification=void 0;const n=r(152176),i=r(552945);t.createGroupNotification=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/createNotification`,r=Object.assign({params:Object.assign({subject:e.subject,message:e.message,users:e.users,notificationChannelType:e.notificationChannelType||"email",clientId:e.clientId,silentNotification:e.silentNotification,notifyAll:!e.users||0===e.users.length},e.params)},e);return(0,n.request)(t,r)}},802502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unprotectGroup=t.protectGroup=void 0;const n=r(152176),i=r(552945);t.protectGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/protect`;return(0,n.request)(t,e)},t.unprotectGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/unprotect`;return(0,n.request)(t,e)}},9127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeGroupUsers=void 0;const n=r(152176),i=r(552945),s=r(697593);t.removeGroupUsers=function(e){const{id:t,users:r}=e,o=`${(0,i.getPortalUrl)(e)}/community/groups/${t}/removeUsers`,a=(0,s.chunk)(r,25).map((t=>(t=>{const r=Object.assign(Object.assign({},e),{users:t,params:{users:t}});return(0,n.request)(o,r).catch((e=>({errors:[e]})))})(t)));return Promise.all(a).then((e=>{const t=t=>e.filter((e=>e[t])).reduce(((e,r)=>e.concat(r[t])),[]),r=t("errors"),n={notRemoved:t("notRemoved")};return r.length?Object.assign(Object.assign({},n),{errors:r}):n}))}},675795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeGroup=void 0;const n=r(152176),i=r(552945);t.removeGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.id}/delete`,r=Object.assign({},e);return(0,n.request)(t,r)}},780245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchGroupContent=t.searchGroups=void 0;const n=r(440116);t.searchGroups=function(e){return(0,n.genericSearch)(e,"group")},t.searchGroupContent=function(e){return(0,n.genericSearch)(e,"groupContent")}},663690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateUserMemberships=void 0;const n=r(552945),i=r(152176);t.updateUserMemberships=function(e){const t=`${(0,n.getPortalUrl)(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,(0,i.request)(t,r)}},809437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateGroup=void 0;const n=r(152176),i=r(552945);t.updateGroup=function(e){const t=`${(0,i.getPortalUrl)(e)}/community/groups/${e.group.id}/update`;return e.params=Object.assign(Object.assign({},e.params),e.group),(0,n.request)(t,e)}},550037:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},425356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(732247);(0,n.__exportStar)(r(887641),t),(0,n.__exportStar)(r(733771),t),(0,n.__exportStar)(r(300031),t),(0,n.__exportStar)(r(462851),t),(0,n.__exportStar)(r(677902),t),(0,n.__exportStar)(r(533972),t),(0,n.__exportStar)(r(865884),t),(0,n.__exportStar)(r(562184),t),(0,n.__exportStar)(r(868432),t),(0,n.__exportStar)(r(174475),t),(0,n.__exportStar)(r(237540),t),(0,n.__exportStar)(r(57017),t),(0,n.__exportStar)(r(174618),t),(0,n.__exportStar)(r(9127),t),(0,n.__exportStar)(r(29604),t),(0,n.__exportStar)(r(482157),t),(0,n.__exportStar)(r(318276),t),(0,n.__exportStar)(r(511093),t),(0,n.__exportStar)(r(144838),t),(0,n.__exportStar)(r(802502),t),(0,n.__exportStar)(r(675795),t),(0,n.__exportStar)(r(780245),t),(0,n.__exportStar)(r(809437),t),(0,n.__exportStar)(r(663690),t),(0,n.__exportStar)(r(809438),t),(0,n.__exportStar)(r(1),t),(0,n.__exportStar)(r(910337),t),(0,n.__exportStar)(r(535971),t),(0,n.__exportStar)(r(240509),t),(0,n.__exportStar)(r(480095),t),(0,n.__exportStar)(r(84571),t),(0,n.__exportStar)(r(794790),t),(0,n.__exportStar)(r(310531),t),(0,n.__exportStar)(r(250105),t),(0,n.__exportStar)(r(175087),t),(0,n.__exportStar)(r(218913),t),(0,n.__exportStar)(r(941492),t),(0,n.__exportStar)(r(794401),t),(0,n.__exportStar)(r(920646),t),(0,n.__exportStar)(r(802352),t),
43(0,n.__exportStar)(r(758610),t),(0,n.__exportStar)(r(782903),t),(0,n.__exportStar)(r(950685),t),(0,n.__exportStar)(r(324506),t),(0,n.__exportStar)(r(749051),t),(0,n.__exportStar)(r(552945),t),(0,n.__exportStar)(r(90876),t),(0,n.__exportStar)(r(336271),t),(0,n.__exportStar)(r(167188),t),(0,n.__exportStar)(r(550037),t)},887641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addItemResource=t.addItemRelationship=t.addItemData=void 0;const n=r(152176),i=r(552945),s=r(237540),o=r(174475);t.addItemData=function(e){const t=Object.assign({item:{id:e.id,text:e.text,file:e.file}},e);return delete t.id,delete t.data,(0,o.updateItem)(t)},t.addItemRelationship=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/addRelationship`,s=(0,n.appendCustomParams)(e,["originItemId","destinationItemId","relationshipType"],{params:Object.assign({},e.params)});return(0,n.request)(r,s)}))},t.addItemResource=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/addResources`;return e.params=Object.assign({file:e.resource,fileName:e.name,resourcesPrefix:e.prefix,text:e.content,access:e.private?"private":"inherit"},e.params),(0,n.request)(r,e)}))}},733771:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserContent=void 0;const n=r(152176),i=r(552945),s=r(237540);t.getUserContent=e=>{const{folderId:t,start:r=1,num:o=10,authentication:a}=e,c=t?`/${t}`:"";return(0,s.determineOwner)(e).then((t=>`${(0,i.getPortalUrl)(e)}/content/users/${t}${c}`)).then((e=>(0,n.request)(e,{httpMethod:"GET",authentication:a,params:{start:r,num:o}})))}},300031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createItem=t.createItemInFolder=t.createFolder=void 0;const n=r(152176),i=r(552945),s=r(237540);function o(e){return e.multipart&&!e.filename?Promise.reject(new Error("The filename is required for a multipart request.")):(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}`;let o=`${r}/addItem`;e.folderId&&(o=`${r}/${e.folderId}/addItem`),e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&(0,s.isBBox)(e.params.extent)&&(e.params.extent=(0,s.bboxToString)(e.params.extent));const a=(0,n.appendCustomParams)(e,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:Object.assign({},e.params)});return(0,n.request)(o,a)}))}t.createFolder=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/createFolder`;return e.params=Object.assign({title:e.title},e.params),(0,n.request)(r,e)}))},t.createItemInFolder=o,t.createItem=function(e){return o(Object.assign({folderId:null},e))}},462851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportItem=void 0;const n=r(152176),i=r(237540),s=r(552945);t.exportItem=e=>{const{authentication:t,id:r,title:o,exportFormat:a,exportParameters:c}=e;return(0,i.determineOwner)(e).then((t=>`${(0,s.getPortalUrl)(e)}/content/users/${t}/export`)).then((e=>(0,n.request)(e,{httpMethod:"POST",authentication:t,params:{itemId:r,title:o,exportFormat:a,exportParameters:c}})))}},677902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemMetadata=t.getItemInfo=t.getItemParts=t.getItemStatus=t.getItemGroups=t.getItemResource=t.getItemResources=t.getRelatedItems=t.getItemData=t.getItemBaseUrl=t.getItem=void 0;const n=r(152176),i=r(552945),s=r(90876),o=r(237540);function a(e,t){const{fileName:r="iteminfo.xml",readAs:n="text"}=t||{};return c(e,`/info/${r}`,n,Object.assign({httpMethod:"GET"},t))}function c(e,r,i,o){const a=`${(0,t.getItemBaseUrl)(e,o)}${r}`,c=Object.assign({params:{}},o),u=c.rawResponse;return c.rawResponse=!0,c.params.f=null,(0,n.request)(a,c).then((e=>u?e:"json"!==i?e[i]():e.text().then((e=>JSON.parse((0,s.scrubControlChars)(e))))))}t.getItem=function(e,r){const i=(0,t.getItemBaseUrl)(e,r),s=Object.assign({httpMethod:"GET"},r);return(0,n.request)(i,s)},t.getItemBaseUrl=(e,t)=>
43`${"string"==typeof t?t:(0,i.getPortalUrl)(t)}/content/items/${e}`,t.getItemData=function(e,r){const i=`${(0,t.getItemBaseUrl)(e,r)}/data`,s=Object.assign({httpMethod:"GET",params:{}},r);return s.file&&(s.params.f=null),(0,n.request)(i,s).catch((e=>{if(!RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i).test(e.message))throw e}))},t.getRelatedItems=function(e){const r=`${(0,t.getItemBaseUrl)(e.id,e)}/relatedItems`,i=Object.assign({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?i.params.relationshipType=e.relationshipType:i.params.relationshipTypes=e.relationshipType,delete i.direction,delete i.relationshipType,(0,n.request)(r,i)},t.getItemResources=function(e,r){const i=`${(0,t.getItemBaseUrl)(e,r)}/resources`,s=Object.assign({},r);return s.params=Object.assign({num:1e3},s.params),(0,n.request)(i,s)},t.getItemResource=function(e,t){const r=t.readAs||"blob";return c(e,`/resources/${t.fileName}`,r,t)},t.getItemGroups=function(e,r){const i=`${(0,t.getItemBaseUrl)(e,r)}/groups`;return(0,n.request)(i,r)},t.getItemStatus=function(e){return(0,o.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/status`,s=(0,n.appendCustomParams)(e,["jobId","jobType"],{params:Object.assign({},e.params)});return(0,n.request)(r,s)}))},t.getItemParts=function(e){return(0,o.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/parts`;return(0,n.request)(r,e)}))},t.getItemInfo=a,t.getItemMetadata=function(e,t){return a(e,Object.assign(Object.assign({},t),{fileName:"metadata/metadata.xml"}))}},237540:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bboxToString=t.isBBox=t.determineOwner=void 0,t.determineOwner=function(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."))},t.isBBox=function(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])},t.bboxToString=function(e){return e.join(",")}},533972:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unprotectItem=t.protectItem=void 0;const n=r(152176),i=r(552945),s=r(237540);t.protectItem=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/protect`;return(0,n.request)(r,e)}))},t.unprotectItem=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/unprotect`;return(0,n.request)(r,e)}))}},865884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reassignItem=void 0;const n=r(152176),i=r(552945),s=r(802352);t.reassignItem=function(e){return(0,s.isOrgAdmin)(e).then((t=>{if(!t)throw Error(`Item ${e.id} can not be reassigned because current user is not an organization administrator.`);const r=`${(0,i.getPortalUrl)(e)}/content/users/${e.currentOwner}/items/${e.id}/reassign`,s={params:{targetUsername:e.targetUsername,targetFolderName:e.targetFolderName},authentication:e.authentication};return(0,n.request)(r,s)}))}},562184:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeItemThumbnail=t.removeFolder=t.removeItemResource=t.removeItemRelationship=t.removeItem=void 0;const n=r(152176),i=r(552945),s=r(237540);t.removeItem=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/delete`;return(0,n.request)(r,e)}))},t.removeItemRelationship=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/deleteRelationship`,s=(0,n.appendCustomParams)(e,["originItemId","destinationItemId","relationshipType"],{params:Object.assign({},e.params)});return(0,n.request)(r,s)}))},t.removeItemResource=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/removeResources`;return e.params=Object.assign(Object.assign({},e.params),{resource:e.resource}),void 0!==e.deleteAll&&(e.params.deleteAll=e.deleteAll),(0,n.request)(r,e)}))},t.removeFolder=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${encodeURIComponent(t)}/${e.folderId}/delete`;return(0,n.request)(r,e)}))},t.removeItemThumbnail=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}
43/deleteThumbnail`;return(0,n.request)(r,e)}))}},868432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchItems=void 0;const n=r(440116);t.searchItems=function(e){return(0,n.genericSearch)(e,"item")}},174475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveItem=t.updateItemResource=t.updateItemInfo=t.updateItem=void 0;const n=r(152176),i=r(552945),s=r(237540);t.updateItem=function(e){return(0,s.determineOwner)(e).then((t=>{const r=e.folderId?`${(0,i.getPortalUrl)(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.item.id}/update`;return e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&(0,s.isBBox)(e.params.extent)&&(e.params.extent=(0,s.bboxToString)(e.params.extent)),(0,n.request)(r,e)}))},t.updateItemInfo=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/updateinfo`;return e.params=Object.assign({folderName:e.folderName,file:e.file},e.params),(0,n.request)(r,e)}))},t.updateItemResource=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/updateResources`;return e.params=Object.assign({file:e.resource,fileName:e.name,resourcesPrefix:e.prefix,text:e.content},e.params),void 0!==e.private&&(e.params.access=e.private?"private":"inherit"),(0,n.request)(r,e)}))},t.moveItem=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.itemId}/move`;let s=e.folderId;return s||(s="/"),e.params=Object.assign({folder:s},e.params),(0,n.request)(r,e)}))}},57017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelItemUpload=t.commitItemUpload=t.addItemPart=void 0;const n=r(152176),i=r(552945),s=r(237540);t.addItemPart=function(e){const t=e.partNum;return!Number.isInteger(t)||t<1||t>1e4?Promise.reject(new Error("The part number must be an integer between 1 to 10000, inclusive.")):(0,s.determineOwner)(e).then((r=>{const s=`${(0,i.getPortalUrl)(e)}/content/users/${r}/items/${e.id}/addPart?partNum=${t}`,o=(0,n.appendCustomParams)(e,["file"],{params:Object.assign({},e.params)});return(0,n.request)(s,o)}))},t.commitItemUpload=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/commit`,s=(0,n.appendCustomParams)(e,[],{params:Object.assign(Object.assign({},e.params),e.item)});return(0,n.request)(r,s)}))},t.cancelItemUpload=function(e){return(0,s.determineOwner)(e).then((t=>{const r=`${(0,i.getPortalUrl)(e)}/content/users/${t}/items/${e.id}/cancel`;return(0,n.request)(r,e)}))}},1:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOrgNotification=void 0;const n=r(152176),i=r(552945),s=r(697593);function o(e){const t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat(t.errors||[])),[]),n={success:t};return r.length>0&&(n.errors=r),n}t.createOrgNotification=function(e){const t=`${(0,i.getPortalUrl)(e)}/portals/self/createNotification`,r=function(e){return(0,s.chunk)(e.users,e.batchSize||25).map((t=>function(e,t){const r=Object.assign({},t);return r.params=Object.assign(Object.assign({},r.params),{users:e,subject:t.subject,message:t.message,notificationChannelType:r.notificationChannelType}),r}(t,e)))}(e).map((e=>function(e,t){return(0,n.request)(e,t).catch((e=>({errors:[e]})))}(t,e)));return Promise.all(r).then(o)}},758610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueServiceName=void 0;const n=r(782903);t.getUniqueServiceName=function e(t,r,i,s){let o=t;return s&&(o=`${t}_${s}`),(0,n.isServiceNameAvailable)(o,r,i).then((n=>n.available?o:e(t,r,i,s+=1)))}},782903:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServiceNameAvailable=void 0;const n=r(152176);t.isServiceNameAvailable=function(e,t,r){const i=`${r.portal}/portals/self/isServiceNameAvailable`;return(0,n.request)(i,{params:{name:e,type:t},httpMethod:"GET",authentication:r})}},218913:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.setItemAccess=void 0;const n=r(152176),i=r(802352);function s(e,t){return t.params=Object.assign({org:!1,everyone:!1},t.params),"private"===t.access&&(t.params.groups=" "),"org"===t.access&&(t.params.org=!0),"public"===t.access&&(t.params.account=!0,t.params.everyone=!0),(0,n.request)(e,t)}t.setItemAccess=async function(e){const t=await e.authentication.getUsername(),r=(0,i.getSharingUrl)(e,t);return(0,i.isItemOwner)(e,t)?s(r,e):(0,i.isOrgAdmin)(e).then((n=>{if(n)return s(r,e);throw Error(`This item can not be shared by ${t}. They are neither the item owner nor an organization admin.`)}))}},802352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserMembership=t.isOrgAdmin=t.isItemOwner=t.getSharingUrl=void 0;const n=r(552945),i=r(318276);t.getSharingUrl=function(e,t){const r=t||e.authentication.username,i=e.owner||r;return`${(0,n.getPortalUrl)(e)}/content/users/${encodeURIComponent(i)}/items/${e.id}/share`},t.isItemOwner=function(e,t){const r=t||e.authentication.username;return(e.owner||r)===r},t.isOrgAdmin=function(e){return e.authentication.getUser().then((e=>e&&"org_admin"===e.role&&!e.roleId))},t.getUserMembership=function(e){return(0,i.getGroup)(e.groupId,e).then((e=>e.userMembership.memberType)).catch((()=>"none"))}},920646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isItemSharedWithGroup=void 0;const n=r(868432);t.isItemSharedWithGroup=function(e){const t={q:`id: ${e.id} AND group: ${e.groupId}`,start:1,num:10,sortField:"title",authentication:e.authentication,httpMethod:"POST"};return(0,n.searchItems)(t).then((t=>{let r=!1;if(t.total>0)return r=t.results.some((t=>t.id===e.id)),r}))}},941492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureMembership=t.shareItemWithGroup=void 0;const n=r(152176),i=r(552945),s=r(802352),o=r(910337),a=r(174618),c=r(9127),u=r(663690),l=r(920646);async function d(e,t=!1,r=!1){const s=await e.authentication.getUsername(),o=e.owner||s;let a=`${(0,i.getPortalUrl)(e)}/content/items/${e.id}/share`;return(o===s||t&&!r)&&(a=`${(0,i.getPortalUrl)(e)}/content/users/${o}/items/${e.id}/share`),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},(0,n.request)(a,e)}function p(e,t,r,n,i){const s=t.groups||[],o=s.find((e=>e.id===i.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 ${i.groupId} nor can item ${i.id} be shared to the group.`);if(!o&&s.length>511)throw Error(`User ${t.username} already has 512 groups, and can not be added to group ${i.groupId}. Consequently item ${i.id} can not be shared to the group.`);let l,d;if(o)r&&"member"===o.userMembership.memberType?(l=(0,u.updateUserMemberships)({id:i.groupId,users:[t.username],newMemberType:"admin",authentication:i.authentication}).then((e=>{const t=e.results.reduce(((e,t)=>(t.success||e.push(t.username),e)),[]);return Promise.resolve({notAdded:t})})).catch((()=>({notAdded:[t.username]}))),d=e=>(0,u.updateUserMemberships)({id:i.groupId,users:[t.username],newMemberType:"member",authentication:i.authentication}).then((()=>e)).catch((()=>e))):(l=Promise.resolve({notAdded:[]}),d=e=>Promise.resolve(e));else{const e=r?"admins":"users";l=(0,a.addGroupUsers)({id:i.groupId,[e]:[t.username],authentication:i.authentication}).then((e=>{if(e.errors&&e.errors.length)throw e.errors[0];return e})).catch((()=>({notAdded:[t.username]}))),d=e=>(0,c.removeGroupUsers)({id:i.groupId,users:[t.username],authentication:i.authentication}).then((()=>e))}return{promise:l.then((e=>{if(e.notAdded.length)throw new Error(n);return e})),revert:d}}t.shareItemWithGroup=async function(e){return(0,l.isItemSharedWithGroup)(e).then((async t=>{if(t)return{itemId:e.id,shortcut:!0,notSharedWith:[]};const{owner:r,confirmItemControl:n}=e,i=await e.authentication.getUsername(),a=r||i;if(a!==i){let t=!1,r=!1;return Promise.all([(0,o.getUser)({username:i,authentication:e.authentication}),(0,o.getUser)({username:a,authentication:e.authentication}),(0,s.getUserMembership)(e)]).then((([i,s,o])=>{const a=!!n;return t="org_admin"===i.role&&!i.roleId,r=i.orgId!==s.orgId,function(e,t,r,n,i,s){const o=[];if(s.groupId!==e.favGroupId)if(t){if(!n)throw Error(`This item can not be shared to shared editing group ${s.groupId} by ${e.username} as they not the item owner or org admin.`);o.push(p(e,e,!1,`Error adding ${e.username} as member to edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s),p(e,i,!0,"none"===r?`Error adding user ${i.username} to edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`:`Error promoting user ${i.username} to admin in edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s))}else if(n)o.push(p(e,e,!1,`Error adding ${e.username} as member to view group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s));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 ${s.groupId}.`);return o}(i,a,o,t,s,e)})).then((n=>{const[{revert:i}={promise:Promise.resolve({notAdded:[]}),revert:e=>Promise.resolve(e)}]=n;return Promise.all(n.map((({promise:e})=>e))).then((()=>d(e,t,r))).then((e=>i(e)))}))}return d(e)})).then((t=>{if(t.notSharedWith.length)throw Error(`Item ${e.id} could not be shared to group ${e.groupId}.`);return t}))},t.ensureMembership=p},794401:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.unshareItemWithGroup=void 0;const n=r(152176),i=r(552945),s=r(802352),o=r(920646),a=r(910337);t.unshareItemWithGroup=function(e){return(0,o.isItemSharedWithGroup)(e).then((async t=>{if(!t)return Promise.resolve({itemId:e.id,shortcut:!0,notUnsharedFrom:[]});const{owner:r}=e,o=await e.authentication.getUsername();return Promise.all([(0,s.getUserMembership)(e),(0,a.getUser)({username:o,authentication:e.authentication})]).then((([t,s])=>{const a=(r||o)===o,c="org_admin"===s.role&&!s.roleId;if(!a&&!c&&["admin","owner"].indexOf(t)<0)throw Error(`This item can not be unshared from group ${e.groupId} by ${o} as they not the item owner, an org admin, group admin or group owner.`);return async function(e){const t=await e.authentication.getUsername(),r=e.owner||t;let s=`${(0,i.getPortalUrl)(e)}/content/items/${e.id}/unshare`;return r===t&&(s=`${(0,i.getPortalUrl)(e)}/content/users/${r}/items/${e.id}/unshare`),e.params={groups:e.groupId},(0,n.request)(s,e)}(e)})).then((t=>{if(t.notUnsharedFrom.length)throw Error(`Item ${e.id} could not be unshared to group ${e.groupId}`);return t}))}))}},250105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserProperties=void 0;const n=r(152176),i=r(552945);t.getUserProperties=async function(e,t){const r=`${(0,i.getPortalUrl)(t)}/community/users/${encodeURIComponent(e)}/properties`,s=await(0,n.request)(r,Object.assign({httpMethod:"GET"},t));return s.properties.mapViewer||(s.properties.mapViewer="modern"),s.properties}},535971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserTags=void 0;const n=r(152176),i=r(552945),s=r(950685);t.getUserTags=async function(e){const t=await(0,s.determineUsername)(e),r=`${(0,i.getPortalUrl)(e)}/community/users/${t}/tags`;return(0,n.request)(r,e)}},240509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserUrl=void 0;const n=r(552945);t.getUserUrl=function(e){return`${(0,n.getPortalUrl)(e)}/community/users/${encodeURIComponent(e.username)}`}},910337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUser=void 0;const n=r(152176),i=r(552945),s=r(950685);t.getUser=async function(e){let t,r={httpMethod:"GET"};if("string"==typeof e)t=`https://www.arcgis.com/sharing/rest/community/users/${e}`;else{const n=await(0,s.determineUsername)(e);t=`${(0,i.getPortalUrl)(e)}/community/users/${n}`,r=Object.assign(Object.assign({},e),r)}return(0,n.request)(t,r)}},480095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.declineInvitation=t.acceptInvitation=t.getUserInvitation=t.getUserInvitations=void 0;const n=r(152176),i=r(552945),s=r(950685);t.getUserInvitations=async function(e){let t={httpMethod:"GET"};const r=await(0,s.determineUsername)(e),o=`${(0,i.getPortalUrl)(e)}/community/users/${r}/invitations`;return t=Object.assign(Object.assign({},e),t),(0,n.request)(o,t)},t.getUserInvitation=async function(e){const t=await(0,s.determineUsername)(e),r=`${(0,i.getPortalUrl)(e)}/community/users/${t}/invitations/${e.invitationId}`;let o={httpMethod:"GET"};return o=Object.assign(Object.assign({},e),o),(0,n.request)(r,o)},t.acceptInvitation=async function(e){const t=await(0,s.determineUsername)(e),r=`${(0,i.getPortalUrl)(e)}/community/users/${t}/invitations/${e.invitationId}/accept`,o=Object.assign({},e);return(0,n.request)(r,o)},t.declineInvitation=async function(e){const t=await(0,s.determineUsername)(e),r=`${(0,i.getPortalUrl)(e)}/community/users/${t}/invitations/${e.invitationId}/decline`,o=Object.assign({},e);return(0,n.request)(r,o)}},84571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeNotification=t.getUserNotifications=void 0;const n=r(152176),i=r(552945),s=r(950685);t.getUserNotifications=async function(e){let t={httpMethod:"GET"};const r=await(0,s.determineUsername)(e),o=`${(0,i.getPortalUrl)(e)}/community/users/${r}/notifications`;return t=Object.assign(Object.assign({},e),t),(0,n.request)(o,t)},t.removeNotification=async function(e){const t=await(0,s.determineUsername)(e),r=`${(0,i.getPortalUrl)(e)}/community/users/${t}/notifications/${e.id}/delete`;return(0,n.request)(r,e)}},794790:(e,t,r)=>{"use strict";
43Object.defineProperty(t,"__esModule",{value:!0}),t.searchCommunityUsers=t.searchUsers=void 0;const n=r(440116);t.searchUsers=function(e){return(0,n.genericSearch)(e,"user")},t.searchCommunityUsers=function(e){return(0,n.genericSearch)(e,"communityUser")}},175087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setUserProperties=void 0;const n=r(152176),i=r(552945);t.setUserProperties=async function(e,t,r){const s=`${(0,i.getPortalUrl)(r)}/community/users/${encodeURIComponent(e)}/setProperties`,o=Object.assign({httpMethod:"POST",params:{properties:t}},r);try{const e=await(0,n.request)(s,o);if(!e.success)throw new Error("Success was false");return e}catch(e){throw new Error(`Failed to set user properties: ${e.message}`)}}},310531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateUser=void 0;const n=r(152176),i=r(552945);t.updateUser=async function(e){const t=e.user.username||await e.authentication.getUsername(),r=`${(0,i.getPortalUrl)(e)}/community/users/${encodeURIComponent(t)}/update`;return e.params=Object.assign(Object.assign({},e.user),e.params),delete e.user,(0,n.request)(r,e)}},167188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchQueryBuilder=void 0;const n=r(152176);class i{constructor(e=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}match(...e){return this.termStack=this.termStack.concat(e),this}in(e){const t=`\`in(${e?`"${e}"`:""})\``;return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=`${e}:`),this.commit()):((0,n.warn)(`${t} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this)}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?((0,n.warn)("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(e){return this.hasTerms?((0,n.warn)('`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):(this.rangeStack[0]=e,this)}to(e){return this.hasTerms?((0,n.warn)('`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):(this.rangeStack[1]=e,this)}boost(e){return this.commit(),this.q+=`^${e}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new i(this.q+"")}addModifier(e){return this.currentModifer?((0,n.warn)(`You have called \`${this.currentModifer}()\` after \`${e}()\`. Your current query was not modified.`),
44this):(this.commit(),""===this.q&&"not"!==e?((0,n.warn)(`You have called \`${e}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=`${e.toUpperCase()} `,this))}hasWhiteSpace(e){return/\s/g.test(e)}formatTerm(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.hasWhiteSpace(e)?`"${e}"`:e}commit(){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((e=>this.formatTerm(e))).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for((0,n.warn)(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;const e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&(0,n.warn)("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}}t.SearchQueryBuilder=i},697593:(e,t)=>
44{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chunk=void 0,t.chunk=function(e,t){if(0===e.length)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}},950685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineUsername=void 0,t.determineUsername=async function(e){var t;return e.username?encodeURIComponent(e.username):(null===(t=e.authentication)||void 0===t?void 0:t.username)?encodeURIComponent(e.authentication.username):e.authentication?e.authentication.getUsername().then(encodeURIComponent):void 0}},440116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.genericSearch=void 0;const n=r(152176),i=r(167188),s=r(552945);t.genericSearch=function e(t,r){let o,a;switch(o="string"==typeof t||t instanceof i.SearchQueryBuilder?{httpMethod:"GET",params:{q:t}}:(0,n.appendCustomParams)(t,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"}),r){case"item":a="/search";break;case"group":a="/community/groups";break;case"groupContent":if("string"==typeof t||t instanceof i.SearchQueryBuilder||!t.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));a=`/content/groups/${t.groupId}/search`;break;case"communityUser":a="/community/users";break;default:a="/portals/self/users/search"}const c=(0,s.getPortalUrl)(o)+a;return(0,n.request)(c,o).then((n=>(n.nextStart&&-1!==n.nextStart&&(n.nextPage=function(){let s;return"string"==typeof t||t instanceof i.SearchQueryBuilder?s={q:t,start:n.nextStart}:(s=t,s.start=n.nextStart),e(s,r)}),n)))}},749051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPortalSettings=void 0;const n=r(152176),i=r(552945);t.getPortalSettings=function(e,t){const r=e||"self",s=`${(0,i.getPortalUrl)(t)}/portals/${r}/settings`,o=Object.assign({httpMethod:"GET"},t);return(0,n.request)(s,o)}},552945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPortalUrl=void 0;const n=r(152176);t.getPortalUrl=function(e={}){return e.portal?(0,n.cleanUrl)(e.portal):e.authentication&&"string"!=typeof e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}},324506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPortal=t.getSelf=void 0;const n=r(152176),i=r(552945);function s(e,t){const r=e||"self",s=`${(0,i.getPortalUrl)(t)}/portals/${r}`,o=Object.assign({httpMethod:"GET"},t);return(0,n.request)(s,o)}t.getSelf=function(e){return s(null,e)},t.getPortal=s},90876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scrubControlChars=void 0;const r=/[\x00-\x1F\x7F-\x9F\xA0]/g;t.scrubControlChars=function(e){return e.replace(r,"")}},336271:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},288136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKey=t.ApiKeyManager=void 0;const n=r(898498);class i extends n.AuthenticationManagerBase{constructor(e){super(e),this.portal="https://www.arcgis.com/sharing/rest",this.key=e.key}static fromKey(e){return new i("string"==typeof e?{key:e}:e)}get token(){return this.key}getToken(e){return Promise.resolve(this.key)}toJSON(){return{type:"ApiKeyManager",token:this.key,username:this.username,portal:this.portal}}serialize(){return JSON.stringify(this)}static deserialize(e){const t=JSON.parse(e);return new i({key:t.token,username:t.username,portal:t.portal})}}t.ApiKeyManager=i,t.ApiKey=function(e){return console.log("DEPRECATED:, 'ApiKey' is deprecated. Use 'ApiKeyManager' instead."),new i(e)}},33422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationSession=t.ApplicationCredentialsManager=void 0;const n=r(475751),i=r(964697),s=r(898498);class o extends s.AuthenticationManagerBase{constructor(e){super(e),this.clientId=e.clientId,this.clientSecret=e.clientSecret,this.token=e.token,this.expires=e.expires,this.portal=e.portal||"https://www.arcgis.com/sharing/rest",this.duration=e.duration||7200}static fromCredentials(e){return new o(e)}getToken(e,t){return this.token&&this.expires&&this.expires.getTime()>
44Date.now()?Promise.resolve(this.token):(this._pendingTokenRequest||(this._pendingTokenRequest=this.refreshToken(t)),this._pendingTokenRequest)}refreshToken(e){const t=Object.assign({params:{client_id:this.clientId,client_secret:this.clientSecret,grant_type:"client_credentials",expiration:this.duration}},e);return(0,n.fetchToken)(`${this.portal}/oauth2/token/`,t).then((e=>(this._pendingTokenRequest=null,this.setToken(e.token),this.setExpires(e.expires),e.token))).catch((e=>{throw new i.ArcGISTokenRequestError(e.message,i.ArcGISTokenRequestErrorCodes.TOKEN_REFRESH_FAILED,e.response,e.url,e.options)}))}refreshCredentials(){return this.clearCachedUserInfo(),this.refreshToken().then((()=>this))}toJSON(){return{type:"ApplicationCredentialsManager",clientId:this.clientId,clientSecret:this.clientSecret,token:this.token,expires:this.expires,portal:this.portal,duration:this.duration}}serialize(){return JSON.stringify(this.toJSON())}static deserialize(e){const t=JSON.parse(e);return new o({clientId:t.clientId,clientSecret:t.clientSecret,token:t.token,expires:new Date(t.expires),portal:t.portal,duration:t.duration})}setToken(e){this.token=e}setExpires(e){this.expires=e}}t.ApplicationCredentialsManager=o,t.ApplicationSession=function(e){return console.log("DEPRECATED: 'ApplicationSession' is deprecated. Use 'ApplicationCredentialsManager' instead."),new o(e)}},778311:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserSession=t.ArcGISIdentityManager=void 0;const n=r(10604),i=r(315206),s=r(27907),o=r(475751),a=r(69774),c=r(16
445686),u=r(84970),l=r(226421),d=r(445221),p=r(508884),h=r(663085),m=r(964697),f=r(152176),g=r(898498);class y extends g.AuthenticationManagerBase{constructor(e){if(super(e),this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?(0,u.cleanUrl)(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.server=e.server,this.referer=e.referer,this.federatedServers={},this.trustedDomains=[],e.server){const t=this.getServerRootUrl(e.server);this.federatedServers[t]={token:e.token,expires:e.tokenExpires}}this._pendingTokenRequests={}}get token(){return this._token}get tokenExpires(){return this._tokenExpires}get refreshToken(){return this._refreshToken}get refreshTokenExpires(){return this._refreshTokenExpires}get canRefresh(){return!(!this.username||!this.password)||!!(this.clientId&&this.refreshToken&&this.redirectUri)}static beginOAuth2(e,t){!t&&window&&(t=window);const{portal:r,provider:i,clientId:o,expiration:a,redirectUri:c,popup:l,popupWindowFeatures:m,locale:f,params:g,style:b,pkce:v,state:w}=Object.assign({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",locale:"",style:"",pkce:!0},e),S=w||(0,p.generateRandomString)(t),E=`ARCGIS_REST_JS_AUTH_STATE_${o}`;t.localStorage.setItem(E,S);let T=`${(0,u.cleanUrl)(r)}/oauth2/authorize`;const I={client_id:o,response_type:v?"code":"token",expiration:a,redirect_uri:c,state:JSON.stringify({id:S,originalUrl:t.location.href}),locale:f,style:b};let C;if("arcgis"!==i&&(T=`${(0,u.cleanUrl)(r)}/oauth2/social/authorize`,I.socialLoginProviderName=i,I.autoAccountCreateForSocial=!0),v){const e=(0,p.generateRandomString)(t),r=`ARCGIS_REST_JS_CODE_VERIFIER_${o}`;t.localStorage.setItem(r,e),C=(0,d.generateCodeChallenge)(e,t).then((function(t){I.code_challenge_method=t?"S256":"plain",I.code_challenge=t||e}))}else C=Promise.resolve();return C.then((()=>(T=`${T}?${(0,s.encodeQueryString)(I)}`,g&&(T=`${T}&${(0,s.encodeQueryString)(g)}`),l?new Promise(((e,i)=>{t.addEventListener(`arcgis-rest-js-popup-auth-${o}`,(t=>{if("access_denied"===t.detail.error){const e=new h.ArcGISAccessDeniedError;return i(e),e}if(t.detail.errorMessage){const e=new n.ArcGISAuthError(t.detail.errorMessage,t.detail.error);return i(e),e}e(new y({clientId:o,portal:r,ssl:t.detail.ssl,token:t.detail.token,tokenExpires:t.detail.expires,username:t.detail.username,refreshToken:t.detail.refreshToken,refreshTokenExpires:t.detail.refreshTokenExpires,redirectUri:c}))}),{once:!0}),t.open(T,"oauth-window",m),t.dispatchEvent(new CustomEvent("arcgis-rest-js-popup-auth-start"))})):void(t.location.href=T))))}static completeOAuth2(e,t){!t&&window&&(t=window);const{portal:r,clientId:s,popup:a,pkce:c,redirectUri:l}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",popup:!0,pkce:!0},e),d=`ARCGIS_REST_JS_AUTH_STATE_${s}`,p=t.localStorage.getItem(d),m=(0,i.decodeQueryString)(c?t.location.search.replace(/^\?/,""):t.location.hash.replace(/^#/,"")),f=m&&m.state?JSON.parse(m.state):void 0;function g(e,r,i){return t.localStorage.removeItem(d),a&&t.opener?(t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${s}`,{detail:{error:r,errorMessage:e}})),void t.close()):(i&&t.history.replaceState(t.history.state,"",i),"access_denied"===r?Promise.reject(new h.ArcGISAccessDeniedError):Promise.reject(new n.ArcGISAuthError(e,r)))}function b(e,n){return t.localStorage.removeItem(d),a&&t.opener?(t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${s}`,{detail:Object.assign({},e)})),void t.close()):(t.history.replaceState(t.history.state,"",n),new y({clientId:s,portal:r,ssl:e.ssl,token:e.token,tokenExpires:e.expires,username:e.username,refreshToken:e.refreshToken,refreshTokenExpires:e.refreshTokenExpires,redirectUri:l||location.href.replace(location.search,"")}))}if(!p||!f)return g("No authentication state was found, call `ArcGISIdentityManager.beginOAuth2(...)` to start the authentication process.","no-auth-state");
44if(f.id!==p)return g("Saved client state did not match server sent state.","mismatched-auth-state");if(m.error){const e=m.error;return g(m.error_description||"Unknown error",e,f.originalUrl)}if(c&&m.code){const e=(0,u.cleanUrl)(`${r}/oauth2/token/`),n=`ARCGIS_REST_JS_CODE_VERIFIER_${s}`,i=t.localStorage.getItem(n);return t.localStorage.removeItem(n),(0,o.fetchToken)(e,{httpMethod:"POST",params:{client_id:s,code_verifier:i,grant_type:"authorization_code",redirect_uri:l||location.href.replace(location.search,""),code:m.code}}).then((e=>b(Object.assign(Object.assign({},e),f),f.originalUrl))).catch((e=>g(e.originalMessage,e.code,f.originalUrl)))}return!c&&m.access_token?Promise.resolve(b(Object.assign({token:m.access_token,expires:new Date(Date.now()+1e3*parseInt(m.expires_in,10)),ssl:"true"===m.ssl,username:m.username},f),f.originalUrl)):g("Unknown error","oauth-error",f.originalUrl)}static fromParent(e,t){let r;return!t&&window&&(t=window),new Promise(((n,i)=>{r=e=>{if(e.source===t.parent&&e.data)try{return n(y.parentMessageHandler(e))}catch(e){return i(e)}},t.addEventListener("message",r,!1),t.parent.postMessage({type:"arcgis:auth:requestCredential"},e)})).then((e=>(t.removeEventListener("message",r,!1),e)))}static authorize(e,t){const{portal:r,clientId:n,expiration:i,redirectUri:o,state:a}=Object.assign({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),c={client_id:n,expiration:i,response_type:"code",redirect_uri:o};a&&(c.state=a);const u=`${r}/oauth2/authorize?${(0,s.encodeQueryString)(c)}`;t.writeHead(301,{Location:u}),t.end()}static exchangeAuthorizationCode(e,t){const{portal:r,clientId:n,redirectUri:i}=Object.assign({portal:"https://www.arcgis.com/sharing/rest"},e);return(0,o.fetchToken)(`${r}/oauth2/token`,{params:{grant_type:"authorization_code",client_id:n,redirect_uri:i,code:t}}).then((e=>new y({clientId:n,portal:r,ssl:e.ssl,redirectUri:i,refreshToken:e.refreshToken,refreshTokenExpires:e.refreshTokenExpires,token:e.token,tokenExpires:e.expires,username:e.username}))).catch((e=>{throw new m.ArcGISTokenRequestError(e.message,m.ArcGISTokenRequestErrorCodes.REFRESH_TOKEN_EXCHANGE_FAILED,e.response,e.url,e.options)}))}static deserialize(e){const t=JSON.parse(e);return new y({clientId:t.clientId,refreshToken:t.refreshToken,refreshTokenExpires:t.refreshTokenExpires?new Date(t.refreshTokenExpires):void 0,username:t.username,password:t.password,token:t.token,tokenExpires:t.tokenExpires?new Date(t.tokenExpires):void 0,portal:t.portal,ssl:t.ssl,tokenDuration:t.tokenDuration,redirectUri:t.redirectUri,server:t.server})}static fromCredential(e,t){const r=void 0===e.ssl||e.ssl,n=e.expires||Date.now()+72e5;return t.hasServer?new y({server:e.server,ssl:r,token:e.token,username:e.userId,tokenExpires:new Date(n)}):new y({portal:(0,u.cleanUrl)(e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest"),ssl:r,token:e.token,username:e.userId,tokenExpires:new Date(n)})}static parentMessageHandler(e){if("arcgis:auth:credential"===e.data.type){const t=e.data.credential;return function(e){return"string"==typeof e.userId||"number"==typeof e.expires}(t)?y.fromCredential(t,{hasPortal:!0,hasServer:!1,server:t.server}):new y(t)}if("arcgis:auth:error"===e.data.type){const t=new Error(e.data.error.message);throw t.name=e.data.error.name,t}throw new Error("Unknown message type.")}static destroy(e){return(0,l.revokeToken)({clientId:e.clientId,portal:e.portal,token:e.refreshToken||e.token})}static fromToken(e){const t=new y(e);return t.getUser().then((()=>t))}static signIn(e){const t=new y(e);return t.getUser().then((()=>t))}toCredential(){return{expires:this.tokenExpires.getTime(),server:this.server||this.portal,ssl:this.ssl,token:this.token,userId:this.username}}getPortal(e){if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);{const t=`${this.portal}/portals/self`,r=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=(0,n.request)(t,r).then((e=>(this._portalInfo=e,this._pendingPortalRequest=null,e))),this._pendingPortalRequest}}getToken(e,t){return(0,a.canUseOnlineToken)(this.portal,e)||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t)}validateAppAccess(e){return this.getToken(this.portal).then((t=>(0,c.validateAppAccess)(t,e)))}toJSON(){return{type:"ArcGISIdentityManager",clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires||void 0,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires||void 0,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,server:this.server}}serialize(){return JSON.stringify(this)}enablePostMessageAuth(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)}disablePostMessageAuth(e){!e&&window&&(e=window),e.removeEventListener("message",this._hostHandler,!1)}refreshCredentials(e){return this.clearCachedUserInfo(),this.username&&this.password?this.refreshWithUsern
44ameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new m.ArcGISTokenRequestError("Unable to refresh token. No refresh token or password present.",m.ArcGISTokenRequestErrorCodes.TOKEN_REFRESH_FAILED))}getServerRootUrl(e){const[t]=(0,u.cleanUrl)(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/),[r,n,i]=t.match(/(https?:\/\/)(.+)/),[s,...o]=i.split("/");return`${n}${s.toLowerCase()}/${o.join("/")}`}getDomainCredentials(e){return this.trustedDomains&&this.trustedDomains.length?(e=e.toLowerCase(),this.trustedDomains.some((t=>e.startsWith(t.toLowerCase())))?"include":"same-origin"):"same-origin"}signOut(){return y.destroy(this)}createPostMessageHandler(e){return t=>{const r=e.indexOf(t.origin)>-1,n="arcgis:auth:requestCredential"===t.data.type,i=this.tokenExpires.getTime()>Date.now();if(r&&n){let e={};if(i){const t=this.toCredential();t.server=t.server.replace("/sharing/rest",""),e={type:"arcgis:auth:credential",credential:t}}else e={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Token was expired, and not returned to the child application"}};t.source.postMessage(e,t.origin)}}}getTokenForServer(e,t){const r=this.getServerRootUrl(e),i=this.federatedServers[r];return i&&i.expires&&i.expires.getTime()>Date.now()?Promise.resolve(i.token):(this._pendingTokenRequests[r]||(this._pendingTokenRequests[r]=this.fetchAuthorizedDomains().then((()=>(0,n.request)(`${r}/rest/info`,{credentials:this.getDomainCredentials(e)}).then((i=>{if(i.owningSystemUrl){if((0,a.isFederated)(i.owningSystemUrl,this.portal))return(0,n.request)(`${i.owningSystemUrl}/sharing/rest/info`,t);throw new m.ArcGISTokenRequestError(`${e} is not federated with ${this.portal}.`,m.ArcGISTokenRequestErrorCodes.NOT_FEDERATED)}if(i.authInfo&&void 0!==this.federatedServers[r])return Promise.resolve({authInfo:i.authInfo});throw new m.ArcGISTokenRequestError(`${e} is not federated with any portal and is not explicitly trusted.`,m.ArcGISTokenRequestErrorCodes.NOT_FEDERATED)})).then((e=>this.token&&this.tokenExpires.getTime()<Date.now()?this.server?this.refreshCredentials().then((()=>({token:this.token,expires:this.tokenExpires}))):this.refreshCredentials().then((()=>this.generateTokenForServer(e.authInfo.tokenServicesUrl,r))):this.generateTokenForServer(e.authInfo.tokenServicesUrl,r))).then((e=>(this.federatedServers[r]=e,delete this._pendingTokenRequests[r],e.token)))))),this._pendingTokenRequests[r])}generateTokenForServer(e,t){return(0,n.request)(e,{params:{token:this.token,serverUrl:t,expiration:this.tokenDuration}}).then((e=>({token:e.token,expires:new Date(e.expires-3e5)}))).catch((e=>{throw new m.ArcGISTokenRequestError(e.message,m.ArcGISTokenRequestErrorCodes.GENERATE_TOKEN_FOR_SERVER_FAILED,e.response,e.url,e.options)}))}getFreshToken(e){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.refreshCredentials(e).then((()=>(this._pendingTokenRequests[this.portal]=null,this.token)))),this._pendingTokenRequests[this.portal])}refreshWithUsernameAndPassword(e){const t={username:this.username,password:this.password,expiration:this.tokenDuration,client:"referer",referer:this.referer?this.referer:"undefined"!=typeof window&&void 0!==window.document&&window.location&&window.location.origin?window.location.origin:f.NODEJS_DEFAULT_REFERER_HEADER};return(this.server?(0,n.request)(`${this.getServerRootUrl(this.server)}/rest/info`).then((r=>(0,n.request)(r.authInfo.tokenServicesUrl,Object.assign({params:t},e)))):(0,n.request)(`${this.portal}/generateToken`,Object.assign({params:t},e))).then((e=>(this.updateToken(e.token,new Date(e.expires)),this))).catch((e=>{throw new m.ArcGISTokenRequestError(e.message,m.ArcGISTokenRequestErrorCodes.TOKEN_REFRESH_FAILED,e.response,e.url,e.options)}))}refreshWithRefreshToken(e){if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()-864e5<Date.now())return this.exchangeRefreshToken(e);const t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return(0,o.fetchToken)(`${this.portal}/oauth2/token`,t).then((e=>this.updateToken(e.token,e.expires))).catch((e=>{throw new m.ArcGISTokenRequestError(e.message,m.ArcGISTokenRequestErrorCodes.TOKEN_REFRESH_FAILED,e.response,e.url,e.options)}))}updateToken(e,t){return this._token=e,this._tokenExpires=t,this}exchangeRefreshToken(e){const t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return(0,o.fetchToken)(`${this.portal}/oauth2/token`,t).then((e=>(this._token=e.token,this._tokenExpires=e.expires,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this))).catch((e=>{throw new m.ArcGISTokenRequestError(e.message,m.ArcGISTokenRequestErrorCodes.REFRESH_TOKEN_EXCHANGE_FAILED,e.response,e.url,e.options)}))}fetchAuthorizedDomains(){return this.server||!this.portal?Promise.resolve(this):this.getPortal().then((e=>(e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(this.trustedDomains=e.authorizedCrossOriginDomains.filter((e=>!e.startsWith("http://"))).map((e=>e.startsWith("https://")?e:`https://${e}`))),this)))}}function b(e){return console.log("DEPRECATED:, 'UserSession' is deprecated. Use 'ArcGISIdentityManager' instead."),new y(e)}t.ArcGISIdentityManager=y,t.UserSession=b,b.beginOAuth2=function(...e){return console.warn("DEPRECATED:, 'UserSession.beginOAuth2' is deprecated. Use 'ArcGISIdentityManager.beginOAuth2' instead."),y.beginOAuth2(...e)},b.completeOAuth2=function(...e){return console.warn("DEPRECATED:, 'UserSession.completeOAuth2()' is deprecated. Use 'ArcGISIdentityManager.completeOAuth2()' instead."),e.length<=1&&console.warn("WARNING:, 'UserSession.completeOAuth2()' is now async and returns a promise the resolves to an instance of `ArcGISIdentityManager`."),y.completeOAuth2(...e)},b.fromParent=function(...e){return console.warn("DEPRECATED:, 'UserSession.fromParent' is deprecated. Use 'ArcGISIdentityManager.fromParent' instead."),y.fromParent(...e)},b.authorize=function(...e){return console.warn("DEPRECATED:, 'UserSession.authorize' is deprecated. Use 'ArcGISIdentityManager.authorize' instead."),y.authorize(...e)},b.exchangeAuthorizationCode=function(...e){return console.warn("DEPRECATED:, 'UserSession.exchangeAuthorizationCode' is deprecated. Use 'ArcGISIdentityManager.exchangeAuthorizationCode' instead."),y.exchangeAuthorizationCode(...e)},b.fromCredential=function(...e){return console.log("DEPRECATED:, 'UserSession.fromCredential' is deprecated. Use 'ArcGISIdentityManager.fromCredential' instead."),console.warn("WARNING:, 'UserSession.fromCredential' now requires a `ServerInfo` object from the JS API as a second parameter."),y.fromCredential(...e)},b.deserialize=function(...e){return console.log("DEPRECATED:, 'UserSession.deserialize' is deprecated. Use 'ArcGISIdentityManager.deserialize' instead."),y.deserialize(...e)}},898498:(e,t,r)=>{"use strict";
44Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationManagerBase=void 0;const n=r(10604),i=r(84970);t.AuthenticationManagerBase=class{constructor(e){this.portal=e.portal?(0,i.cleanUrl)(e.portal):"https://www.arcgis.com/sharing/rest",this._username=e.username}get username(){return this._username?this._username:this._user&&this._user.username?this._user.username:void 0}getUsername(){return this.username?Promise.resolve(this.username):this.getUser().then((e=>e.username))}getUser(e){if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);{const t=`${this.portal}/community/self`,r=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=(0,n.request)(t,r).then((e=>(this._user=e,this._pendingUserRequest=null,e))),this._pendingUserRequest}}clearCachedUserInfo(){this._user=null}}},183020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.platformSelf=t.exchangeToken=void 0;const n=r(10604);t.exchangeToken=function(e,t,r="https://www.arcgis.com/sharing/rest"){const i=`${r}/oauth2/exchangeToken`,s={method:"POST",params:{f:"json",client_id:t,token:e}};return(0,n.request)(i,s).then((e=>e.token))},t.platformSelf=function(e,t,r="https://www.arcgis.com/sharing/rest"){const i=`${r}/oauth2/platformSelf?f=json`,s={method:"POST",headers:{"X-Esri-Auth-Client-Id":e,"X-Esri-Auth-Redirect-Uri":t},params:{f:"json"}};return(0,n.request)(i,s)}},659793:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseOnlineToken=t.isFederated=t.getOnlineEnvironment=t.normalizeOnlinePortalUrl=t.isOnline=void 0;const n=r(84970),i=/^https?:\/\/(\S+)\.arcgis\.com.+/;function s(e){return i.test(e)}function o(e){if(!i.test(e))return e;switch(a(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"}}function a(e){if(!i.test(e))return null;const t=e.match(i)[1].split(".").pop();return t.includes("dev")?"dev":t.includes("qa")?"qa":"production"}t.isOnline=s,t.normalizeOnlinePortalUrl=o,t.getOnlineEnvironment=a,t.isFederated=function(e,t){const r=(0,n.cleanUrl)(o(t)).replace(/https?:\/\//,""),i=(0,n.cleanUrl)(e).replace(/https?:\/\//,"");return new RegExp(i,"i").test(r)},t.canUseOnlineToken=function(e,t){const r=s(e),n=s(t),i=a(e),o=a(t);return!(!r||!n||i!==o)}},475751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchToken=void 0;const n=r(10604),i=3e5;t.fetchToken=function(e,t){const r=t;return r.rawResponse=!1,(0,n.request)(e,r).then((e=>{if("token"in e&&"expires"in e)return{token:e.token,username:t.params.username,expires:new Date(e.expires)};const r={token:e.access_token,username:e.username,expires:new Date(Date.now()+1e3*e.expires_in-i),ssl:!0===e.ssl};return e.refresh_token&&(r.refreshToken=e.refresh_token),e.refresh_token_expires_in&&(r.refreshTokenExpires=new Date(Date.now()+1e3*e.refresh_token_expires_in-i)),r}))}},152176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(732247);(0,n.__exportStar)(r(10604),t),(0,n.__exportStar)(r(319439),t),(0,n.__exportStar)(r(150854),t),(0,n.__exportStar)(r(964697),t),(0,n.__exportStar)(r(663085),t),(0,n.__exportStar)(r(564158),t),(0,n.__exportStar)(r(84970),t),(0,n.__exportStar)(r(812458),t),(0,n.__exportStar)(r(27907),t),(0,n.__exportStar)(r(315206),t),(0,n.__exportStar)(r(270088),t),(0,n.__exportStar)(r(137766),t),(0,n.__exportStar)(r(443226),t),(0,n.__exportStar)(r(37875),t),(0,n.__exportStar)(r(253833),t),(0,n.__exportStar)(r(479572),t),(0,n.__exportStar)(r(341876),t),(0,n.__exportStar)(r(945608),t),(0,n.__exportStar)(r(9694),t),(0,n.__exportStar)(r(464130),t),(0,n.__exportStar)(r(591456),t),(0,n.__exportStar)(r(876522),t),(0,n.__exportStar)(r(424727),t),(0,n.__exportStar)(r(380089),t),(0,n.__exportStar)(r(730010),t),(0,n.__exportStar)(r(893361),t),(0,n.__exportStar)(r(33422),t),(0,n.__exportStar)(r(288136),t),(0,n.__exportStar)(r(778311),t),(0,n.__exportStar)(r(475751),t),(0,n.__exportStar)(r(659793),t),(0,n.__exportStar)(r(183020),t),(0,n.__exportStar)(r(16
445686),t),(0,n.__exportStar)(r(69774),t),(0,n.__exportStar)(r(226421),t),(0,n.__exportStar)(r(623707),t),(0,n.__exportStar)(r(472461),t),(0,n.__exportStar)(r(303394),t),(0,n.__exportStar)(r(795150),t),(0,n.__exportStar)(r(888524),t),(0,n.__exportStar)(r(899933),t),(0,n.__exportStar)(r(4936),t),(0,n.__exportStar)(r(46341),t),(0,n.__exportStar)(r(444578),t),(0,n.__exportStar)(r(398080),t),(0,n.__exportStar)(r(543598),t)},623707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Job=void 0;const n=r(10604),i=r(84970),s=r(564158),o=r(444578),a=r(326404),c=r(859966),u={pollingRate:2e3,startMonitoring:!1};class l{constructor(e){this.executePoll=async()=>{let e;try{e=await this.getJobInfo()}catch(e){return void this.emitter.emit(o.JOB_STATUSES.Error,e)}this.emitter.emit(o.JOB_STATUSES.Status,e),this.emitter.emit(e.status,e)};const{url:t,id:r,pollingRate:n,authentication:i}=Object.assign(Object.assign({},u),e);this.url=t,this.id=r,this.authentication=i,this._pollingRate=n,this.emitter=(0,a.default)(),e.startMonitoring&&this.startEventMonitoring(n)}static deserialize(e,t){const r=Object.assign(Object.assign(Object.assign({},u),JSON.parse(e)),t);return(0,n.request)(`${r.url}/jobs/${r.id}`,{authentication:r.authentication}).then((()=>new l(r)))}static fromExistingJob(e){const t=Object.assign(Object.assign({},u),e),r=(0,i.cleanUrl)(t.url.replace(/\/submitJob\/?/,""));return(0,n.request)(`${r}/jobs/${t.id}`,{authentication:t.authentication}).then((()=>new l(t)))}static submitJob(e){const{url:t,params:r,authentication:s,pollingRate:o,startMonitoring:a}=Object.assign(Object.assign({},u),e),d=(0,c.processJobParams)(r),p=(0,i.cleanUrl)(t.replace(/\/submitJob\/?/,"")),h=p+"/submitJob";return(0,n.request)(h,{params:d,authentication:s}).then((e=>new l({url:p,authentication:s,id:e.jobId,startMonitoring:a,pollingRate:o})))}get jobUrl(){return`${this.url}/jobs/${this.id}`}get isMonitoring(){return!!this.setIntervalHandler}get pollingRate(){return this._pollingRate}set pollingRate(e){this.stopEventMonitoring(),this.startEventMonitoring(e)}getJobInfo(){return(0,n.request)(this.jobUrl,{authentication:this.authentication}).then((e=>{const t=Object.assign({id:e.jobId,status:void 0},e);switch(delete t.jobId,delete t.jobStatus,e.jobStatus){case"esriJobCancelled":t.status=o.JOB_STATUSES.Cancelled;break;case"esriJobCancelling":t.status=o.JOB_STATUSES.Cancelling;break;case"esriJobNew":t.status=o.JOB_STATUSES.New;break;case"esriJobWaiting":t.status=o.JOB_STATUSES.Waiting;break;case"esriJobExecuting":t.status=o.JOB_STATUSES.Executing;break;case"esriJobSubmitted":t.status=o.JOB_STATUSES.Submitted;break;case"esriJobTimedOut":t.status=o.JOB_STATUSES.TimedOut;break;case"esriJobFailed":t.status=o.JOB_STATUSES.Failed;break;case"expectedFailure":t.status=o.JOB_STATUSES.Failure;break;case"esriJobSucceeded":t.status=o.JOB_STATUSES.Success}return t}))}on(e,t){this.emitter.on(e,t)}once(e,t){const r=n=>{this.emitter.off(e,r),t(n)};this.emitter.on(e,r),t.__arcgis_job_once_original_function__=r}off(e,t){t.__arcgis_job_once_original_function__?this.emitter.off(e,t.__arcgis_job_once_original_function__):this.emitter.off(e,t)}async getResult(e){return this.waitForCompletion().then((t=>(0,n.request)(this.jobUrl+"/"+t.results[e].paramUrl,{authentication:this.authentication})))}toJSON(){return{id:this.id,url:this.url,startMonitoring:this.isMonitoring,pollingRate:this.pollingRate}}serialize(){return JSON.stringify(this)}async waitForCompletion(){const e=await this.getJobInfo();return e.status===o.JOB_STATUSES.Success?Promise.resolve(e):e.status===o.JOB_STATUSES.Cancelling||e.status===o.JOB_STATUSES.Cancelled||e.status===o.JOB_STATUSES.Failed||e.status===o.JOB_STATUSES.Failure||e.status===o.JOB_STATUSES.TimedOut?(this.stopInternalEventMonitoring(),Promise.reject(new s.ArcGISJobError("Job cancelled or failed.",e))):new Promise(((e,t)=>{this.startInternalEventMonitoring(),this.once(o.JOB_STATUSES.Cancelled,(e=>{this.stopInternalEventMonitoring(),t(new s.ArcGISJobError("Job cancelled.",e))})),this.once(o.JOB_STATUSES.TimedOut,(e=>
44{this.stopInternalEventMonitoring(),t(new s.ArcGISJobError("Job timed out.",e))})),this.once(o.JOB_STATUSES.Failed,(e=>{this.stopInternalEventMonitoring(),t(new s.ArcGISJobError("Job failed.",e))})),this.once(o.JOB_STATUSES.Success,(t=>{this.stopInternalEventMonitoring(),e(t)}))}))}async getAllResults(){return this.waitForCompletion().then((e=>{const t=Object.keys(e.results),r=t.map((t=>(0,n.request)(this.jobUrl+"/"+e.results[t].paramUrl,{authentication:this.authentication}).then((e=>e))));return Promise.all(r).then((e=>t.reduce(((r,n,i)=>(r[t[i]]=e[i],r)),{})))}))}cancelJob(){return(0,n.request)(this.jobUrl+"/cancel",{authentication:this.authentication,params:{id:this.id,returnMessages:!1}}).then((e=>(this.emitter.emit("cancelled",e),e)))}startInternalEventMonitoring(e=u.pollingRate){this._pollingRate=e,this.isMonitoring||(this.setIntervalHandler=setInterval(this.executePoll,this.pollingRate))}stopInternalEventMonitoring(){this.isMonitoring&&!this.didUserEnableMonitoring&&clearTimeout(this.setIntervalHandler)}startEventMonitoring(e=u.pollingRate){this._pollingRate=e,this.didUserEnableMonitoring=!0,this.isMonitoring||(this.setIntervalHandler=setInterval(this.executePoll,this.pollingRate))}stopEventMonitoring(){this.isMonitoring&&this.didUserEnableMonitoring&&clearTimeout(this.setIntervalHandler)}}t.Job=l},10604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.request=t.internalRequest=t.checkForErrors=t.ArcGISAuthError=t.getDefaultRequestOptions=t.setDefaultRequestOptions=t.NODEJS_DEFAULT_REFERER_HEADER=void 0;const n=r(732247),i=r(812458),s=r(27907),o=r(876522),a=r(150854),c=r(730010),u=r(893361),l=r(398080),d=r(103362);function p(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}t.NODEJS_DEFAULT_REFERER_HEADER="@esri/arcgis-rest-js",t.setDefaultRequestOptions=function(e,t){e.authentication&&!t&&(0,u.warn)("You should not set `authentication` as a default in a shared environment such as a web server which will process multiple users requests. You can call `setDefaultRequestOptions` with `true` as a second argument to disable this warning."),globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS=e},t.getDefaultRequestOptions=p;class h extends a.ArcGISRequestError{constructor(e="AUTHENTICATION_ERROR",t="AUTHENTICATION_ERROR_CODE",r,n,i){super(e,t,r,n,i),this.name="ArcGISAuthError",this.message="AUTHENTICATION_ERROR_CODE"===t?e:`${t}: ${e}`;const s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(e,t=1){let r=0;const n=(i,s)=>{r+=1,e(this.url,this.options).then((e=>{const t=Object.assign(Object.assign({},this.options),{authentication:e});return f(this.url,t)})).then((e=>{i(e)})).catch((e=>{"ArcGISAuthError"===e.name&&r<t?n(i,s):e.name===this.name&&e.message===this.message&&r>=t?s(this):s(e)}))};return new Promise(((e,t)=>{n(e,t)}))}}function m(e,t,r,n,i){if(e.code>=400){const{message:r,code:i}=e;throw new a.ArcGISRequestError(r,i,e,t,n)}if(e.error){const{message:r,code:s,messageCode:o}=e.error,c=o||s||"UNKNOWN_ERROR_CODE";if(498===s||499===s)throw i||new h(r,c,e,t,n);throw new a.ArcGISRequestError(r,c,e,t,n)}if("failed"===e.status||"failure"===e.status){let r,i="UNKNOWN_ERROR_CODE";try{r=JSON.parse(e.statusMessage).message,i=JSON.parse(e.statusMessage).code}catch(t){r=e.statusMessage||e.message}throw new a.ArcGISRequestError(r,i,e,t,n)}return e}function f(e,r){const n=p(),h=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},n),r),{params:Object.assign(Object.assign({},n.params),r.params),headers:Object.assign(Object.assign({},n.headers),r.headers)}),{httpMethod:f,rawResponse:g}=h,y=Object.assign({f:"json"},h.params);let b=null;const v={method:f,signal:h.signal,credentials:h.credentials||"same-origin"};let w;if((0,c.isNoCorsDomain)(e)&&(v.credentials="include"),h.headers&&h.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(v.credentials="include"),"string"==typeof h.authentication){const e=h.authentication;w={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(e)},h.authentication.startsWith("AAPK")||h.authentication.startsWith("AATK")||h.suppressWarnings||globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING||((0,u.
44warn)("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else w=h.authentication;const S=e;let E=!1;"undefined"!=typeof window&&(E=(0,d.isSameOrigin)(e));const T=!E&&(0,c.isNoCorsRequestRequired)(e);h.headers&&h.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(v.credentials="include");let I=Promise.resolve();return T&&(v.credentials="include",I=(0,c.sendNoCorsRequest)(e)),I.then((()=>w?w.getToken(e).catch((t=>(t.url=e,t.options=h,b=t,Promise.resolve("")))):Promise.resolve(""))).then((r=>{r.length&&(y.token=r),w&&w.getDomainCredentials&&(v.credentials=w.getDomainCredentials(e));const n={};if("GET"===v.method){y.token&&h.hideToken&&"undefined"==typeof window&&(n["X-Esri-Authorization"]=`Bearer ${y.token}`,delete y.token);const t=""===(0,s.encodeQueryString)(y)?e:e+"?"+(0,s.encodeQueryString)(y);h.maxUrlLength&&t.length>h.maxUrlLength||!h.maxUrlLength&&t.length>2e3||y.token&&h.hideToken?(v.method="POST",r.length&&h.hideToken&&(y.token=r,delete n["X-Esri-Authorization"])):e=t}const a=new RegExp("/items/.+/updateResources").test(e);return"POST"===v.method&&(v.body=(0,i.encodeFormData)(y,a)),v.headers=Object.assign(Object.assign({},n),h.headers),("undefined"==typeof window||window&&void 0===window.document)&&!v.headers.referer&&(v.headers.referer=t.NODEJS_DEFAULT_REFERER_HEADER),(0,o.requiresFormData)(y)||a||(v.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,v):(0,l.getFetch)().then((({fetch:t})=>t(e,v)))})).then((t=>{if(!t.ok)return t.json().then((r=>{const{status:n,statusText:i}=t,{message:s,details:o}=r.error,c=`${s}. ${o?o.join(" "):""}`.trim();throw new a.ArcGISRequestError(c,`HTTP ${n} ${i}`,r,e,h)})).catch((r=>{if("ArcGISRequestError"===r.name)throw r;const{status:n,statusText:i}=t;throw new a.ArcGISRequestError(i,`HTTP ${n}`,t,e,h)}));if(g)return t;switch(y.f){case"json":case"geojson":return t.json();case"html":case"text":return t.text();default:return t.blob()}})).then((t=>{if("json"!==y.f&&"geojson"!==y.f||g)return t;{const r=m(t,S,0,h,b);if(t&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(t.authorizedCrossOriginNoCorsDomains)&&(0,c.registerNoCorsDomains)(t.authorizedCrossOriginNoCorsDomains),b){const t=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];h.authentication.federatedServers[t]={token:[],expires:new Date(Date.now()+864e5)},b=null}return r}}))}t.ArcGISAuthError=h,t.checkForErrors=m,t.internalRequest=f,t.request=function(e,t={params:{f:"json"}}){const{request:r}=t,i=(0,n.__rest)(t,["request"]);return r?r(e,i):f(e,i).catch((e=>e instanceof h&&t.authentication&&"string"!=typeof t.authentication&&t.authentication.canRefresh&&t.authentication.refreshCredentials?e.retry((()=>t.authentication.refreshCredentials()),1):Promise.reject(e)))}},286240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestConfig=void 0;const r="ARCGIS_REST_JS_NO_CORS";globalThis[r]||(globalThis[r]=Object.assign({},{noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}})),t.requestConfig=globalThis[r]},226421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revokeToken=void 0;const n=r(152176);t.revokeToken=function(e){const t=`${(0,n.cleanUrl)(e.portal||"https://www.arcgis.com/sharing/rest")}/oauth2/revokeToken/`,r=e.token,i=e.clientId;delete e.portal,delete e.clientId,delete e.token;const s=Object.assign(Object.assign({},e),{httpMethod:"POST",params:{client_id:i,auth_token:r}});return(0,n.request)(t,s).then((e=>{if(!e.success)throw new n.ArcGISRequestError("Unable to revoke token",500,e,t,s);return e}))}},303394:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},795150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4936:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},444578:(e,t)=>{"use strict";var r;
44Object.defineProperty(t,"__esModule",{value:!0}),t.JOB_STATUSES=void 0,(r=t.JOB_STATUSES||(t.JOB_STATUSES={})).Success="Succeeded",r.Failed="Failed",r.Waiting="Waiting",r.Cancelled="Cancelled",r.Cancelling="Cancelling",r.New="New",r.Executing="Executing",r.Submitted="Submitted",r.Failure="Failure",r.TimedOut="TimedOut",r.Error="Error",r.Status="Etatus",r.Unknown="Unknown"},899933:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},888524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46341:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},663085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISAccessDeniedError=void 0;class r extends Error{constructor(){super("The user has denied your authorization request.");const e=new.target.prototype;Object.setPrototypeOf(this,e),this.name="ArcGISAccessDeniedError"}}t.ArcGISAccessDeniedError=r},564158:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISJobError=void 0;class r extends Error{constructor(e="Unknown error",t){super(e);const r=new.target.prototype;Object.setPrototypeOf(this,r),this.name="ArcGISJobError",this.message=`${t.status}: ${e}`,this.status=t.status,this.id=t.id,this.jobInfo=t}}t.ArcGISJobError=r},150854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISRequestError=void 0;class r extends Error{constructor(e,t,r,n,i){super(e);const s=new.target.prototype;Object.setPrototypeOf(this,s),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=i}}t.ArcGISRequestError=r},964697:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISTokenRequestError=t.ArcGISTokenRequestErrorCodes=void 0,function(e){e.TOKEN_REFRESH_FAILED="TOKEN_REFRESH_FAILED",e.GENERATE_TOKEN_FOR_SERVER_FAILED="GENERATE_TOKEN_FOR_SERVER_FAILED",e.REFRESH_TOKEN_EXCHANGE_FAILED="REFRESH_TOKEN_EXCHANGE_FAILED",e.NOT_FEDERATED="NOT_FEDERATED",e.UNKNOWN_ERROR_CODE="UNKNOWN_ERROR_CODE"}(r=t.ArcGISTokenRequestErrorCodes||(t.ArcGISTokenRequestErrorCodes={}));class n extends Error{constructor(e="UNKNOWN_ERROR",t=r.UNKNOWN_ERROR_CODE,n,i,s){super(e);const o=new.target.prototype;Object.setPrototypeOf(this,o),this.name="ArcGISTokenRequestError",this.message=`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=n,this.url=i,this.options=s}}t.ArcGISTokenRequestError=n},270088:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTypes=void 0,(r=t.ErrorTypes||(t.ErrorTypes={})).ArcGISRequestError="ArcGISRequestError",r.ArcGISAuthError="ArcGISAuthError",r.ArcGISAccessDeniedError="ArcGISAccessDeniedError",r.ArcGISTokenRequestError="ArcGISTokenRequestError"},137766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},443226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37875:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},253833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},479572:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},945608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},341876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9694:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},464130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},591456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},424727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},319439:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendCustomParams=void 0,t.appendCustomParams=function(e,t,r){const n=Object.assign(Object.assign({params:{}},r),e);return n.params=t.reduce(((t,r)=>((e[r]||"boolean"==typeof e[r]||"number"==typeof e[r]&&0===e[r])&&(t[r]=e[r]),t)),n.params),["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"].reduce(((e,t)=>(n[t]&&(e[t]=n[t]),e)),{})}},10340:(e,t)=>{"use strict";
44Object.defineProperty(t,"__esModule",{value:!0}),t.base64UrlEncode=void 0,t.base64UrlEncode=function(e,t=window){return!t&&window&&(t=window),t.btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},84970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanUrl=void 0,t.cleanUrl=function(e){return"string"!=typeof e||"/"===(e=e.trim())[e.length-1]&&(e=e.slice(0,-1)),e}},315206:(e,t)=>{"use strict";function r(e){const[t,r]=e.split("=");return{key:decodeURIComponent(t),value:decodeURIComponent(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.decodeQueryString=t.decodeParam=void 0,t.decodeParam=r,t.decodeQueryString=function(e){return!e||e.length<=0?{}:e.replace(/^#/,"").replace(/^\?/,"").split("&").reduce(((e,t)=>{const{key:n,value:i}=r(t);return e[n]=i,e}),{})}},812458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFormData=void 0;const n=r(876522),i=r(27907),s=r(543598);t.encodeFormData=function(e,t){const r=(0,n.requiresFormData)(e)||t,o=(0,n.processParams)(e);if(r){const e=new s.FormData;return Object.keys(o).forEach((t=>{if("undefined"!=typeof Blob&&o[t]instanceof Blob){const r=o.fileName||o[t].name||t;e.append(t,o[t],r)}else e.append(t,o[t])})),e}return(0,i.encodeQueryString)(e)}},27907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeQueryString=t.encodeParam=void 0;const n=r(876522);function i(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map((t=>i(e,t))).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}t.encodeParam=i,t.encodeQueryString=function(e){const t=(0,n.processParams)(e);return Object.keys(t).map((e=>i(e,t[e]))).join("&")}},445221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateCodeChallenge=void 0;const n=r(10340);t.generateCodeChallenge=function(e,t=window){if(!t&&window&&(t=window),e&&t.isSecureContext&&t.crypto&&t.crypto.subtle){const r=(new t.TextEncoder).encode(e);return t.crypto.subtle.digest("SHA-256",r).then((e=>(0,n.base64UrlEncode)(new Uint8Array(e),t)))}return Promise.resolve(null)}},508884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomString=void 0;const n=r(10340);t.generateRandomString=function(e){!e&&window&&(e=window);const t=e.crypto.getRandomValues(new Uint8Array(32));return(0,n.base64UrlEncode)(t)}},103362:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSameOrigin=void 0,t.isSameOrigin=function(e,t){var r;if((t||window)&&e){const n=null===(r=(t=t||window).location)||void 0===r?void 0:r.origin;return e.startsWith(n)}return!1}},859966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processJobParams=void 0,t.processJobParams=function(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r],i=n.constructor.name;return t[r]="Array"===i?JSON.stringify(n):n,t}),{})}},876522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processParams=t.requiresFormData=void 0,t.requiresFormData=function(e){return Object.keys(e).some((t=>{let r=e[t];if(!r)return!1;switch(r&&r.toParam&&(r=r.toParam()),r.constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}}))},t.processParams=function(e){const t={};return Object.keys(e).forEach((r=>{var n,i;let s,o=e[r];if(o&&o.toParam&&(o=o.toParam()),o||0===o||"boolean"==typeof o||"string"==typeof o){switch(o.constructor.name){case"Array":const e=null===(i=null===(n=o[0])||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name;s="Array"===e?o:"Object"===e?JSON.stringify(o):o.join(",");break;case"Object":s=JSON.stringify(o);break;case"Date":s=o.valueOf();break;case"Function":s=null;break;case"Boolean":s=o+"";break;default:s=o}(s||0===s||"string"==typeof s||Array.isArray(s))&&(t[r]=s)}})),t}},380089:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},730010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNoCorsRequestRequired=t.isNoCorsDomain=t.registerNoCorsDomains=t.getRegisteredNoCorsDomains=t.sendNoCorsRequest=void 0;const n=r(286240);function i(e){const t=new URL(e).origin;-1===n.requestConfig.noCorsDomains.indexOf(t)&&n.requestConfig.noCorsDomains.push(t)}function s(e){let t=!1;
44if(n.requestConfig.noCorsDomains.length){const r=new URL(e).origin.toLowerCase();t=n.requestConfig.noCorsDomains.some((e=>r.includes(e)))}return t}t.sendNoCorsRequest=function(e){const t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");const r=t.origin;return n.requestConfig.pendingNoCorsRequests[r]||(n.requestConfig.pendingNoCorsRequests[r]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then((e=>{-1===n.requestConfig.noCorsDomains.indexOf(r)&&n.requestConfig.noCorsDomains.push(r),n.requestConfig.crossOriginNoCorsDomains[r.toLowerCase()]=Date.now(),delete n.requestConfig.pendingNoCorsRequests[r]})).catch((e=>(delete n.requestConfig.pendingNoCorsRequests[r],Promise.reject(new Error(`no-cors request to ${r} failed`)))))),n.requestConfig.pendingNoCorsRequests[r]},t.getRegisteredNoCorsDomains=function(){return n.requestConfig.noCorsDomains},t.registerNoCorsDomains=function(e){e.forEach((e=>{e=e.toLowerCase(),/^https?:\/\//.test(e)?i(e):(i("http://"+e),i("https://"+e))}))},t.isNoCorsDomain=s,
45t.isNoCorsRequestRequired=function(e){let t=!1;if(s(e)){const r=new URL(e).origin.toLowerCase(),i=n.requestConfig.crossOriginNoCorsDomains[r]||0;Date.now()-36e5>i&&(t=!0)}return t}},893361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warn=void 0,t.warn=function(e){console&&console.warn&&console.warn.apply(console,[e])}},472461:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withOptions=void 0,t.withOptions=function(e,t){return(...r)=>{const n="object"==typeof r[r.length-1]?Object.assign(Object.assign({},e),r.pop()):e;return t(...r,n)}}},165686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppAccess=void 0;const n=r(10604);t.validateAppAccess=function(e,t,r="https://www.arcgis.com/sharing/rest"){const i=`${r}/oauth2/validateAppAccess`,s={method:"POST",params:{f:"json",client_id:t,token:e}};return(0,n.request)(i,s)}},475725:(e,t,r)=>{"use strict";r.d(t,{c:()=>o,g:()=>a,r:()=>s});var n=r(327301),i=r(795290);const s=(0,n.RD)({defaultAssetPath:"https://gis.nbs.gov.so/arcgis/jsapi/jsapi4/charts-components/",hydratedAttribute:"hydrated"}),{customElement:o,getAssetPath:a,setAssetPath:c}=s;s.t=i.it,s.o=i.kR,s.c=i.Vz,s.r=i.LJ},487586:(e,t,r)=>{"use strict";r.r(t),r.d(t,{defineCustomElements:()=>i});var n=r(475725);const i=(0,r(327301).D2)(n.r,{"arcgis-chart":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(44245),r.e(37971),r.e(62800),r.e(62004),r.e(2145),r.e(81537),r.e(43523),r.e(99193),r.e(76497),r.e(54658),r.e(531)]).then(r.bind(r,423190)),"actionMode,autoDisposeChart,chartLimits:,chartWillRender:,componentVersion,cursorRange,dataLabelFormatter:,disableInteractions,disableTogglingLegendItems,enableConfiguration,enableResponsiveFeatures,errorPolicy,featureIndex,filterByExtent,filterBySelection,gaugeInnerLabelFormatter:,guideTooltipFormatter:,hideEmptySeries,hideLicenseWatermark,hideLoaderAnimation,ignoreSmoothRenderingLimit,ignoreViewExtent,layer:,layerFieldsChangePolicy,layerFilterChangePolicy,layerRendererChangePolicy,legendPosition,legendValueLabelFormatter:,legendVisibility,loaderColors:,messageOptions:,model:,placeholder,queueChartCreation,replaceNoValueCategoryWithZero,returnFeaturesExtent,returnSelectionIndexes,returnSelectionOIDs,rotation,runtimeDataFilters:,secondaryYAxisLabelFormatter:,selectionData:,selectionTheme:,setTimeBinningInfoWhenNotProvided,syncSelection,syncSelectionsBetweenChartAndLayerViewPolicy,timeZone,tooltipFormatter:,updateSplitBySeries:,useAnimatedCharts,usePopupTemplateFieldsInfo,view:,viewTimeExtentChangePolicy,xAxisLabelFormatter:,yAxisLabelFormatter:;clearSelection,errorAlert,exportAsCSV,exportAsImage,notify,refresh,resetZoom,switchSelection"],"arcgis-charts-action-bar":[()=>
45Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(40861)]).then(r.bind(r,708161)),"actionBarSelectionMode,chartElement:,chartType,clearSelectionState,clearSelectionTitle,clearSelectionToggle,disableCSVExportForChartTypes:,disabledExportAction,editChartState,editChartTitle,editChartToggle,expanded,exportAsCSVState,exportAsCSVTitle,exportAsImageState,exportAsImageTitle,filterByExtentState,filterByExtentTitle,filterByExtentToggle,filterBySelectionState,filterBySelectionTitle,filterBySelectionToggle,forceDisableActions,fullExtentState,fullExtentTitle,fullExtentToggle,hiddenActions:,legendState,legendTitle,legendToggle,messageOverrides:,rotateChartState,rotateChartTitle,rotateChartToggle,selectionState,selectionTitle,selectionToggle,switchSelectionState,switchSelectionTitle,switchSelectionToggle,zoomState,zoomTitle,zoomToggle"],"arcgis-charts-config-axes":[()=>r.e(47020).then(r.bind(r,947020)),"calculatedDataMinMaxBounds:,calculatedMinMaxBounds:,messageOverrides:,model:,open,showEnableXLogOption,showEnableYLogOption,showMaxXBoundOption,showMaxYBoundOption,showMinXBoundOption,showMinYBoundOption"],"arcgis-charts-config-axis":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(8276)]).then(r.bind(r,855206)),"axisTitle,dataMaxValue,dataMinValue,initialMaxBound,initialMinBound,isXAxis,maxBoundMaxLimit,maxBoundMinLimit,messageOverrides:,minBoundMaxLimit,minBoundMinLimit,model:,showEnableLogOption,showMaxBoundOption,showMinBoundOption"],"arcgis-charts-config-bar-chart":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(23889)]).then(r.bind(r,277009)),"calculatedMinMaxBounds:,layer:,model:,page,popoverPlacement,seriesColor:,timeZone,usePopupTemplateFieldsInfo"],"arcgis-charts-config-bar-chart-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(78209)]).then(r.bind(r,588172)),"layerFieldsInfo:,messageOverrides:,model:,open"],"arcgis-charts-config-bar-chart-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(4420)]).then(r.bind(r,34242)),"contentKind,headingTitle,isCustomSortDisabled,isNoAggregationDisabled,layerFieldsInfo:,messageOverrides:,open,referenceElement:,selectedContent;reposition"],"arcgis-charts-config-bar-chart-series":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(71950)]).then(r.bind(r,586012)),"activeColorMatch,configSeriesOpen,messageOverrides:,model:,popoverPlacement"],"arcgis-charts-config-bar-chart-series-popover":[()=>
45Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(157)]).then(r.bind(r,441273)),"messageOverrides:,open,placement,referenceElement:,selectedColor:,selectedName;reposition"],"arcgis-charts-config-box-plot":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(45693)]).then(r.bind(r,936272)),"calculatedMinMaxBounds:,layer:,model:,page,popoverPlacement,seriesColor:,usePopupTemplateFieldsInfo"],"arcgis-charts-config-box-plot-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(71869)]).then(r.bind(r,540891)),"layerFieldsInfo:,messageOverrides:,model:"],"arcgis-charts-config-box-plot-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(14558)]).then(r.bind(r,611386)),"contentKind,headingTitle,isCustomSortDisabled,layerFieldsInfo:,messageOverrides:,open,referenceElement:,selectedContent;reposition"],"arcgis-charts-config-box-plot-series":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(38521)]).then(r.bind(r,308065)),"activeColorMatch,configSeriesOpen,messageOverrides:,model:,popoverPlacement"],"arcgis-charts-config-box-plot-series-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(12045)]).then(r.bind(r,391920)),"isLineSymbol,labelCanBeConfigured,messageOverrides:,open,placement,referenceElement:,selectedColor:,selectedLineStyle,selectedLineWidth,selectedName;reposition"],"arcgis-charts-config-category-format":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(86879)]).then(r.bind(r,511489)),"categoryFormat:,messageOverrides:"],"arcgis-charts-config-chart-rename-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(57529)]).then(r.bind(r,107150)),"messageOverrides:,name,open,popoverReferenceElement:;reposition"],"arcgis-charts-config-color-style":[()=>r.e(95557).then(r.bind(r,895557)),"enableClose,header,messageOverrides:,open,selectedColor:"],"arcgis-charts-config-colors":[()=>
45Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(55938)]).then(r.bind(r,70425)),"heading,messageOverrides:,rgba:"],"arcgis-charts-config-create-flow":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(54658),r.e(96513)]).then(r.bind(r,676121)),"activeLayerId,calculatedDataMinMaxBounds:,calculatedMinMaxBounds:,chartData:,disableEditing,filterBySelection,headerTitle,layerList:,messageOverrides:,modelList:,open,panelNumber,popoverPlacement,r2,selectedChartId,seriesColor:,syncChartsToLayers,timeZone,usePopupTemplateFieldsInfo;setFocus"],"arcgis-charts-config-field-select":[()=>r.e(96850).then(r.bind(r,896850)),"disabled,invalid,label"],"arcgis-charts-config-font-style":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(92127),r.e(32362)]).then(r.bind(r,532362)),"enableClose,fontStyle:,header,messageOverrides:,open"],"arcgis-charts-config-format":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(92127),r.e(30643)]).then(r.bind(r,630643)),"messageOverrides:,model:"],"arcgis-charts-config-format-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(59561)]).then(r.bind(r,490568)),"messageOverrides:,open,placement,referenceElement:,selectedElement:;reposition"],"arcgis-charts-config-general":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(59486)]).then(r.bind(r,132160)),"messageOverrides:,model:,open"],"arcgis-charts-config-guide":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(91943),r.e(48809)]).then(r.bind(r,848809)),"calculatedMinMaxBounds:,index,latestGuidePosition,messageOverrides:,model:,orientation,timeZone"],"arcgis-charts-config-guide-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(35744)]).then(r.bind(r,553958)),"messageOverrides:,open,placement,referenceElement:,selectedElement:;reposition"],"arcgis-charts-config-guides":[()=>
45Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(91943),r.e(32858)]).then(r.bind(r,132858)),"calculatedMinMaxBounds:,enableXAxisGuide,enableYAxisGuide,messageOverrides:,model:,open,timeZone"],"arcgis-charts-config-histogram":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(10062)]).then(r.bind(r,939)),"calculatedMinMaxBounds:,chartData:,layer:,model:,page,seriesColor:,usePopupTemplateFieldsInfo"],"arcgis-charts-config-histogram-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(19423)]).then(r.bind(r,175448)),"countValue,layerFieldsInfo:,maxValue,meanValue,medianValue,messageOverrides:,minValue,model:,nullsValue,open,standardDevValue,sumValue"],"arcgis-charts-config-histogram-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(16550)]).then(r.bind(r,821282)),"contentKind,headingTitle,layerFieldsInfo:,messageOverrides:,open,placement,referenceElement:,selectedBinColor:,selectedNumericField,selectedOverlaySymbol:,selectedTransformationType;reposition"],"arcgis-charts-config-invalid-input-message":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(88743)]).then(r.bind(r,152)),"invalidInputMessage,isInvalid"],"arcgis-charts-config-line-chart":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(10659)]).then(r.bind(r,946095)),"calculatedDataMinMaxBounds:,calculatedMinMaxBounds:,layer:,model:,page,popoverPlacement,seriesColor:,timeZone,usePopupTemplateFieldsInfo"],"arcgis-charts-config-line-chart-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(91628)]).then(r.bind(r,865752)),"layerFieldsInfo:,messageOverrides:,model:,open,resetTimeInterval:"],"arcgis-charts-config-line-chart-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(33056)]).then(r.bind(r,154382)),"contentKind,headingTitle,layerFieldsInfo:,messageOverrides:,open,referenceElement:,selectedContent;reposition"],"arcgis-charts-config-line-chart-series":[()=>
45Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(18294)]).then(r.bind(r,11593)),"activeColorMatch,configSeriesOpen,messageOverrides:,model:,popoverPlacement"],"arcgis-charts-config-line-chart-series-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(13523)]).then(r.bind(r,873020)),"messageOverrides:,open,placement,referenceElement:,selectedColor:,selectedLineStyle,selectedLineWidth,selectedName;reposition"],"arcgis-charts-config-line-style":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(14624)]).then(r.bind(r,544468)),"enableClose,header,lineStyle:,messageOverrides:,open,usePanel"],"arcgis-charts-config-number-format":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(2265)]).then(r.bind(r,307711)),"messageOverrides:,numberFormat:"],"arcgis-charts-config-pie-chart":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(42329)]).then(r.bind(r,992392)),"calculatedMinMaxBounds:,chartData:,filterBySelection,layer:,model:,page,popoverPlacement,seriesColor:,usePopupTemplateFieldsInfo"],"arcgis-charts-config-pie-chart-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(32270)]).then(r.bind(r,421142)),"layerFieldsInfo:,messageOverrides:,model:,open"],"arcgis-charts-config-pie-chart-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(63776)]).then(r.bind(r,485238)),"contentKind,headingTitle,layerFieldsInfo:,messageOverrides:,open,referenceElement:,selectedContent;reposition"],"arcgis-charts-config-pie-chart-slices":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(75152)]).then(r.bind(r,382294)),"chartData:,configSliceOpen,messageOverrides:,model:,popoverPlacement"],"arcgis-charts-config-pie-chart-slices-p
45opover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(4718)]).then(r.bind(r,708212)),"messageOverrides:,open,placement,referenceElement:,selectedColor:,selectedName;reposition"],"arcgis-charts-config-scatter-plot":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(42182)]).then(r.bind(r,787430)),"calculatedDataMinMaxBounds:,calculatedMinMaxBounds:,layer:,model:,page,popoverPlacement,r2,usePopupTemplateFieldsInfo"],"arcgis-charts-config-scatter-plot-data":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(76353)]).then(r.bind(r,346066)),"isTableLayer,layerFieldsInfo:,messageOverrides:,model:,open,r2"],"arcgis-charts-config-scatter-plot-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(57905)]).then(r.bind(r,945049)),"contentKind,headingTitle,layerFieldsInfo:,messageOverrides:,open,placement,referenceElement:,selectedContent;reposition"],"arcgis-charts-config-select-chart-type-popover":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(42290)]).then(r.bind(r,643589)),"headerTitle,layerId,messageOverrides:,open,popoverPlacement,popoverReferenceElement:,selectedModelType;reposition"],"arcgis-charts-config-view-charts":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(44245),r.e(41765),r.e(37971),r.e(62800),r.e(93606)]).then(r.bind(r,827942)),"disableEditing,layer:,messageOverrides:,modelList:,noGroup,selectedChartId"]})},29647:(e,t,r)=>{"use strict";r.d(t,{BB:()=>p,BH:()=>i,C5:()=>l,D6:()=>k,Dx:()=>d,Kn:()=>T,Sh:()=>n,aS:()=>S,hj:()=>u,ke:()=>s,lG:()=>O,mB:()=>C,pE:()=>c,pW:()=>m});const n=(...e)=>{const t=[];for(let r=0;r<e.length;r++){const n=e[r];if("string"==typeof n)t.push(n);else if(Array.isArray(n))t.push.apply(t,n);else if("object"==typeof n)for(const e in n)n[e]&&t.push(e)}const r=t.join(" ");return t.length=0,r};class i{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const s=(e,t,r)=>(0,a(t).subscribe)((t=>{const n=t.some((t=>((e,t)=>{let r=e;for(;r;){if(r===t)return!0;if(!r.parentNode)return!1;r=r.parentNode instanceof ShadowRoot?r.parentNode.host:r.parentNode}return!1})(e,t.target)));n&&r()})),o={},a=e=>{const t=e.join(","),r=o[t];if(void 0!==r)return r;const n=new Set,i=new MutationObserver((e=>n.forEach((t=>t(e)))));globalThis.document&&i.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});const s={subscribe:e=>(n.add(e),()=>{n.delete(e),0===n.size&&(i.disconnect(),o[t]=void 0)})};return o[t]=s,s},c=(e,t)=>{let r=e;for(;r;){const e=r.closest?.(t);if(e)return e;const n=r.getRootNode?.();if(n===globalThis.document)return null;r=n.host}return null},u=(e,t,r)=>{const n=c(e,`[${t}]`);return n?.getAttribute(t)??r},l=async e=>{null!=e&&("function"==typeof e.setFocus?await e.setFocus():e.focus())},d=(e,t,...r)=>{try{return e?.call(t,...r)}catch(t){console.error(t,e)}},p=async(e,t,...r)=>{try{const n=e?.call(t,...r);return await n}catch(t){console.error(t,e)}},h=e=>{let t="";for(let r=0;r<e;r++)t+=(65536*(1+Math.random())|0).toString(16).substring(1);return t},m=()=>[h(2),h(1),h(1),h(1),h(3)].join("-"),f="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),g=new Set(f),y="en",b={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},v={},w=async(e,t)=>{const r=`${t}${e}.json`;try{const e=await fetch(r);if(e.ok)return await e.json()}catch(e){return console.error(e),{}}return e===y?{}:await w(y,t)},S=e=>{const t=u(e,"lang",globalThis.navigator?.language||y);return{lang:t,t9nLocale:E(t)}},E=e=>{const[t,r]=e.split("-"),n=t.toLowerCase();let i=n;return r&&(i=`${n}-${r.toUpperCase()}`),i=b[i]??i,g.has(i)?i:r?E(n):y},T=(e,t,r,n)=>{let i;const o=()=>I(e,t(),n).then((e=>{i?.lang===e.lang&&i.t9nLocale===e.t9nLocale&&i.t9nStrings===e.t9nStrings||r(e),i=e})).catch(console.error);return queueMicrotask(o),s(e,["lang"],o)},I=async(e,t,r=e.localName.split("-").slice(1).join("-"))=>{const{lang:n,t9nLocale:i}=S(e),s=`${t}/${r}/t9n`,o=null===r?{}:await(async(e,t,r="")=>{const n=`${t}/${r}`,i=`${n}${e}.json`;return v[i]??(v[i]=w(e,n)),await v[i]})(i,s,"messages.");return{lang:n,t9nLocale:i,t9nStrings:o}},C=e=>e.replace(A,((e,t)=>
45`${0===t?"":"-"}${e.toLowerCase()}`)),A=/[A-Z]+(?![a-z])|[A-Z]/gu,O=(e,t)=>{const r=t>_?D:t/P;let n=0;const i=setInterval((()=>{n+=r,n>=t&&(clearInterval(i),e())}),r);return i},_=4e3,D=2e3,P=4,k=(e,t,r=!1)=>{if(!e||!t)return!1;const n=new URL(e),i=new URL(t);return!(!r&&n.protocol!==i.protocol)&&null!=n.host&&null!=i.host&&n.host.toLowerCase()===i.host.toLowerCase()&&n.port===i.port}},795290:(e,t,r)=>{"use strict";r.d(t,{LJ:()=>d,Vz:()=>u,it:()=>l,kR:()=>c,td:()=>a});var n=r(397071),i=r(702615),s=r(546137),o=r(407064);function a(e,t){return(0,n.t)(e,t)}function c(){return new s.s}function u(e){return new o.M(e)}function l(e){(0,i.it)(e)}function d(e,t){return(0,i.LJ)(e,t)}},217281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i}),r(27385);var n=r(838251);const i={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://gis.nbs.gov.so/arcgis/apps/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(i,globalThis.esriConfig,!0),delete i.has),!i.assetsPath){{const e="4.33";i.assetsPath=`https://gis.nbs.gov.so/arcgis/jsapi/jsapi4/@arcgis/core/assets`}i.defaultAssetsPath=i.assetsPath}},109135:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n,i=r(217281),s=(r(27385),r(42281));const o={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){}static get test(){}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,a._loggers.get(e)||new a({module:e})}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=function(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}(r),i=this._loggedMessages[e].get(n);if("once"===t&&null!=i||"oncePerTick"===t&&i&&i>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of i.default.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",c)}_matchLevel(e){const t=i.default.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}function c(e,t,...r){console[e](`[${t}]`,...r)}(n=a)._loggers=new Map,n._tickCounter=0,n._tickCounterScheduled=!1,n._throttlingDisabled=!1},688803:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>i});class i{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*i._m}getInt(){return this._seed=(i._a*this._seed+i._c)%i._m,this._seed}getFloat(){return this.getInt()/(i._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/i._m*r}}(n=i)._m=2147483647,n._a=48271,n._c=0},814485:(e,t,r)=>{"use strict";r.d(t,{s:()=>o});var n=r(378836),i=r(6010);class s{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,i.Od)(this._observers,this._observer)}}class o{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return a;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,n=!1;const i=t.length;for(let s=0;s<i;++s){const i=t[s];if(i.destroyed)n=!0;else if(i===e){r=!0;break}}return r||(t.push(e),n&&this._removeDestroyedObservers()),new s(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e||0===e.length)return;const t=e.length;let r=0;for(let n=0;n<t;++n){for(;n+r<t&&e[n+r].destroyed;)++r;if(r>0){if(!(n+r<t))break;e[n]=e[n+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const a=(0,n.kB)()},702615:(e,t,r)=>{"use strict";r.d(t,{GF:()=>v,LJ:()=>p,gb:()=>h,it:()=>u,mS:()=>y}),r(27385);var n=r(109135),i=r(231014),s=r(655925);const o=new(r(642558).P),a=[];let c=o;function u(e){c.onAccessed(e)}let l=!1,d=!1;function p(e,t,r){if(l)return m(e,t,r);let n=null;return f(e),n=t.call(r),g(),n}function h(e,t){return p(o,e,t)}function m(e,t,r){const i=l;l=!0,f(e);let s=null;try{s=t.call(r)}catch(e){d&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(e)}return g(),l=i,s}function f(e){c=e,a.push(e)}function g(){const e=a.length;if(e>1){const t=a.pop();c=a[e-2],t.onTrackingEnd()}else if(1===e){const e=a.pop();c=o,e.onTrackingEnd()}else c=o}function y(e,t){if(t.flags&s.v.DepTrackingInitialized)return;t.flags|=s.v.DepTrackingInitialized;const r=d;d=!1,t.flags&s.v.AutoTracked?m(t.trackingTarget,t.metadata.get,e):v(e,t),d=r}const b=[];function v(e,t){t.flags&s.v.ExplicitlyTracking||(t.flags|=s.v.ExplicitlyTracking,m(t.trackingTarget,(()=>{const r=t.metadata.dependsOn||b;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,i.NI)(t);for(let t=0,n=e;t<r.length&&null!=n&&"object"==typeof n;++t)n=w(n,r[t],t!==r.length-1)}else w(e,t,!1)})),t.flags&=~s.v.ExplicitlyTracking)}function w(e,t,r){const n="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(n,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const s=(0,i.vw)(e);if(s){const t=s.propertiesByName.get(n);t&&(u(t),y(e,t))}return r?e[n]:void 0}},655925:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});const n={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},546137:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(814485);class i extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},407064:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(642558);class i extends n.P{constructor(e){super(new s(e)),this._observer&&o.register(this,new WeakRef(this._observer),this)}destroy(){this._observer&&o.unregister(this._observer),this.accessed?.clear(),this.clear(),this._observer?.destroy()}}class s{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=a}}const o=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function a(){}},642558:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});
45class n{constructor(e){this.accessed=void 0,this._handles=void 0,this._observer=e}destroy(){this.accessed?.clear(),this.clear()}onAccessed(e){null!=this._observer&&e!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(e))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach((e=>{this._handles.push(e.observe(this._observer))})),this.accessed.clear()))}clear(){if(null!=this._handles){for(let e=0;e<this._handles.length;++e)this._handles[e].remove();this._handles.length=0}}}},231014:(e,t,r)=>{"use strict";r.d(t,{NI:()=>u,Qc:()=>d,TS:()=>a,b6:()=>o,vw:()=>s});var n=r(378836),i=r(976828);function s(e){return e.__accessor__??null}function o(e,t){return null!=e?.metadata?.[t]}function a(e,t,r){return c(e,t,r?{policy:r,path:""}:null)}function c(e,t,r){return t?Object.keys(t).reduce(((e,n)=>{const s=n;if("__proto__"===s)return e;let o=null,a="merge";if(r&&(o=r.path?`${r.path}.${n}`:n,a=r.policy(o)),"replace"===a)return e[s]=t[s],e;if("replace-arrays"===a&&Array.isArray(e[s]))return e[s]=t[s],e;if(void 0===e[s])return e[s]=(0,i.d9)(t[s]),e;let u=e[s],l=t[s];if(u===l)return e;if(Array.isArray(l)||Array.isArray(e))u=u?Array.isArray(u)?e[s]=u.slice():e[s]=[u]:e[s]=[],l&&(Array.isArray(l)||(l=[l]),l.forEach((e=>{u.includes(e)||u.push(e)})));else if(l&&"object"==typeof l)if(r){const t=r.path;r.path=o,e[s]=c(u,l,r),r.path=t}else e[s]=c(u,l,null);else e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[s]=l);return e}),e||{}):e}function u(e){return Array.isArray(e)?e:e.split(".")}function l(e){return e.includes(",")?e.split(",").map((e=>e.trim())):[e.trim()]}function d(e,t,r,i){const s=function(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...l(r));return t}return l(e)}(t);if(1!==s.length){const t=s.map((t=>i(e,t,r)));return(0,n.AL)(t)}return i(e,s[0],r)}},6010:(e,t,r)=>{"use strict";r.d(t,{$A:()=>b,$L:()=>o,FS:()=>O,FY:()=>I,Od:()=>P,P$:()=>p,SO:()=>v,T0:()=>x,TV:()=>D,Tw:()=>d,VV:()=>l,Vx:()=>m,_x:()=>s,cq:()=>S,e$:()=>E,e5:()=>f,ee:()=>R,fS:()=>h,hv:()=>C,ow:()=>U,p$:()=>a,pC:()=>k,sD:()=>A,vr:()=>y,w6:()=>c,zG:()=>g});var n=r(443335),i=r(688803);const s=1.5,o=1/s,a=.5;function c(e,t){if(!t)return e;for(const r of t)e.push(r);return e}function u(e){return e}function l(e,t=u){return function(e,t=u){if(!e||0===e.length)return;let r=e[0],n=t(r);for(let i=1;i<e.length;++i){const s=e[i],o=Number(t(s));o>n&&(n=o,r=s)}return r}(e,(e=>-t(e)))}function d(e,t){return t?e.filter(((e,r,n)=>n.findIndex(t.bind(null,e))===r)):Array.from(new Set(e))}function p(e,t,r,n,i,s,o){if(null==e&&null==n)return!0;t=Math.max(0,t),i=Math.max(0,i),r=Math.max(0,r<0?(e?.length??0)+r:r),s=Math.max(0,s<0?(n?.length??0)+s:s);const a=r-t;if(null==e||null==n||a!==s-i)return!1;if(o){for(let r=0;r<a;r++)if(!o(e[t+r],n[i+r]))return!1}else for(let r=0;r<a;r++)if(e[t+r]!==n[i+r])return!1;return!0}function h(e,t,r){return p(e,0,e?.length??0,t,0,t?.length??0,r)}function m(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function f(e,t,r){let n,i;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),i=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),i=e.filter((e=>!t.includes(e)))),{added:n,removed:i}}function g(e){return e&&"number"==typeof e.length}function y(e,t){const r=e.length;if(0===r)return[];const n=[];for(let i=0;i<r;i+=t)n.push(e.slice(i,i+t));return n}function b(e,t,r){const n=e.length;let i=0,s=n-1;for(;i<s;){const r=i+Math.floor((s-i)/2);t>e[r]?i=r+1:s=r}const o=e[i];return r?t>=e[n-1]?-1:o===t?i:i-1:o===t?i:-1}class v{constructor(){this.last=0}}const w=new v;function S(e,t,r,n){n=n||w;const i=Math.max(0,n.last-10);for(let s=i;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(i,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function E(e,t,r,i){const s=r??e.length,o=S(e,(0,n.CY)(t),s,i);if(-1!==o)return e[o]=e[s-1],null==r&&e.pop(),t}const T=new Set;function I(e,t,r=e.length,n=t.length,i,s){if(0===n||0===r)return r;T.clear();for(let e=0;e<n;++e)T.add(t[e]);i=i||w;const o=Math.max(0,i.last-10);for(let t=o;t<r;++t)if(T.has(e[t])&&(s?.push(e[t]),T.delete(e[t]),e[t]=e[r-1],--r,--t,0===T.size||0===r))return T.clear(),r;for(let t=0;t<o;++t)if(T.has(e[t])&&(s?.push(e[t]),T.delete(e[t]),e[t]=e[r-1],--r,--t,0===T.size||0===r))return T.clear(),r;return T.clear(),r}function C(e,t){let r=0;for(let n=0;n<e.length;++n){const i=e[n];t(i,n)&&(e[r]=i,r++)}e.length=r}function A(e,t,r){const n=e.length;if(t>=n)return e.slice();const i=O(r),s=new Set,o=[];for(;o.length<t;){const t=Math.floor(i()*n);s.has(t)||(s.add(t),o.push(e[t]))}return o}function O(e){return e?(_.seed=e,()=>_.getFloat()):Math.random}const _=new i.Z;function D(e,t){if(!e)return e;const r=O(t);for(let t=e.length-1;t>0;t--){const n=Math.floor(r()*(t+1)),i=e[t];e[t]=e[n],e[n]=i}return e}function P(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function k(e,t){return null!=e}function x(e,...t){for(const r of t)null!=r&&e.push(r);return e.length}function R(e,t){return e.reduce(((e,r)=>t(r)?e+1:e),0)}const U=[]},443335:(e,t,r)=>{"use strict";function n(e){}function i(e){return()=>e}function s(e){return e}r.d(t,{Bg:()=>n,CY:()=>s,sM:()=>i}),r(27385)},378836:(e,t,r)=>{"use strict";r.d(t,{AL:()=>a,C7:()=>d,F2:()=>u,R5:()=>s,RE:()=>p,ed:()=>l,iU:()=>c,kB:()=>i,yV:()=>o});const n={remove:()=>{}};function i(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function s(e){e.forEach((e=>e?.remove()))}function o(e){s(e),e.length=0}function a(e){return i((()=>s(e)))}function c(e){return i((()=>e()?.remove()))}function u(e){return i((()=>e?.abort()))}function l(e){return i(null!=e?()=>e.destroy():void 0)}function d(e){(function(e){return"object"==typeof e&&!!e&&"remove"in e&&"function"==typeof e.remove})(e)&&e.remove()}function p(e){return{[Symbol.dispose](){e.remove()}}}},27385:(e,t,r)=>{"use strict";let n;function i(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>i}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},i.add=(e,t,r,s)=>{(s||void 0===n[e])&&(n[e]=t),r&&i(e)},i.cache=n,i.add("big-integer-warning-enabled",!0),i.add("esri-deprecation-warnings",!0),i.add("esri-tests-disable-screenshots",!1),i.add("esri-tests-use-full-window",!1),i.add("esri-tests-post-to-influx",!0),i.add("esri-cim-animations-enable-status","enabled"),i.add("esri-cim-animations-spotlight",!1),i.add("esri-cim-animations-freeze-time",!1),(()=>{i.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(i.add("host-browser",e),i.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.n
45ode&&globalThis.process.versions.v8),i.add("dom",e),i("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(i.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),i.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),i.add("khtml",r.includes("Konqueror")?n:void 0),i.add("edge",parseFloat(t.split("Edge/")[1])||void 0),i.add("opr",parseFloat(t.split("OPR/")[1])||void 0),i.add("webkit",!i("wp")&&!i("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),i.add("chrome",!i("edge")&&!i("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),i.add("android",!i("wp")&&parseFloat(t.split("Android ")[1])||void 0),i.add("safari",!r.includes("Safari")||i("wp")||i("chrome")||i("android")||i("edge")||i("opr")?void 0:parseFloat(r.split("Version/")[1])),i.add("mac",r.includes("Macintosh")),!i("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));i.add(e,n),i.add("ios",n)}i("webkit")||(!t.includes("Gecko")||i("wp")||i("khtml")||i("edge")||i.add("mozilla",n),i("mozilla")&&i.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&i.add("esri-mobile",t),r&&i.add("esri-iPhone",r),i.add("esri-geolocation",!!navigator.geolocation)}i.add("esri-wasm","WebAssembly"in globalThis),i.add("esri-performance-mode-frames-between-render",20),i.add("esri-force-performance-mode",!1),i.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),i.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),i.add("esri-atomics","Atomics"in globalThis),i.add("esri-workers","Worker"in globalThis),i.add("web-feat:cache","caches"in globalThis),i.add("esri-workers-arraybuffer-transfer",!i("safari")||Number(i("safari"))>=12),i.add("workers-pool-size",8),i.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),i.add("featurelayer-simplify-payload-size-factors",[1,1,4]),i.add("featurelayer-fast-triangulation-enabled",!0),i.add("featurelayer-animation-enabled",!0),i.add("featurelayer-snapshot-enabled",!0),i.add("featurelayer-snapshot-initial-tolerance",0),i.add("featurelayer-snapshot-point-min-threshold",8e4),i.add("featurelayer-snapshot-point-max-threshold",4e5),i.add("featurelayer-snapshot-multipoint-min-threshold",2e4),i.add("featurelayer-snapshot-multipoint-max-threshold",1e5),i.add("featurelayer-snapshot-polygon-min-threshold",1e3),i.add("featurelayer-snapshot-polygon-max-threshold",2e3),i.add("featurelayer-snapshot-polyline-min-threshold",1e3),i.add("featurelayer-snapshot-polyline-max-threshold",2e3),i.add("featurelayer-snapshot-max-vertex-count",25e4),i.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!1),i.add("featurelayer-snapshot-concurrency",4),i.add("featurelayer-snapshot-coverage",.1),i.add("featurelayer-query-max-depth",4),i.add("featurelayer-query-pausing-enabled",!1),i.add("featurelayer-query-tile-concurrency",4),i.add("featurelayer-query-tile-max-features",6e5),i.add("featurelayer-advanced-symbols",!1),i.add("featurelayer-pbf",!0),i.add("featurelayer-pbf-statistics",!1),i.add("feature-layers-workers",!0),i.add("feature-polyline-generalization-factor",1),i.add("mapview-transitions-duration",200),i.add("mapview-essential-goto-duration",200),i.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),i.add("mapserver-pbf-version-support",10.81),i.add("mapservice-popup-identify-max-tolerance",20),i.add("request-queue-concurrency-hosted",16),i.add("request-queue-concurrency-non-hosted",4),i.add("curve-densification-coarse-segments",128),i.add("curve-densification-max-segments",2e3),i.add("curve-densification-min-segments",3),i.add("curve-densification-pixel-deviation",.5),i.add("view-readyState-waiting-delay",1e3),i.add("gradient-depth-bias",.01),i.add("gradient-depth-epsilon",1e-8),i.add("enable-feature:esri-compress-textures",!0),i("host-webworker")||i("host-browser")&&(i.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),i.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{i.add("esri-image-decode",!0,!0,!0)})).catch((()=>{i.add("esri-image-decode",!1,!0,!0)}))}return!1})),i.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},976828:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>o,fS:()=>h,tZ:()=>c,y7:()=>m,yd:()=>s});var n=r(6010),i=r(488536);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function o(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=p(e);if(null!=t)return t
46;if(c(e))return e.clone();if(u(e))return e.map(o);if(l(e))throw new Error("Trying to clone an unclonable Accessor instance");const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=o(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=p(e);if(null!=t)return t;if(u(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(l(e))return null;const r=new(0,Object.getPrototypeOf(e).constructor);for(const t of Object.getOwnPropertyNames(e)){const n=e[t],i=a(n);if(null!=n&&null==i)return null;r[t]=i}return r}function c(e){return"function"==typeof e.clone}function u(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function l(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){if((0,i.W0)(e)||(0,i.lq)(e)||(0,i.KZ)(e)||(0,i.z3)(e)||(0,i.Uc)(e)||(0,i.Hx)(e)||(0,i.ZY)(e)||(0,i.xZ)(e)||(0,i.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,o(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(o(r));return t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof e?.getTime&&"function"==typeof t?.getTime&&e.getTime()===t.getTime()||!1}function m(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!d(e)&&d(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},838251:(e,t,r)=>{"use strict";r.d(t,{R:()=>a,RB:()=>o,RH:()=>i,hS:()=>s});var n=r(976828);function i(e,t,r=!1){return u(e,t,r)}function s(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function o(e,t,r){const n=e.split("."),i=n.pop(),s=c(n,!0,r);s&&i&&(s[i]=t)}function a(e,t){if(null==e&&null==t)return!1;if(null==e)return!0;
46if(null==t)return!0;if("object"==typeof e){if(Array.isArray(e)){const r=t;if(e.length!==r.length)return!0;for(let t=0;t<e.length;t++)if(a(e[t],r[t]))return!0;return!1}if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(a(e[r],t[r]))return!0;return!1}return e!==t}function c(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function u(e,t,r){return t?Object.keys(t).reduce(((e,i)=>{if("__proto__"===i)return e;let s=e[i],o=t[i];return s===o?e:void 0===s?(e[i]=(0,n.d9)(o),e):(Array.isArray(o)||Array.isArray(e)?(s=s?Array.isArray(s)?e[i]=s.slice():e[i]=[s]:e[i]=[],o&&(Array.isArray(o)||(o=[o]),r?o.forEach((e=>{s.includes(e)||s.push(e)})):e[i]=o.slice())):o&&"object"==typeof o?e[i]=u(s,o,r):e.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(e[i]=o),e)}),e||{}):e}},397071:(e,t,r)=>{"use strict";r.d(t,{t:()=>a});var n=r(976828),i=r(702615),s=r(546137);class o{constructor(e,t){this._observable=new s.s,this._value=e,this._equalityFunction=t}get value(){return(0,i.it)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.y7){return new o(e,t)}},42281:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>o,hP:()=>c,pZ:()=>d,pv:()=>p});var n=r(838251);const i=/\{([^}]+)\}/g;function s(e){return e??""}function o(e,t){return t?e.replaceAll(i,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r))):e}function a(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,(e=>t?.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}let u;function l(e){return u??=new DOMParser,u.parseFromString(e||"","text/html").body.innerText||""}function d(e,t){return new RegExp(`{${t}}`,"ig").test(e)}function p(e,...t){let r=e[0];for(let n=0;n<t.length;++n)r+=t[n]+e[n+1];return r}},488536:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function i(e){return"Int8Array"===e?.constructor?.name}function s(e){return"Uint8Array"===e?.constructor?.name}function o(e){return"Uint8ClampedArray"===e?.constructor?.name}function a(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function u(e){return"Int32Array"===e?.constructor?.name}function l(e){return"Uint32Array"===e?.constructor?.name}function d(e){return"Float16Array"===e?.constructor?.name}function p(e){return"Float32Array"===e?.constructor?.name}function h(e){return"Float64Array"===e?.constructor?.name}function m(e){return"buffer"in e}r.d(t,{AP:()=>d,B3:()=>g,EK:()=>v,Hx:()=>u,KZ:()=>o,Op:()=>b,Q7:()=>y,Uc:()=>c,W0:()=>i,ZY:()=>l,aS:()=>w,c8:()=>f,eP:()=>n,fS:()=>h,fU:()=>m,lq:()=>s,rU:()=>S,xZ:()=>p,z3:()=>a}),r(27385);const f=1024;function g(e){return h(e)||p(e)||u(e)||a(e)||i(e)}function y(e){return h(e)||p(e)}function b(e){return h(e)?179769e303:d(e)?65504:p(e)?3402823e32:l(e)?4294967295:c(e)?65535:s(e)||o(e)?255:u(e)?2147483647:a(e)?32767:i(e)?127:256}const v=-32768,w=-2147483648,S=65535},428226:(e,t,r)=>{"use strict";r.d(t,{C:()=>z,G:()=>Q,a:()=>C,b:()=>x,c:()=>d,d:()=>b,e:()=>v,f:()=>k,h:()=>A,i:()=>p,k:()=>_,l:()=>D,n:()=>h,o:()=>S,r:()=>g,s:()=>f,t:()=>P});var n=r(29647),i=r(775052);function s(e,t,r){o(e,t),t.set(e,r)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function u(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,l(e,t,"set"),r),r}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const d=Symbol.for("controller"),p=e=>"function"==typeof e?.then,h=e=>e.M.length;let m;const f=e=>{m!==e&&(m=e,queueMicrotask((()=>m===e?m=void 0:0)))},g=e=>m;let y=[];const b=e=>{if(void 0===e)return void(y=[]);const t=y.indexOf(e);y=-1===t?[...y,e]:y.slice(0,t+1),queueMicrotask((()=>y=[]))},v=()=>y;let w;const S=e=>{w!==e&&(w=e,queueMicrotask((()=>w===e?w=void 0:0)))},E=async(e,t)=>{const r=I(e);if(void 0===r)return e;if(await r.ready,"function"==typeof t){const e=r.watchExports((r=>t(r,e)))}
46return r.exports},T=async e=>{const t=I(e);return await t.ready,t},I=e=>{const t=g().manager.X(e);if(void 0!==t)return t;if((e=>"object"==typeof e&&null!==e&&(d in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e))(e))return e;const r=(()=>{const e=w;return w=void 0,e})();return void 0!==r?r:void 0};let C=!1;const A=e=>{C=!0;try{return e()}finally{C=!1}};let O;const _=()=>{O?.forEach((({callbacks:e},t)=>{const r=Object.keys(t);e.forEach((e=>e(r)))})),O=void 0},D=(e,t,r)=>{const s=e.manager;return s.V!==i.Ld&&s.V!==r&&s.S(void 0,void 0),0===s.T.length&&queueMicrotask((()=>s.S(void 0,void 0))),s.V=r,s.T.push(((e,i)=>(0,n.Dx)(t,void 0,r===i?e:void 0))),r},P=(e=[g(),...v()],t,r)=>{const i=Array.isArray(e)?e:[e];let s=i.length+1;const o=e=>{s-=1,void 0!==e&&(s=Math.min(s,0)),0===s&&t(e)};i.forEach((e=>((e,t,r)=>{const i=Object.keys(e),s=i.length;void 0===O&&queueMicrotask(_),O??=new Map;let o=O.get(e);return void 0===o&&(o={callbacks:[],keyCount:s},O.set(e,o)),o.keyCount!==s&&(o.callbacks.forEach((e=>e(i))),o.callbacks=[],o.keyCount=s),o.callbacks.push((i=>{const o=e=>(0,n.Dx)(t,null,e),a=i[s];void 0===a?o(void 0):e[a]===r?o(a):o(void 0)})),r})(e,(t=>o(void 0===t?void 0:{key:t,host:e,isReactive:!1})),r)));for(const e of i)if("manager"in e&&e.manager.component===e){D(e,(t=>o(void 0===t?void 0:{key:t,host:e,isReactive:!0})),r);break}return r},k=(e="",t={},r=g())=>{const n={emit:n=>{""===e&&_();const i=new CustomEvent(e,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return r.el.dispatchEvent(i),i}};return""===e&&P(void 0,(t=>e=t.key),n),n},x=k.bind(null,"");var R;R=d;var U=new WeakMap,M=new WeakMap,N=new WeakMap,j=new WeakMap,$=new WeakMap,F=new WeakMap,G=new WeakMap,L=new WeakMap,H=new WeakMap,B=new WeakMap,W=new WeakMap,q=new WeakMap,V=new WeakMap,K=new WeakSet;class z{constructor(e){var t;o(this,t=K),t.add(this),s(this,U,{writable:!0,value:void 0}),s(this,M,{writable:!0,value:void 0}),s(this,N,{writable:!0,value:void 0}),s(this,j,{writable:!0,value:void 0}),s(this,$,{writable:!0,value:void 0}),s(this,F,{writable:!0,value:void 0}),s(this,G,{writable:!0,value:void 0}),s(this,L,{writable:!0,value:void 0}),s(this,H,{writable:!0,value:void 0}),s(this,B,{writable:!0,value:void 0}),s(this,W,{writable:!0,value:void 0}),s(this,q,{writable:!0,value:void 0}),s(this,V,{writable:!0,value:void 0}),u(this,U,[]),u(this,M,[]),u(this,N,[]),u(this,j,[]),u(this,$,[]),u(this,F,[]),u(this,G,[]),u(this,L,[]),u(this,H,[]),u(this,B,!1),this.P=new n.BH,this.connectedCalled=!1,this.loadedCalled=!1,this[R]=!0,u(this,V,[]);const r=this,i=e??g(new.target.name);u(r,W,i),r.ready=r.P.promise,u(r,q,Z(r)),r.component=i,c(r,W).addController(r),void 0===c(r,W).manager||(b(r),queueMicrotask((()=>r.catchUpLifecycle())))}catchUpLifecycle(){const{manager:e}=c(this,W);!e.connectedCalled||this.connectedCalled||this.triggerConnected(),!c(e,B)||this.triggerLoad().then((()=>e.loadedCalled&&this.triggerLoaded())).catch(console.error)}get exports(){return c(this,q)}set exports(e){const t=c(this,q);t!==e&&(u(this,q,e),c(this,V).forEach(n.Dx),this.connectedCalled&&!1!==this.O&&c(this,W).requestUpdate(this.O,t)),this.P.resolve(e)}setProvisionalExports(e,t=!0){u(this,q,t?Z(e):e),c(this,V).forEach(n.Dx)}watchExports(e){const t=()=>e(c(this,q));return c(this,V).push(t),()=>{c(this,V).splice(c(this,V).indexOf(t),1)}}get use(){return f(c(this,W)),E}get useRef(){return f(c(this,W)),T}get useRefSync(){return f(c(this,W)),I}controllerRemoved(){c(this,W).el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){c(this,U).push(e)}onDisconnected(e){c(this,M).push(e)}onLoad(e){c(this,N).push(e)}onLoaded(e){c(this,j).push(e)}onUpdate(e){c(this,$).push(e)}onUpdated(e){c(this,F).push(e)}onDestroy(e){c(this,G).push(e)}onLifecycle(e){c(this,L).push(e),this.connectedCalled&&c(this,W).el.isConnected&&a(this,K,Y).call(this,e)}triggerConnected(){const e=this;e.hostConnected&&(0,n.Dx)(e.hostConnected,e),c(e,U).forEach(n.Dx),e.triggerLifecycle(),e.connectedCalled=!0}triggerDisconnected(){const e=this;e.hostDisconnected&&(0,n.Dx)(e.hostDisconnected,e),c(e,M).forEac
46h(n.Dx),c(e,H).forEach(n.Dx),u(e,H,[])}async triggerLoad(){if(c(this,B))return;u(this,B,!0);const e=this;e.hostLoad&&await(0,n.BB)(e.hostLoad,e),c(this,N).length>0&&await Promise.allSettled(c(this,N).map(n.BB)),this.P.resolve(c(this,q))}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,n.Dx)(this.hostLoaded,this),c(this,j).forEach(n.Dx),this.loadedCalled=!0)}triggerUpdate(e){this.hostUpdate&&(0,n.Dx)(this.hostUpdate,this,e),c(this,$).forEach(J,e)}triggerUpdated(e){this.hostUpdated&&(0,n.Dx)(this.hostUpdated,this,e),c(this,F).forEach(J,e)}triggerDestroy(){this.hostDestroy&&(0,n.Dx)(this.hostDestroy,this),c(this,G).forEach(n.Dx)}triggerLifecycle(){this.hostLifecycle&&a(this,K,Y).call(this,(()=>this.hostLifecycle())),c(this,L).forEach(a(this,K,Y),this)}}function Y(e){f(c(this,W));const t=(0,n.Dx)(e);(Array.isArray(t)?t:[t]).forEach((e=>{"function"==typeof e?c(this,H).push(e):"object"==typeof e&&"function"==typeof e.remove&&c(this,H).push(e.remove)}))}function J(e){(0,n.Dx)(e,void 0,this)}const Q=z,Z=e=>{if("object"!=typeof e&&"function"!=typeof e||null===e)return e;const t=new Proxy(e,{get(e,r,n){if("exports"!==r&&"_exports"!==r||!(r in e)||e[r]!==t)return r in e||r in Promise.prototype||"symbol"==typeof r?"function"==typeof e?e[r]:Reflect.get(e,r,n):void 0}});return t}},327301:(e,t,r)=>{"use strict";r.d(t,{oi:()=>oe,yM:()=>n.b,D2:()=>f,RD:()=>ue,hZ:()=>h,Ld:()=>pe,Vp:()=>le,kA:()=>de});var n=r(428226),i=r(465546);i.Ts,i.Qu;var s=r(29647);function o(e,t,r){a(e,t),t.set(e,r)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,d(e,t,"get"))}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function l(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,d(e,t,"set"),r),r}function d(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const p=e=>{let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){const r=t;return r.manager?.loadedCalled||(r.J??r._offspring).push(e),(r.I??r._postLoad).promise}return!1},h={};function m(){}const f=(e,t)=>function(r,n){if(!globalThis.customElements)return;const i=(n??r??{}).resourcesUrl;i&&e.setAssetPath(i);for(const[r,[n,i=""]]of Object.entries(t)){var s;if(customElements.get(r))continue;const[t,o,a]=i.split(";"),c=t?t?.split(",").map(y):void 0,u=c?.map((([e])=>e)),l=(s=class e extends T{constructor(){!e.B&&(e.B=n(),e.F()),super()}},s.observedAttributes=c?.map((([,e])=>e)).filter((e=>""!==e)),s.C=u,s.E=o?o?.split(","):void 0,s.D=a?.split(","),s.L=r,s.K=e,s);customElements.define(r,l)}},g=Object.defineProperty,y=e=>{const t=e.split(":");return 1===t.length?[t[0],(0,s.mB)(t[0])]:t},b=globalThis.HTMLElement??m;var v=new WeakMap,w=new WeakMap,S=new WeakMap,E=new WeakSet;class T extends b{constructor(){var e;super(),a(this,e=E),e.add(this),o(this,v,{writable:!0,value:void 0}),o(this,w,{writable:!0,value:void 0}),o(this,S,{writable:!0,value:void 0}),l(this,w,{}),l(this,S,[]),this.I=new s.BH,this.H=new s.BH,this.J=[];const t=this,r=t.constructor;t._offspring=t.J,t._postLoad=t.I,r.C?.forEach((e=>{Object.hasOwn(t,e)&&(c(t,w)[e]=t[e],delete t[e])})),r.A?u(t,E,I).call(t,{a:r.A}):r.B.then((async e=>{await r.K.p,u(t,E,I).call(t,await(e.default?.then((e=>"function"==typeof e?{a:e}:e))??e))})).catch((e=>{t.H.reject(e),setTimeout((()=>{throw e}))}))}static F(){for(const e of this.C??[])g(this.prototype,e,{configurable:!0,enumerable:!0,get(){return c(this,w)[e]},set(t){c(this,w)[e]=t}});for(const e of this.E??[])g(this.prototype,e,{async value(...t){c(this,v)||await this.H.promise;const r=c(this,v);return await r[e](...t)},configurable:!0});for(const e of this.D??[])g(this.prototype,e,{value(...t){return c(this,v)[e](...t)},configurable:!0})}get manager(){return c(this,v)?.manager}attributeChangedCallback(e,t,r){c(this,v)?.attributeChangedCallback(e,t,r),c(this,v)||c(this,S).push(e)}connectedCallback(){c(this,v)?c(this,v).connectedCallback?.():queueMicrotask((()=>this.G=p(this)))}disconnectedCallback(){c(this,v)?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}addController(){}requestUpdate(){c(this,v)?.requestUpdate()}}function I(e){const t=this.constructor,r=t.L,n=c(this,w),i=Object.values(e).find((e=>e.L===r)),s=`${r}--lazy`;let o=i;for(;o&&!Object.hasOwn(o,"lumina");
46)o=Object.getPrototypeOf(o);A(o),!t.A&&(t.A=i,customElements.define(s,i)),i.N=this;const a=document.createElement(s);i.N=void 0,l(this,v,a),l(this,w,a),c(this,S).forEach((e=>a.attributeChangedCallback(e,null,this.getAttribute(e)))),Object.entries(n).forEach(C,a);const u=this.isConnected;(u||this.G)&&(a.connectedCallback?.(),u||a.disconnectedCallback())}function C([e,t]){this[e]=t}T.lumina=!0;const A=e=>{const t=e.prototype,r=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(e,t){r.setAttribute.call(this.el,e,t)},t.removeAttribute=function(e){r.removeAttribute.call(this.el,e)},g(t,"isConnected",{get(){return Reflect.get(r,"isConnected",this.el)}}))};var O=r(775052),_=r(741388);const D=e=>(...t)=>({_$litDirective$:e,values:t});class P{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const k=D(class extends P{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return _.Jb}}),x="important",R=" !"+x,U=D(class extends P{constructor(e){if(super(e),1!==e.type||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];return null==n?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const n=t[e];if(null!=n){this.ft.add(e);const t="string"==typeof n&&n.endsWith(R);e.includes("-")||t?r.setProperty(e,t?n.slice(0,-11):n,t?x:""):r[e]=n}}return _.Jb}}),{I:M}=_._$LH,N={};var j;function $(e,t){B(e,t),t.add(e)}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=G(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},F.apply(this,arguments)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function L(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function H(e,t,r){B(e,t),t.set(e,r)}function B(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function W(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,V(e,t,"get"))}function q(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,V(e,t,"set"),r),r}function V(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}D(class extends P{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(void 0!==e.strings)throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===_.Jb||t===_.Ld)return t;const r=e.element,n=e.name;if(3===e.type){if(t===r[n])return _.Jb}else if(4===e.type){if(!!t===r.hasAttribute(n))return _.Jb}else if(1===e.type&&r.getAttribute(n)===t+"")return _.Jb;return((e,t=N)=>{e._$AH=t})(e),t}});
46var K=new WeakMap,z=new WeakMap,Y=new WeakMap;class J extends n.G{constructor(e){super(e),H(this,K,{writable:!0,value:void 0}),H(this,z,{writable:!0,value:void 0}),H(this,Y,{writable:!0,value:void 0}),this.destroyed=!1,this.R=!1,this.V=O.Ld,this.T=[],q(this,Y,new WeakMap),q(this,z,e),this.exports=void 0,this.hasDestroy=Z in e&&"function"==typeof e.destroy,O.oi.prototype.addController.call(e,{hostConnected:()=>{if(this.destroyed){const t=e.el.localName;throw e.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Z} prop.`)}void 0!==W(this,K)&&clearTimeout(W(this,K)),(0,n.k)();for(const t of e.M)"triggerConnected"in t?t.triggerConnected():(0,s.Dx)(t.hostConnected,t)},hostDisconnected:()=>{for(const t of e.M)"triggerDisconnected"in t?t.triggerDisconnected():(0,s.Dx)(t.hostDisconnected,t);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const t of e.M)"triggerUpdate"in t?t.triggerUpdate(this.Q):(0,s.Dx)(t.hostUpdate,t,this.Q)},hostUpdated:()=>{for(const t of e.M)"triggerUpdated"in t?t.triggerUpdated(this.Q):(0,s.Dx)(t.hostUpdated,t,this.Q);this.Q=void 0}}),queueMicrotask((()=>this.R=!0)),(0,n.s)(e)}async destroy(){if(!this.destroyed){W(this,z).el.isConnected&&(this.hasDestroy=!1,W(this,z).el.remove()),q(this,K,void 0),this.destroyed=!0;for(const e of W(this,z).M)"triggerDestroy"in e?e.triggerDestroy():(0,s.Dx)(e.hostDestroy,e);W(this,z).M.splice(0)}}U(){if(void 0!==W(this,K)&&clearTimeout(W(this,K)),!W(this,z).el.isConnected&&!W(this,z).autoDestroyDisabled){const e=()=>{W(this,z).destroy()};q(this,K,(0,s.lG)(e,Q))}}S(e,t){const r=this.T;this.V=O.Ld,this.T=[],r.forEach((r=>r(e,t)))}W(e,t){("object"==typeof t&&null!==t||"function"==typeof t)&&W(this,Y).set(t,e)}X(e){return"object"==typeof e&&null!==e||"function"==typeof e?W(this,Y).get(e):void 0}}let Q=1e3;const Z="autoDestroyDisabled";var X=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,ie=new WeakSet,se=new WeakSet;class oe extends O.oi{constructor(){super(),$(this,se),$(this,ie),H(this,X,{writable:!0,value:void 0}),H(this,ee,{writable:!0,value:void 0}),H(this,te,{writable:!0,value:void 0}),H(this,re,{writable:!0,value:void 0}),H(this,ne,{writable:!0,value:void 0}),this.M=[],this.manager=new J(this);const e=this,t=e.constructor,r=t.N,n=t.K.o,i=oe.prototype.shouldUpdate;q(e,re,r?.H??new s.BH),e.I=r?.I??new s.BH,e.J=r?.J??[],e._offspring=e.J,e._postLoad=e.I,e.el=r??e,q(e,te,e.enableUpdating),e.enableUpdating=m,e.shouldUpdate!==i&&(q(e,ee,e.shouldUpdate),e.shouldUpdate=i),n&&(q(e,X,new Map),t.elementProperties.forEach(((t,r)=>W(e,X).set(r,n())))),O.sk&&e.el.setAttribute(t.K.hydratedAttribute,"")}static finalizeStyles(e){const t=super.finalizeStyles(e),r=this.shadowRootOptions===h;return void 0===this.K?.commonStyles||r?t:[this.K.commonStyles,...t]}static createProperty(e,t){const r="number"==typeof t?t:Array.isArray(t)?t[0]:0,n=Array.isArray(t)?t[1]:void 0,i=n?.hasChanged??O.Qu,o={attribute:!!(1&r&&"string"==typeof e)&&(0,s.mB)(e),reflect:!!(2&r),type:4&r?Boolean:8&r?Number:void 0,state:!!(16&r),readOnly:!!(32&r),noAccessor:!!(64&r),c:!1,...n,hasChanged(e,t){const r=i(e,t);return o.c=r,r}};super.createProperty(e,o)}static getPropertyDescriptor(e,t,r){const i=this.K,s=super.getPropertyDescriptor(e,t,r);return r.d=s,{...s,get(){return i.t?.(W(this,X).get(e)),s.get?.call(this)},set(t){const i=this.manager;if(r.readOnly&&!n.a&&(i.R||i.connectedCalled))throw Error(`Cannot assign to read-only property "${e}" of ${this.el.localName}. Trying to assign "${t}"`);s.set.call(this,t??void 0),r.c&&W(this,X)?.get(e)?.notify(),i.T.length>0&&i?.S(e,t)}}}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;const e=this.constructor.K.c?.((()=>this.requestUpdate()));q(this,ne,e);const t=!this.manager.connectedCalled;super.connectedCallback(),t?queueMicrotask((()=>L(this,se,ce).call(this).catch((e=>{W(this,re).reject(e),setTimeout((()=>{throw e}))})))):e&&this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),W(this,ne)?.destroy(),q(this,ne,void 0)}createRenderRoot(){const e=this.el.shadowRoot,t=this.constructor,r=t.shadowRootOptions,n=e??(r===h?this.el:this.el.attachShadow(r));if(e)return O.oi.prototype.createRenderRoot.call(this),e;if(this.isConnected){const e=n.getRootNode();e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t.elementStyles.map((e=>"styleSheet"in e?e.styleSheet:e))]}return n}shouldUpdate(e){return this.manager.Q=e,W(this,ee)?.call(this,e)??!0}update(e){W(this,ne)?L(this,ie,ae).call(this,e):super.update(e)}listen(e,t,r){const n=t?.bind(this)??t;this.manager.onLifecycle((()=>(this.el.addEventListener(e,n,r),()=>this.el.removeEventListener(e,n,r))))}listenOn(e,t,r,n){const i=r?.bind(this)??r;this.manager.onLifecycle((()=>(e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n))))}async componentOnReady(){return await W(this,re).promise,this}addController(e){this.M.push(e),!(n.c in e)&&this.renderRoot&&this.el.isConnected&&e.hostConnected?.()}
46removeController(e){this.M.splice(this.M.indexOf(e),1),e.controllerRemoved?.()}}function ae(e){try{W(this,ne).clear(),this.constructor.K.r(W(this,ne),(()=>F(G(j.prototype),"update",this).call(this,e)))}catch(e){throw W(this,ne).clear(),e}}async function ce(){const e=this.el.G??p(this.el);e&&await e;const t=[];for(const e of this.M)"triggerLoad"in e?t.push(e.triggerLoad()):t.push((0,s.BB)(e.hostLoad,e));await Promise.all(t),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate((e=>e.has(Z)&&this.manager.U())),W(this,te).call(this,!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();const r=this.J.filter((e=>!e.manager?.loadedCalled));r.length&&await Promise.allSettled(r.map((async e=>await e.componentOnReady()))),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const e of this.M)"triggerLoaded"in e?e.triggerLoaded():(0,s.Dx)(e.hostLoaded,e);this.loaded?.(),W(this,re).resolve()}(j=oe).lumina=!0;const ue=e=>{let t;const r=e=>{t=new URL(e,globalThis.location?.href||void 0).href},n={...e,getAssetPath(e){const r=new URL(e,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:r,customElement(e,t){t.K=n,t.L=e,customElements.get(e)||customElements.define(e,t)}};return r(e.defaultAssetPath),n},le=e=>"object"==typeof e&&null!=e?k(e):e,de=e=>"object"==typeof e&&null!=e?U(e):e,pe=_.Ld},465546:(e,t,r)=>{"use strict";r.d(t,{fl:()=>T,Ts:()=>w,Qu:()=>S});const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(t,e))}return e}toString(){return this.cssText}}const c=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,s))(t)})(e):e,{is:u,defineProperty:l,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:h,getPrototypeOf:m}=Object,f=globalThis,g=f.trustedTypes,y=g?g.emptyScript:"",b=f.reactiveElementPolyfillSupport,v=(e,t)=>e,w={toAttribute(e,t){switch(t){case Boolean:e=e?y:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},S=(e,t)=>!u(e,t),E={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class T extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&l(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const s=n?.call(this);i?.call(this,t),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=m(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...p(e),...h(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}
vendor: 5,223 bytes, line 46
46removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:w).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:w;this._$Em=n,this[n]=i.fromAttribute(t,e.type)??this._$Ej?.get(n)??null,this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){const n=this.constructor,i=this[e];if(r??=n.getPropertyOptions(e),!((r.hasChanged??S)(i,t)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:i},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==i||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[v("elementProperties")]=new Map,T[v("finalized")]=new Map,b?.({ReactiveElement:T}),(f.reactiveElementVersions??=[]).push("2.1.0")},741388:(e,t,r)=>{"use strict";r.d(t,{Jb:()=>I,Ld:()=>C,_$LH:()=>F,sY:()=>L});const n=globalThis,i=n.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,o="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,c="?"+a,u=`<${c}>`,l=document,d=()=>l.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,h=Array.isArray,m=e=>h(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,b=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,S=/"/g,E=/^(?:script|style|textarea|title)$/i,T=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),I=(T(1),T(2),T(3),Symbol.for("lit-noChange")),C=Symbol.for("lit-nothing"),A=new WeakMap,O=l.createTreeWalker(l,129);function _(e,t){if(!h(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(t):t}const D=(e,t)=>{const r=e.length-1,n=[];let i,s=2===t?"<svg>":3===t?"<math>":"",c=g;for(let t=0;t<r;t++){const r=e[t];let l,d,p=-1,h=0;for(;h<r.length&&(c.lastIndex=h,d=c.exec(r),null!==d);)h=c.lastIndex,c===g?"!--"===d[1]?c=y:void 0!==d[1]?c=b:void 0!==d[2]?(E.test(d[2])&&(i=RegExp("</"+d[2],"g")),c=v):void 0!==d[3]&&(c=v):c===v?">"===d[0]?(c=i??g,p=-1):void 0===d[1]?p=-2:(p=c.lastIndex-d[2].length,l=d[1],c=void 0===d[3]?v:'"'===d[3]?S:w):c===S||c===w?c=v:c===y||c===b?c=g:(c=v,i=void 0);const m=c===v&&e[t+1].startsWith("/>")?" ":"";s+=c===g?r+u:p>=0?(n.push(l),r.slice(0,p)+o+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[_(e,s+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class P{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,u=0;const l=e.length-1,p=this.parts,[h,m]=D(e,t);if(this.el=P.createElement(h,r),O.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;
vendor: 4,390 bytes, line 46
46null!==(n=O.nextNode())&&p.length<l;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(o)){const t=m[u++],r=n.getAttribute(e).split(a),i=/([.?@])?(.*)/.exec(t);p.push({type:1,index:s,name:i[2],strings:r,ctor:"."===i[1]?M:"?"===i[1]?N:"@"===i[1]?j:U}),n.removeAttribute(e)}else e.startsWith(a)&&(p.push({type:6,index:s}),n.removeAttribute(e));if(E.test(n.tagName)){const e=n.textContent.split(a),t=e.length-1;if(t>0){n.textContent=i?i.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],d()),O.nextNode(),p.push({type:2,index:++s});n.append(e[t],d())}}}else if(8===n.nodeType)if(n.data===c)p.push({type:2,index:s});else{let e=-1;for(;-1!==(e=n.data.indexOf(a,e+1));)p.push({type:7,index:s}),e+=a.length-1}s++}}static createElement(e,t){const r=l.createElement("template");return r.innerHTML=e,r}}function k(e,t,r=e,n){if(t===I)return t;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const s=p(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(e),i._$AT(e,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(t=k(e,i._$AS(e,t.values),i,n)),t}class x{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??l).importNode(t,!0);O.currentNode=n;let i=O.nextNode(),s=0,o=0,a=r[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new R(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new $(i,this,e)),this._$AV.push(t),a=r[++o]}s!==a?.index&&(i=O.nextNode(),s++)}return O.currentNode=l,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),p(e)?e===C||null==e||""===e?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==I&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):m(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==C&&p(this._$AH)?this._$AA.nextSibling.data=e:this.T(l.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=P.createElement(_(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new x(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=A.get(e.strings);return void 0===t&&A.set(e.strings,t=new P(e)),t}k(e){h(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new R(this.O(d()),this.O(d()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class U{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=C}_$AI(e,t=this,r,n){const i=this.strings;let s=!1;if(void 0===i)e=k(this,e,t,0),s=!p(e)||e!==this._$AH&&e!==I,s&&(this._$AH=e);else{const n=e;let o,a;for(e=i[0],o=0;o<i.length-1;o++)a=k(this,n[r+o],t,o),a===I&&(a=this._$AH[o]),s||=!p(a)||a!==this._$AH[o],a===C?e=C:e!==C&&(e+=(a??"")+i[o+1]),this._$AH[o]=a}s&&!n&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class M extends U{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}}class N extends U{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==C)}}class j extends U{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}
46_$AI(e,t=this){if((e=k(this,e,t,0)??C)===I)return;const r=this._$AH,n=e===C&&r!==C||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==C&&(r===C||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ${constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}}const F={M:o,P:a,A:c,C:1,L:D,R:x,D:m,V:k,I:R,H:U,N:N,U:j,B:M,F:$},G=n.litHtmlPolyfillSupport;G?.(P,R),(n.litHtmlVersions??=[]).push("3.3.0");const L=(e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new R(t.insertBefore(d(),e),e,void 0,r??{})}return i._$AI(e),i}},775052:(e,t,r)=>{"use strict";r.d(t,{oi:()=>o,sk:()=>c,Qu:()=>n.Qu,Ld:()=>i.Ld});var n=r(465546),i=r(741388);const s=globalThis;class o extends n.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,i.sY)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i.Jb}}o._$litElement$=!0,o.finalized=!0,s.litElementHydrateSupport?.({LitElement:o});const a=s.litElementPolyfillSupport;a?.({LitElement:o}),(s.litElementVersions??=[]).push("4.2.0");const c=!1},463253:(e,t,r)=>{"use strict";r.d(t,{c:()=>o,g:()=>a,r:()=>s});var n=r(327301),i=r(795290);const s=(0,n.RD)({defaultAssetPath:"https://gis.nbs.gov.so/arcgis/jsapi/jsapi4/map-components/",hydratedAttribute:"hydrated"}),{customElement:o,getAssetPath:a,setAssetPath:c}=s;s.t=i.it,s.o=i.kR,s.c=i.Vz,s.r=i.LJ},695360:(e,t,r)=>{"use strict";r.r(t),r.d(t,{defineCustomElements:()=>i});var n=r(463253);const i=(0,r(327301).D2)(n.r,{"arcgis-area-measurement-2d":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(32822),r.e(24637),r.e(55620),r.e(24754),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(66053),r.e(82110),r.e(59939),r.e(16594),r.e(2141),r.e(14851),r.e(60500)]).then(r.bind(r,531908)),"autoDestroyDisabled,icon,label,position,referenceElement,snappingOptions:,state,unit,unitOptions:;clear,destroy,start"],"arcgis-area-measurement-3d":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(40285),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(24510),r.e(96805)]).then(r.bind(r,601182)),"analysis:,autoDestroyDisabled,icon,label,position,referenceElement,state,unit,unitOptions:;clear,destroy,start"],"arcgis-attachments":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(93
46642)]).then(r.bind(r,360699)),"autoDestroyDisabled,capabilities:,displayType,graphic:,hideAddButton,hideAddSubmitButton,hideCancelAddButton,hideCancelUpdateButton,hideDeleteButton,hideErrorMessage,hideProgressBar,hideUpdateButton,icon,label,position,referenceElement,state,submitting:;destroy"],"arcgis-basemap-gallery":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(77319),r.e(2371),r.e(53790),r.e(23516),r.e(5718),r.e(42809),r.e(58609)]).then(r.bind(r,220908)),"activeBasemap,autoDestroyDisabled,disabled,headingLevel,icon,label,messageOverrides:,position,referenceElement,source:,state;destroy"],"arcgis-basemap-gallery-item":[()=>r.e(34536).then(r.bind(r,534536)),"disabled,item:,itemIndex,messages:,viewModel:"],"arcgis-basemap-layer-list":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(66138)]).then(r.bind(r,666138)),"autoDestroyDisabled,baseFilterPredicate:,baseFilterText,baseItems:,baseListItemCreatedFunction:,basemapTitle,catalogLayerList:,catalogOptions:,closed,collapsed,dragEnabled,editingTitle,filterPlaceholder,headingLevel,hideBaseLayers,hideFlow,hideHeading,hideReferenceLayers,hideStatusIndicators,icon,label,minFilterItems,position,referenceElement,referenceFilterPredicate:,referenceFilterText,referenceItems:,referenceListItemCreatedFunction:,selectedItems:,selectionMode,showCloseButton,showCollapseButton,showEditTitleButton,showErrors,showFilter,showTemporaryLayerIndicators,state,visibilityAppearance;destroy"],"arcgis-basemap-toggle":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(77319),r.e(2371),r.e(53790),r.e(23516),r.e(5718),r.e(42809),r.e(97714)]).then(r.bind(r,121392)),"activeBasemap:,autoDestroyDisabled,icon,label,messageOverrides:,nextBasemap,position,referenceElement,showTitle,state;destroy,toggle"],"arcgis-bookmarks":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(72908)]).then(r.bind(r,772908)),"autoDestroyDisabled,bookmarks:,closed,defaultCreateOptions:,defaultEditOptions:,disabled,dragEnabled,filterPlaceholder,filterText,goToOverride:,hideFlow,hideThumbnail,hideTime,icon,label,position,referenceElement,showAddBookmarkButton,showCloseButton,showCollapseButton,showEditBookmarkButton,showFilter,showHeading,state;destroy"],"arcgis-building-explorer":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(72838),r.e(16044),r.e(44202)]).then(r.bind(r,965704)),"autoDestroyDisabled,headingLevel,hideDisciplines,hideLevels,hidePhases,icon,label,layers:,level:,phase:,position,referenceElement,state;destroy"],"arcgis-catalog-layer-list":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(4466)]).then(r.bind(r,304466)),"autoDestroyDisabled,catalogItems:,catalogLayer:,closed,collapsed,filterPlaceholder,filterPredicate:,filterText,headingLevel,hideFlow,hideStatusIndicators,icon,label,listItemCreatedFunction:,minFilterItems,position,referenceElement,selectedItems:,selectionMode,showCloseButton,showCollapseButton,showErrors,showFilter,showHeading,showTemporaryLayerIndicators,state,visibilityAppearance;destroy"],"arcgis-compass":[()=>Promise.all([r.e(67529),r.e(23516),r.e(5718),r.e(42188)]).then(r.bind(r,842188)),"autoDestroyDisabled,goToOverride:,icon,label,messageOverrides:,orientation:,position,referenceElement,state;destroy,reset"],"arcgis-coordinate-conversion":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(9221)]).then(r.bind(r,980645)),"autoDestroyDisabled,conversions:,currentLocation:,formats:,goToOverride:,headingLevel,hideCaptureButton,hideExpandButton,hideInputButton,hideSettingsButton,icon,label,locationSymbol:,mode,multipleConversionsDisabled,orientation,position,referenceElement,state,storageDisabled,storageType;destroy,reverseConvert"],"arcgis-daylight":[()=>
46Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(77372),r.e(87121)]).then(r.bind(r,87121)),"autoDestroyDisabled,currentSeason,dateOrSeason,dayPlaying,headingLevel,hideDatePicker,hideHeader,hidePlayButtons,hideShadowsToggle,hideSunLightingToggle,hideTimezone,icon,label,playSpeedMultiplier,position,referenceElement,timeSliderSteps,yearPlaying;destroy"],"arcgis-directional-pad":[()=>Promise.all([r.e(67529),r.e(23516),r.e(5718),r.e(92140)]).then(r.bind(r,492140)),"autoDestroyDisabled,disabled,hideDirectionalButtons,icon,label,messageOverrides:,position,referenceElement,showRotationResetButton,showRotationSlider,state,visualScale;destroy"],"arcgis-directions":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(34478),r.e(53790),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(37119),r.e(74040),r.e(85844),r.e(84796),r.e(82318),r.e(23205)]).then(r.bind(r,197595)),"apiKey,autoDestroyDisabled,goToOverride:,headingLevel,hideLayerDetails,hideSaveAsButton,hideSaveButton,icon,label,lastRoute:,layer:,maxStops,position,referenceElement,routeLayerItemId,searchProperties:,state,unit,useDefaultRouteLayer;destroy,getDirections,save,saveAs,zoomToRoute"],"arcgis-direct-line-measurement-3d":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(40285),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(24510),r.e(58031)]).then(r.bind(r,779088)),"analysis:,autoDestroyDisabled,icon,label,position,referenceElement,state,unit,unitOptions:;clear,destroy,start"],"arcgis-directline-measurement-3d":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(40285),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(24510),r.e(58031)]).then(r.bind(r,779088)),"analysis:,autoDestroyDisabled,icon,label,position,referenceElement,state,unit,unitOptions:;clear,destroy,start"],"arcgis-distance-measurement-2d":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(32822),r.e(24637),r.e(55620),r.e(24754),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(66053),r.e(82110),r.e(59939),r.e(16594),r.e(2141),r.e(14851),r.e(10238)]).then(r.bind(r,171414)),"autoDestroyDisabled,icon,label,position,referenceElement,snappingOptions:,state,unit,unitOptions:;clear,destroy,start"],
47"arcgis-editor":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(59939),r.e(62004),r.e(5675),r.e(2993),r.e(24992),r.e(244),r.e(21036),r.e(94178),r.e(99589)]).then(r.bind(r,184634)),"activeWorkflow:,autoDestroyDisabled,headingLevel,hideCreateFeaturesSection,hideEditFeaturesSection,hideLabelsToggle,hideSnappingControlsElementsEnabledToggle,hideSnappingControlsElementsFeatureEnabledToggle,hideSnappingControlsElementsLayerList,hideSnappingControlsElementsSelfEnabledToggle,hideTooltipsToggle,icon,label,labelOptions:,layerInfos:,position,referenceElement,showSnappingControlsElementsHeader,snappingOptions:,state,supportingWidgetDefaults:,tooltipOptions:;cancelWorkflow,deleteFeatureFromWorkflow,destroy,startCreateFeaturesWorkflowAtFeatureCreation,startCreateFeaturesWorkflowAtFeatureTypeSelection,startUpdateWorkflowAtFeatureEdit,startUpdateWorkflowAtFeatureSelection,startUpdateWorkflowAtMultipleFeatureSelection"],"arcgis-elevation-profile":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(66053),r.e(59939),r.e(16594),r.e(84506),r.e(5675),r.e(93268),r.e(24762),r.e(58507)]).then(r.bind(r,813375)),"autoDestroyDisabled,effectiveUnits:,hideChart,hideClearButton,hideLegend,hideSelectButton,hideSettingsButton,hideSketchButton,hideUniformChartScalingToggle,hideUnitSelector,highlightEnabled,hoveredChartPosition,icon,input:,label,position,profiles:,progress:,referenceElement,state,uniformChartScaling,unit,unitOptions:;destroy,start,stop"],"arcgis-expand":[()=>
47Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(51475)]).then(r.bind(r,51475)),"autoCollapse,autoDestroyDisabled,closeOnEsc,collapseIcon,collapseTooltip,content,expanded,expandIcon,expandTooltip,focusTrapDisabled,focusTrapEnabled,group,icon,iconNumber,label,mode,placement,position,referenceElement;collapse,destroy,expand,toggle"],"arcgis-feature":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(51033),r.e(2993),r.e(57943),r.e(52126)]).then(r.bind(r,809129)),"autoDestroyDisabled,defaultPopupTemplateEnabled,graphic:,headingLevel,hideContentAttachments,hideContentExpression,hideContentFields,hideContentMedia,hideContentText,hideLastEditedInfo,hideLastEditInfo,hideTitle,icon,label,location:,map:,position,referenceElement,spatialReference:,state,timeZone;destroy,nextMedia,previousMedia,setActiveMedia"],"arcgis-feature-form":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(2993),r.e(24992),r.e(244),r.e(93139)]).then(r.bind(r,44234)),"autoDestroyDisabled,feature:,formTemplate:,groupDisplay,headingLevel,icon,label,layer:,position,referenceElement,state,timeZone;destroy,getValues,submit"],"arcgis-feature-table":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(47703),r.e(75377),r.e(40007),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(24992),r.e(2944)]).then(r.bind(r,951779)),"actionColumn:,actionColumnConfig:,activeFilters:,activeSortOrders:,allColumns:,allRelatedTablesVisible:,allVisibleColumns:,attachmentsColumns:,attachmentsEnabled,attachmentsViewOptions:,attributeTableTemplate:,autoDestroyDisabled,autoRefreshDisabled,columnPerformanceModeDisabled,columnReorderingDisabled,columns:,definitionExpression,description,editingEnabled,effectiveSize:,fieldColumns:,filterBySelectionEnabled,filterGeometry:,groupColumns:,hiddenFields:,hideColumnDescriptions,hideColumnMenuItemsSortAscending,hideColumnMenuItemsSortDescending,hideColumnMenus,hideHeader,hideLayerDropdownIcons,hideMenu,hideMenuItemsClearSelection,hideMenuItemsDeleteSelection,hideMenuItemsExportSelectionToCsv,hideMenuItemsRefreshData,hideMenuItemsSelectedRecordsShowAllToggle,hideMenuItemsSelectedRecordsShowSelectedToggle,hideMenuItemsToggleColumns,hideMenuItemsZoomToSelection,hideProgress,hideSelectionColumn,hideTooltips,highlightDisabled,highlightIds:,icon,initialSize,isQueryingOrSyncing:,label,layer:,layerItemId,layers:,layerUrl,layerView:,maxSize,menuConfig:,multipleSelectionDisabled,multipleSortEnabled,multipleSortPriority,navigationScale,noDataMessage,objectIds:,outFields:,pageCount:,pageIndex,pageSize,paginationEnabled,position,referenceElement,relatedRecordsEnabled,relatedTable:,relatedTables:,relationshipColumns:,returnGeometryEnabled,returnMEnabled,returnZEnabled,rowHighlightIds:,showLayerDropdown,size:,state,supportsAddAttachments:,supportsAttachments:,supportsDeleteAttachments:,supportsResizeAttachments:,supportsUpdateAttachments:,syncTemplateOnChangesDisabled,tableController:,tableDisabled,tableParent:,tableTemplate:,timeExtent:,timeZone,visibleColumns:;deleteSelection,destroy,exportSelectionToCSV,findColumn,goToPage,hideColumn,nextPage,previousPage,refresh,scrollToBottom,scrollToIndex,scrollToLeft,scrollToRow,scrollToTop,showAllColumns,showColumn,sortColumn,zoomToSelection"],"arcgis-feature-templates":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(47703),r.e(75377),r.e(53790),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(32337),r.e(62004),r.e(94178),r.e(18002)]).then(r.bind(r,573125)),"autoDestroyDisabled,enableListScroll,filterFunction:,filterText,groupBy,headingLevel,hideFilter,icon,label,layers:,position,referenceElement,selectionMode,state;destroy"],"arcgis-features":[()=>
47Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(62004),r.e(51033),r.e(2993),r.e(57943),r.e(85662),r.e(86388)]).then(r.bind(r,476596)),"actions:,active,autoDestroyDisabled,closed,collapsed,content,featureNavigationTop,features:,featuresPerPage,featuresTitle,featureViewModelAbilities:,goToOverride:,headerActions:,headingLevel,hideActionBar,hideCloseButton,hideFeatureMenuHeading,hideFeatureNavigation,hideFlow,hideHeading,hideSpinner,icon,includeDefaultActions,initialDisplayMode,label,map:,position,promises:,referenceElement,selectedFeature:,selectedFeatureIndex,showCollapseButton,spatialReference:,state,timeZone;clear,close,destroy,fetchFeatures,next,open,previous,triggerAction"],"arcgis-floor-filter":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(48101)]).then(r.bind(r,348101)),"autoDestroyDisabled,facility,headingLevel,icon,label,level,longNames,position,referenceElement,site;destroy,updateWebDocument"],"arcgis-fullscreen":[()=>Promise.all([r.e(23516),r.e(58060)]).then(r.bind(r,929370)),"element,label,messageOverrides:,position,referenceElement,state"],"arcgis-grid-controls":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(32822),r.e(24637),r.e(55620),r.e(24754),r.e(38850),r.e(78525),r.e(23516),r.e(5718),r.e(66053),r.e(82110),r.e(59939),r.e(16594),r.e(40844),r.e(74564),r.e(26781),r.e(5941),r.e(56789),r.e(29403),r.e(28207)]).then(r.bind(r,505952)),"autoDestroyDisabled,customColor,displayEnabled:,dynamicScaling,effectiveSpacingAfterDynamicScaling,gridColor,gridControlsEnabled:,gridOutOfScale,hideColorSelection,hideDynamicScaleToggle,hideGridEnabledToggle,hideGridSnapEnabledToggle,hideLineIntervalInput,hideNumericInputs,hideOutOfScaleWarning,hidePlacementButtons,hideRotateWithMapToggle,icon,interactivePlacementState,label,majorLineInterval,messageOverrides:,placementDisabled,position,referenceElement,rotateWithMap,rotation,snappingEnabled,snappingOptions:,spacing,theme,unit;destroy;trySetDisplayEnabled"],"arcgis-histogram-range-slider":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(51033),r.e(45951),r.e(23346),r.e(79600)]).then(r.bind(r,979600)),"autoDestroyDisabled,average,barCreatedFunction:,bins:,dataLineCreatedFunction:,dataLines:,excludedBarColor,icon,includedBarColor,label,labelFormatFunction:,max,min,position,precision,rangeType,referenceElement,standardDeviation,standardDeviationCount,state,values:;destroy,generateWhereClause"],"arcgis-home":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(40285),r.e(77319),r.e(23516),r.e(5718),r.e(68893)]).then(r.bind(r,968893)),"autoDestroyDisabled,goToOverride:,icon,label,messageOverrides:,position,referenceElement,state,viewpoint:;cancelGo,destroy,go"],"arcgis-layer-list":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(27587),r.e(42655)]).then(r.bind(r,117789)),"autoDestroyDisabled,catalogLayerList:,catalogOptions:,closed,collapsed,dragEnabled,filterPlaceholder,filterPredicate:,filterText,headingLevel,hideCatalogLayerList,hideFlow,hideStatusIndicators,icon,knowledgeGraphOptions:,label,listItemCreatedFunction:,minDragEnabledItems,minFilterItems,openedLayers:,operationalItems:,position,referenceElement,selectedItems:,selectionMode,showCloseButton,showCollapseButton,showErrors,showFilter,showHeading,showTemporaryLayerIndicators,state,tableList:,visibilityAppearance;destroy,triggerAction"],"arcgis-layer-list-item":[()=>r.e(78227).then(r.bind(r,278227)),"activeItem:,autoDestroyDisabled,canMove:,css:,displayMode,dragEnabled,handleAction:,handleCatalogOpen:,handlePanelOpen:,handleSelectedDragItemLayerUidC
47hange:,handleTablesOpen:,handleTooltipReferenceChange:,hideCatalogLayerList,hideFlow,hideStatusIndicators,item:,layerTablesEnabled:,listModeDisabled,parent:,parentTitles:,rootGroupUid,selectedDragItemLayerUid,selectedItems:,selectionMode,showCloseButton,showCollapseButton,showErrors,showFilter,showHeading,showTemporaryLayerIndicators,showTemporaryTableIndicators,visibilityAppearance;destroy"],"arcgis-legend":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(34478),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(38634),r.e(17665),r.e(62004),r.e(51033),r.e(45951),r.e(97140),r.e(59651),r.e(35743)]).then(r.bind(r,777554)),"activeLayerInfos:,autoDestroyDisabled,basemapLegendVisible,headingLevel,hideLayersNotInCurrentView,icon,label,layerInfos:,legendStyle,position,referenceElement,respectLayerDefinitionExpression,respectLayerVisibilityDisabled,state;destroy"],"arcgis-line-of-sight":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(40285),r.e(77319),r.e(23516),r.e(5718),r.e(93268),r.e(24510),r.e(26144),r.e(96153)]).then(r.bind(r,976882)),"analysis:,autoDestroyDisabled,icon,label,messageOverrides:,position,referenceElement,state;clear,continue,destroy,start,stop"],"arcgis-link-chart":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(22513),r.e(53790),r.e(38850),r.e(78525),r.e(66053),r.e(82110),r.e(59939),r.e(16594),r.e(42809),r.e(62004),r.e(37318),r.e(2145),r.e(81537),r.e(43523),r.e(40844),r.e(37119),r.e(99193),r.e(49245),r.e(49394),r.e(17628),r.e(43599),r.e(14818),r.e(44454)]).then(r.bind(r,105543)),"allLayerViews:,autoDestroyDisabled,background:,basemap,basemapView:,center,constraints:,displayFilterDisabled,extent:,fatalError:,focusAreas:,graphics:,highlights:,interacting:,itemId,layerViews:,magnifier:,map:,navigating:,navigation:,padding:,popup:,popupDisabled,ready:,resizeAlign,resolution:,rotation,scale,spatialReference:,stationary:,suspended,theme:,timeExtent:,timeZone,updating:,view:,viewpoint:,zoom;addLayer,addLayers,closePopup,destroy,goTo,openPopup,tryFatalErrorRecovery,viewOnReady,whenLayerView;toMap,toScreen"],"arcgis-link-chart-layout-switcher":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(37119),r.e(49394),r.e(17628),r.e(33908)]).then(r.bind(r,906447)),"appearance,autoDestroyDisabled,closeOnSelectDisabled,icon,label,layout:,messageOverrides:,position,preventExtentUpdate,referenceElement,state;destroy,switchLayout"],"arcgis-locate":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(29795),r.e(28467)]).then(r.bind(r,811612)),"autoDestroyDisabled,geolocationOptions:,goToLocationDisabled,goToOverride:,graphic:,icon,label,messageOverrides:,popupDisabled,position,referenceElement,scale,state;cancelLocate,destroy,locate"],"arcgis-map":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(16594),r.e(2145),r.e(81537),r.e(43523),r.e(99193),r.e(49245),r.e(70502),r.e(43599),r.e(8531),r.e(82560)]).then(r.bind(r,356127)),"allLayerViews:,autoDestroyDisabled,background:,basemap,basemapView:,center,constraints:,displayFilterDisabled,extent:,fatalError:,floors:,focusAreas:,gamepad:,graphics:,ground,highlightOptions:,highlights:,interacting:,ipsInfo:,itemId,layerViews:,magnifier:,map:,navigating:,navigation:,padding:,popup:,popupDisabled,ready:,resizeAlign,resolution:,rotation,scale,spatialReference:,stationary:,suspended,theme:,timeExtent:,timeZone,updating:,view:,viewpoint:,visibleArea:,zoom;addLayer,addLayers,addTable,addTables,closePopup,destroy,goTo,hitTest,openPopup,takeScreenshot,tryFatalErrorRecovery,viewOnReady,whenLayerView;toMap,toScreen"],"arcgis-measurement":[()=>
47Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(2371),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(39103)]).then(r.bind(r,838245)),"activeTool,activeWidget:,areaUnit,autoDestroyDisabled,icon,label,linearUnit,position,referenceElement,state;clear,destroy,startMeasurement"],"arcgis-navigation-toggle":[()=>Promise.all([r.e(23516),r.e(55886)]).then(r.bind(r,808325)),"icon,label,layout,messageOverrides:,navigationMode,position,referenceElement,state;toggle"],"arcgis-oriented-imagery-viewer":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(32822),r.e(24637),r.e(55620),r.e(24754),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(38850),r.e(78525),r.e(65400),r.e(59939),r.e(13724),r.e(2145),r.e(81537),r.e(37853),r.e(43523),r.e(5675),r.e(93268),r.e(21422),r.e(23884),r.e(76702),r.e(99193),r.e(477),r.e(24598),r.e(26639),r.e(96481),r.e(49487),r.e(2141),r.e(48994),r.e(85057),r.e(82195),r.e(13335),r.e(44278),r.e(86411),r.e(8368)]).then(r.bind(r,647543)),"autoDestroyDisabled,currentCoverageVisible,dataCaptureEnabled,disabled,galleryOpened,icon,imageEnhancementToolActive,imageGalleryEnabled:,imageOverlaysOpened,isAdditionalCoverageVisible,isAdditionalPointSourcesVisible,label,layer:,mapImageConversionToolState,navigationToolActive,orientedImageryLayerItemId,position,referenceElement,referencePoint:;destroy"],"arcgis-placement":[()=>r.e(48281).then(r.bind(r,348281)),"position,referenceElement"],"arcgis-print":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(53790),r.e(23516),r.e(5718),r.e(16594),r.e(37119),r.e(13759)]).then(r.bind(r,674804)),"allowedF
47ormats,allowedFormatsForSaving,allowedLayouts,autoDestroyDisabled,browseTemplateButtonOnClick:,excludeDefaultTemplates,excludeOrganizationTemplates,exportedLinks:,extraParameters,headingLevel,hideHeader,icon,label,messageOverrides:,outSpatialReference:,portal:,position,printServiceUrl,referenceElement,saveAsButtonCallback:,showPrintAreaEnabled,state,templateCustomTextElements:,templateOptions:;destroy"],"arcgis-print-custom-text-elements":[()=>r.e(27689).then(r.bind(r,127689)),"viewModel:"],"arcgis-print-dpi-input":[()=>r.e(56472).then(r.bind(r,156472)),"messages:,viewModel:"],"arcgis-print-export-button":[()=>r.e(87326).then(r.bind(r,587326)),"fileName,messages:,selectExportsTab:,viewModel:"],"arcgis-print-exported-link":[()=>r.e(92916).then(r.bind(r,492916)),"allowedFormatsForSaving,exportedLink:,messages:,saveAsButtonCallback:,viewModel:"],"arcgis-print-exports-panel":[()=>r.e(79446).then(r.bind(r,379446)),"allowedFormatsForSaving,messages:,saveAsButtonCallback:,viewModel:"],"arcgis-print-format-select":[()=>Promise.all([r.e(97053),r.e(36399),r.e(81676),r.e(24535)]).then(r.bind(r,424535)),"messages:,viewModel:"],"arcgis-print-layout-advanced-options":[()=>Promise.all([r.e(58446),r.e(2570)]).then(r.bind(r,702570)),"messages:,viewModel:"],"arcgis-print-layout-panel":[()=>Promise.all([r.e(58446),r.e(2259)]).then(r.bind(r,102259)),"messages:,selectExportsTab:,showTemplateSelector:,viewModel:"],"arcgis-print-main-panel":[()=>Promise.all([r.e(97053),r.e(36399),r.e(58446),r.e(81676),r.e(66952)]).then(r.bind(r,66952)),"allowedF
47ormatsForSaving,messages:,saveAsButtonCallback:,showTemplateSelector:,viewModel:"],"arcgis-print-map-only-advanced-options":[()=>r.e(41143).then(r.bind(r,941143)),"messages:,viewModel:"],"arcgis-print-map-only-panel":[()=>r.e(73741).then(r.bind(r,473741)),"messages:,selectExportsTab:,viewModel:"],"arcgis-print-out-spatial-reference-input":[()=>Promise.all([r.e(97053),r.e(67529),r.e(40285),r.e(83456)]).then(r.bind(r,926250)),"messages:,templateOptions:,viewModel:"],"arcgis-print-preview-input":[()=>r.e(90764).then(r.bind(r,690764)),"messages:,viewModel:"],"arcgis-print-scale-section":[()=>r.e(63716).then(r.bind(r,363716)),"messages:,viewModel:"],"arcgis-print-template-select":[()=>Promise.all([r.e(97053),r.e(36399),r.e(58446),r.e(81676),r.e(32342)]).then(r.bind(r,132342)),"messages:,showTemplateSelector:,viewModel:"],"arcgis-print-template-selector":[()=>Promise.all([r.e(97053),r.e(36399),r.e(58446),r.e(81676),r.e(97838)]).then(r.bind(r,497838)),"browseTemplateButtonOnClick:,excludeOrganizationTemplates,hideTemplateSelector:,messages:,viewModel:"],"arcgis-scale-bar":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(65844)]).then(r.bind(r,227808)),"autoDestroyDisabled,barStyle,icon,label,messageOverrides:,position,referenceElement,unit;destroy"],"arcgis-scale-range-slider":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(29367)]).then(r.bind(r,829367)),"autoDestroyDisabled,disabled,hidePreview,hideScaleMenusMaxScaleMenu,hideScaleMenusMinScaleMenu,icon,label,layer:,maxScale,maxScaleLimit,minScale,minScaleLimit,mode,position,referenceElement,region:,state;destroy"],"arcgis-scene":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(81371),r.e(47703),r.e(22513),r.e(53790),r.e(38850),r.e(78525),r.e(65400),r.e(66053),r.e(16594),r.e(263),r.e(70907),r.e(42809),r.e(84506),r.e(37318),r.e(2145),r.e(81537),r.e(37853),r.e(43523),r.e(93268),r.e(21422),r.e(23884),r.e(76702),r.e(49245),r.e(26639),r.e(49487),r.e(48994),r.e(5579),r.e(63838)]).then(r.bind(r,837349)),"allLayerViews:,alphaCompositingEnabled,analyses:,autoDestroyDisabled,basemap,basemapView:,camera:,cameraFov,cameraHeading,cameraPosition,cameraTilt,center,clippingArea:,constraints:,displayFilterDisabled,environment:,extent:,fatalError:,floors:,focusAreas:,gamepad:,graphics:,ground,groundView:,highlightOptions:,highlights:,interacting:,itemId,layerViews:,magnifier:,map:,navigating:,navigation:,padding:,performanceInfo:,popup:,popupDisabled,qualityProfile,ready:,resolution:,scale,spatialReference:,stationary:,suspended,theme:,timeExtent:,updating:,view:,viewingMode,viewpoint:,visibleArea:,zoom;addLayer,addLayers,addTable,addTables,closePopup,destroy,goTo,hitTest,openPopup,takeScreenshot,tryFatalErrorRecovery,viewOnReady,whenAnalysisView,whenLayerView;toMap,toScreen"],"arcgis-search":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(74040),r.e(85844),r.e(98350)]).then(r.bind(r,54782)),"activeMenu,activeSource:,activeSourceIndex,allPlaceholder,allSources:,autoDestroyDisabled,autoNavigateDisabled,autoSelectDisabled,defaultSources:,disabled,goToOverride:,icon,includeDefaultSourcesDisabled,label,locationDisabled,maxResults,maxSuggestions,messageOverrides:,minSuggestCharacters,popupDisabled,popupTemplate:,portal:,position,referenceElement,resultGraphic:,resultGraphicDisabled,results:,searchAllDisabled,searchTerm,selectedResult:,sources:,state,suggestions:,suggestionsDisabled;destroy,search,setFocus,suggest;clear"],"arcgis-search-result-renderer":[()=>Promise.all([r.e(97053),r.e(36399),r.e(43727)]).then(r.bind(r,38658)),"autoDestroyDisabled,messages:,viewModel:;destroy"],"arcgis-shadow-cast":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(77372),r.e(24762),r.e(41268)]).then(r.bind(r,641268)),"autoDestroyDisabled,date,discreteOptions:,durationOptions:,endTimeOfDay,headingLevel,hideColorPicker,hideDatePicker,hideThresholdContext,hideThresholdContextColor,hideThresholdContextTimeInterval,hideThresholdContextToggle,hideTimeRangeSlider,hideTimezone,hideTooltip,hideVisualizationOptions,icon,label,position,referenceElement,startTimeOfDay,state,thresholdOptions:,utcOffset,visualizationType;destroy,getDuration,start,stop"],"arcgis-sketch":[()=>
47Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(47703),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(66053),r.e(59939),r.e(16594),r.e(5675),r.e(21036),r.e(11366),r.e(38783)]).then(r.bind(r,882312)),"activeTool,autoDestroyDisabled,availableCreateTools:,createGraphic:,creationMode,defaultCreateOptions:,defaultGraphicsLayerDisabled,defaultUpdateOptions:,hideCreateToolsCircle,hideCreateToolsPoint,hideCreateToolsPolygon,hideCreateToolsPolyline,hideCreateToolsRectangle,hideDeleteButton,hideDuplicateButton,hideLabelsToggle,hideSelectionCountLabel,hideSelectionToolsLassoSelection,hideSelectionToolsRectangleSelection,hideSettingsMenu,hideSnappingControls,hideSnappingControlsElementsEnabledToggle,hideSnappingControlsElementsFeatureEnabledToggle,hideSnappingControlsElementsLayerList,hideSnappingControlsElementsSelfEnabledToggle,hideTooltipsToggle,hideUndoRedoMenu,icon,label,labelOptions:,layer:,layout,pointSymbol:,polygonSymbol:,polylineSymbol:,position,referenceElement,scale,showSnappingControlsElementsHeader,snappingOptions:,state,toolbarKind,tooltipOptions:,updateGraphics:;cancel,complete,create,delete,destroy,duplicate,redo,triggerUpdate,undo"],"arcgis-slice":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(40285),r.e(77319),r.e(23516),r.e(5718),r.e(24510),r.e(91545)]).then(r.bind(r,945357)),"analysis:,autoDestroyDisabled,excludedLayers:,excludeGroundSurface,headingLevel,icon,label,messageOverrides:,position,referenceElement,shape:,state,tiltEnabled;clear,destroy,start"],"arcgis-slider":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(1468)]).then(r.bind(r,801468)),"autoDestroyDisabled,draggableSegmentsEnabled,effectiveMax,effectiveMin,effectiveSegmentElements:,icon,label,labelElements:,labelInputsEnabled,labels:,layout,max,maxLabelElement:,min,minLabelElement:,position,precision,rangeLabelInputsEnabled,referenceElement,segmentElements:,snapOnClickEnabled,state,steps,syncedSegmentsEnabled,thumbElements:,thumbsConstrained,tickConfigs:,tickElements:,trackElement:,values;destroy"],"arcgis-labeled-switch":[()=>r.e(52617).then(r.bind(r,752617)),"checked,disabled,hint,hintIcon,hintKind,label;destroy"],"arcgis-measurement-content":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(60222)]).then(r.bind(r,519619)),"hintLabel,items:,state,unsupportedLabel"],"arcgis-swipe":[()=>Promise.all([r.e(67529),r.e(23516),r.e(5718),r.e(29795),r.e(5310)]).then(r.bind(r,233728)),"autoDestroyDisabled,direction,disabled,hideDivider,hideHandle,icon,label,leadingLayers:,messageOverrides:,position,referenceElement,state,swipePosition,trailingLayers:;destroy"],"arcgis-table-list":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(29399),r.e(69918)]).then(r.bind(r,221188)),"autoDestroyDisabled,closed,collapsed,dragEnabled,filterPlaceholder,filterPredicate:,filterText,hideFlow,hideStatusIndicators,icon,label,listItemCreatedFunction:,minDragEnabledItems,minFilterItems,position,referenceElement,selectedItems:,selectionMode,showCloseButton,showCollapseButton,showErrors,showFilter,showHeading,showTemporaryTableIndicators,state,tableItems:;destroy"],"arcgis-time-slider":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(90073),r.e(37521)]).then(r.bind(r,737521)),"actions:,autoDestroyDisabled,disabled,effectiveStops:,fullTimeExtent:,icon,label,layout,loop,mode,playRate,position,referenceElement,state,stops:,tickConfigs:,timeExtent:,timeVisible,timeZone;applyTimeSliderSettings,destroy,next,play,previous,stop,updateWebDocument"],"arcgis-time-zone-label":[()=>Promise.all([r.e(23516),r.e(54105)]).then(r.bind(r,232695)),"disabled,expandDirection,expanded,label,messageOverrides:,position,referenceElement,state"],"arcgis-track":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(74040),r.e(89743),r.e(93808)]).then(r.bind(r,993808)),"autoDestroyDisabled,error,geolocationOptions,goToLocationDisabled,goToOverride:,graphic:,icon,label,messageOverrides:,position,positionFilterFunction:,referenceElement,rotationDisabled,scale,state,tracking:;destroy,start,stop"],"arcgis-unit-select":[()=>r.e(6175).then(r.bind(r,6175)),"label,messageOverrides:,options:,selectLabel,value:;destroy"],"arcgis-utility-network-associations":[()=>
47Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(73249)]).then(r.bind(r,707457)),"autoDestroyDisabled,autoRefreshAssociationsDisabled,connectivityAssociationsLineSymbol:,hideConnectivityAssociationsSettingsColorPicker,hideConnectivityAssociationsSettingsStylePicker,hideConnectivityAssociationsSettingsWidthInput,hideStructuralAttachmentAssociationsSettingsColorPicker,hideStructuralAttachmentAssociationsSettingsStylePicker,hideStructuralAttachmentAssociationsSettingsWidthInput,icon,includeConnectivityAssociationsDisabled,includeStructuralAttachmentAssociationsDisabled,label,maxAllowableAssociations,maxAllowableAssociationsSliderMax,maxAllowableAssociationsSliderMin,maxAllowableAssociationsSliderStep,position,referenceElement,showArrowsConnectivity,showArrowsStructuralAttachment,showAssociationsEnabled,showConnectivityAssociationsSettingsArrowsToggle,showConnectivityAssociationsSettingsCapSelect,showMaxAllowableAssociationsSlider,showStructuralAttachmentAssociationsSettingsArrowsToggle,showStructuralAttachmentAssociationsSettingsCapSelect,structuralAttachmentAssociationsLineSymbol
47:,utilityNetwork:,visibleElementsConnectivityAssociationsSettingsArrowsToggle,visibleElementsConnectivityAssociationsSettingsCapSelect,visibleElementsConnectivityAssociationsSettingsColorPicker,visibleElementsConnectivityAssociationsSettingsStylePicker,visibleElementsConnectivityAssociationsSettingsWidthInput,visibleElementsMaxAllowableAssociationsSlider,visibleElementsStructuralAttachmentAssociationsSettingsArrowsToggle,visibleElementsStructuralAttachmentAssociationsSettingsCapSelect,visibleElementsStructuralAttachmentAssociationsSettingsColorPicker,visibleElementsStructuralAttachmentAssociationsSettingsStylePicker,visibleElementsStructuralAttachmentAssociationsSettingsWidthInput;destroy"],"arcgis-utility-network-trace":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(81371),r.e(42607),r.e(47703),r.e(34478),r.e(75377),r.e(22513),r.e(53790),r.e(69750),r.e(58197),r.e(40007),r.e(21116),r.e(36414),r.e(38850),r.e(78525),r.e(23516),r.e(59939),r.e(13724),r.e(62004),r.e(51033),r.e(5675),r.e(2993),r.e(57943),r.e(70502),r.e(74827)]).then(r.bind(r,856662)),"autoDestroyDisabled,defaultGraphicColor:,disabled,enableResultArea,flags:,gdbVersion,icon,inputSettings:,label,position,referenceElement,resultAreaProperties:,selectedTraces:,selectOnCompleteDisabled,showGraphicsOnCompleteDisabled,showSelectionAttributesDisabled,state;checkCanTrace,confirmReset,destroy"],"arcgis-utility-network-validate-topology":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(2371),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(42615)]).then(r.bind(r,651768)),"autoDestroyDisabled,extentToValidate,icon,label,position,referenceElement,state,utilityNetwork:;destroy"],"arcgis-value-picker":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(38850),r.e(78525),r.e(23516),r.e(37889),r.e(67810),r.e(92898)]).then(r.bind(r,692898)),"autoDestroyDisabled,canNext,canPlay,canPrevious,caption,component:,hideNextButton,hidePlayButton,hidePreviousButton,icon,label,layout,loop,playRate,position,referenceElement,values:;destroy,next,pause,play,previous"],"arcgis-version-management":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(40285),r.e(79088),r.e(93323),r.e(77319),r.e(2371),r.e(27910),r.e(23119),r.e(26462),r.e(47703),r.e(75377),r.e(53790),r.e(23516),r.e(5718),r.e(32337),r.e(92951)]).then(r.bind(r,369259)),"allowEditingDisabled,autoDestroyDisabled,closable,icon,initialVersionInfos:,label,messageOverrides:,mode,pageSize,position,referenceElement,state,versioningStates:;destroy"],"arcgis-version-management-service-item":[()=>r.e(31041).then(r.bind(r,931041)),"serviceItemElementProps:"],"arcgis-version-management-version-item":[()=>r.e(29275).then(r.bind(r,329275)),"versionItemElementProps:"],"arcgis-version-management-version-list":[()=>r.e(32904).then(r.bind(r,432904)),"currentPage,selected,showBackButton,versionListElementProps:"],"arcgis-version-management-version-properties":[()=>r.e(62088).then(r.bind(r,62088)),"selected,showBackButton,versionPropertiesElementProps:"],"arcgis-video":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(8261),r.e(73096),r.e(40285),r.e(77319),r.e(81371),r.e(47703),r.e(38850),r.e(78525),r.e(65400),r.e(38634),r.e(6238),r.e(17665),r.e(38444),r.e(28963),r.e(9624),r.e(99696),r.e(66975),r.e(23368),r.e(16594),r.e(263),r.e(83417),r.e(32897),r.e(37318),r.e(2145),r.e(81537),r.e(99193),r.e(99700),r.e(48966),r.e(27345)]).then(r.bind(r,644227)),"autoDestroyDisabled,layer:,map:,ready:,view:;destroy"],"arcgis-video-player":[()=>Promise.all([r.e(23104),r.e(97053),r.e(67529),r.e(36399),r.e(73096),r.e(40285),r.e(79088),r.e(77319),r.e(2371),r.e(23516),r.e(5718),r.e(78448),r.e(39634)]).then(r.bind(r,429331)),"autoDestroyDisabled,followingMode,hideHeader,icon,label,layer:,messageOverrides:,position,referenceElement,state;destroy"],"arcgis-video-player-action-bar":[()=>Promise.all([r.e(97053),r.e(36399),r.e(70198)]).then(r.bind(r,718399)),"currentTime,duration,messages:,toggleMetadata:,viewModel:"],"arcgis-video-player-actions-group":[()=>r.e(84505).then(r.bind(r,484505)),"messages:,viewModel:"],"arcgis-video-player-control
47s-group":[()=>r.e(93205).then(r.bind(r,693205)),"messages:,toggleMetadata:,viewModel:"],"arcgis-video-player-metadata":[()=>r.e(81626).then(r.bind(r,81626)),"messages:,viewModel:"],"arcgis-video-player-settings":[()=>r.e(71488).then(r.bind(r,171488)),"messages:,viewModel:"],"arcgis-video-player-slider":[()=>r.e(22111).then(r.bind(r,722111)),"buffered,value,viewModel:"],"arcgis-weather":[()=>Promise.all([r.e(67529),r.e(23516),r.e(5718),r.e(76253)]).then(r.bind(r,76253)),"autoDestroyDisabled,headingLevel,hideHeader,icon,label,messageOverrides:,position,referenceElement,state;destroy"],"arcgis-zoom":[()=>Promise.all([r.e(23516),r.e(52484)]).then(r.bind(r,601805)),"autoDestroyDisabled,icon,label,layout,messageOverrides:,position,referenceElement,state;destroy,zoomIn,zoomOut"]})},958328:(e,t,r)=>{"use strict";r.d(t,{_Q:()=>i,Jj:()=>s,uR:()=>a,Wz:()=>p,Hs:()=>c,ko:()=>h,pW:()=>d,QH:()=>m,iD:()=>f});var n=r(348753);function i(e,t){const r=`${(0,n.bw)(e).replace("/rest/services","/rest/admin/services")}/addToDefinition`;return t.params=Object.assign({addToDefinition:{}},t.params),t.layers&&t.layers.length>0&&(t.params.addToDefinition.layers=t.layers),t.tables&&t.tables.length>0&&(t.params.addToDefinition.tables=t.tables),(0,n.WY)(r,t)}function s(e){const t=`${(0,n.bw)(e.url)}/applyEdits`,r=(0,n.tH)(e,["adds","updates","deletes","useGlobalIds","attachments","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},e.params)});return(0,n.WY)(t,r)}var o=r(170209);function a(e){return(0,o.ND)(e).then((t=>{const r=Object.assign(Object.assign({},e),{rawResponse:!1}),i=`${(0,o.al)(e)}/content/users/${t}${r.folderId&&"/"!==r.folderId?"/"+r.folderId:""}/createService`;return r.params=Object.assign({createParameters:r.item,outputType:"featureService"},r.params),(0,n.WY)(i,r)}))}function c(e){return(0,n.WY)((0,n.bw)(e.url),e)}var u=r(732247);const l=new RegExp(/.+(?:map|feature|image)server/i);function d(e){const t=e.match(l);return t?t[0]:function(e){const t=e.split("?")[0];return(0,n.bw)(t)}(e)}function p(e){const{url:t}=e,r=(0,u.__rest)(e,["url"]),i=`${d(t)}/layers`;return(0,n.WY)(i,r)}function h(e){return(0,n.WY)((0,n.bw)(e.url),e)}function m(e){const t=(0,n.tH)(e,["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:Object.assign({where:"1=1",outFields:"*"},e.params)});return(0,n.WY)(`${(0,n.bw)(e.url)}/query`,t)}function f(e,t){const r=`${(0,n.bw)(e).replace("/rest/services","/rest/admin/services")}/updateDefinition`;return t.params=Object.assign({updateDefinition:{}},t.params),t.updateDefinition&&(t.params.updateDefinition=t.updateDefinition),(0,n.WY)(r,t)}},398080:(e,t,r)=>{"use strict";function n(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}r.r(t),r.d(t,{getFetch:()=>n})},543598:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Blob:()=>s,File:()=>i,FormData:()=>n});const n=globalThis.FormData,i=globalThis.File,s=globalThis.Blob},170209:(e,t,r)=>{"use strict";r.d(t,{qp:()=>$,i1:()=>q,cN:()=>L,bV:()=>d,zJ:()=>p,it:()=>B,wd:()=>H,L6:()=>h,sS:()=>Q,fC:()=>f,Ae:()=>m,Dh:()=>ae,ND:()=>s,ex:()=>P,Ye:()=>k,rm:()=>x,rV:()=>y,m_:()=>v,tX:()=>T,Tn:()=>C,ff:()=>A,AA:()=>E,C:()=>S,sy:()=>I,_0:()=>Se,HZ:()=>Ee,al:()=>i,oO:()=>w,AW:()=>we,PR:()=>ue,Xg:()=>le,ee:()=>Y,be:()=>se,Ln:()=>oe,uo:()=>l,Et:()=>Z,Q4:()=>_,Ih:()=>j,BN:()=>ee,By:()=>z,cl:()=>M,ug:()=>N,p3:()=>pe,Nt:()=>re,zv:()=>R,td:()=>te,KT:()=>G,pz:()=>de,zT:()=>he,Ju:()=>ge,R9:()=>X,ll:()=>D,lF:()=>ve,mD:()=>ne,$G:()=>c,zy:()=>u,SJ:()=>ie});var n=r(348753);function i(e={}){return e.portal?(0,n.bw)(e.portal):e.authentication&&"string"!=typeof e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function s(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 o(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])}function a(e){return e.join(",")}function c(e){return s(e).then((t=>{const r=e.folderId?`${i(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${i(e)}/content/users/${t}/items/${e.item.id}/update`;return e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&o(e.params.extent)&&(e.params.extent=a(e.params.extent)),(0,n.WY)(r,e)}))}function u(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/updateResources`;return e.params=Object.assign({file:e.resource,fileName:e.name,resourcesPrefix:e.prefix,text:e.content},e.params),void 0!==e.private&&(e.params.access=e.private?"private":"inherit"),(0,n.WY)(r,e)}))}function l(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.itemId}/move`;let s=e.folderId;return s||(s="/"),e.params=Object.assign({folder:s},e.params),(0,n.WY)(r,e)}))}function d(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/addRelationship`,s=(0,n.tH)(e,["originItemId","destinationItemId","relationshipType"],{params:Object.assign({},e.params)});return(0,n.WY)(r,s)}))}function p(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/addResources`;return e.params=Object.assign({file:e.resource,fileName:e.name,resourcesPrefix:e.prefix,text:e.content,access:e.private?"private":"inherit"},e.params),(0,n.WY)(r,e)}))}function h(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/createFolder`;return e.params=Object.assign({title:e.title},e.params),(0,n.WY)(r,e)}))}function m(e){return e.multipart&&!e.filename?Promise.reject(new Error("The filename is required for a multipart request.")):s(e).then((t=>{const r=`${i(e)}/content/users/${t}`;let s=`${r}/addItem`;e.folderId&&(s=`${r}/${e.folderId}/addItem`),e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&o(e.params.extent)&&(e.params.extent=a(e.params.extent));const c=(0,n.tH)(e,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:Object.assign({},e.params)});return(0,n.WY)(s,c)}
47))}function f(e){return m(Object.assign({folderId:null},e))}const g=/[\x00-\x1F\x7F-\x9F\xA0]/g;function y(e,t){const r=b(e,t),i=Object.assign({httpMethod:"GET"},t);return(0,n.WY)(r,i)}const b=(e,t)=>`${"string"==typeof t?t:i(t)}/content/items/${e}`;function v(e,t){const r=`${b(e,t)}/data`,i=Object.assign({httpMethod:"GET",params:{}},t);return i.file&&(i.params.f=null),(0,n.WY)(r,i).catch((e=>{if(!RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i).test(e.message))throw e}))}function w(e){const t=`${b(e.id,e)}/relatedItems`,r=Object.assign({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,(0,n.WY)(t,r)}function S(e,t){const r=`${b(e,t)}/resources`,i=Object.assign({},t);return i.params=Object.assign({num:1e3},i.params),(0,n.WY)(r,i)}function E(e,t){const r=t.readAs||"blob";return O(e,`/resources/${t.fileName}`,r,t)}function T(e,t){const r=`${b(e,t)}/groups`;return(0,n.WY)(r,t)}function I(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/status`,s=(0,n.tH)(e,["jobId","jobType"],{params:Object.assign({},e.params)});return(0,n.WY)(r,s)}))}function C(e,t){const{fileName:r="iteminfo.xml",readAs:n="text"}=t||{};return O(e,`/info/${r}`,n,Object.assign({httpMethod:"GET"},t))}function A(e,t){return C(e,Object.assign(Object.assign({},t),{fileName:"metadata/metadata.xml"}))}function O(e,t,r,i){const s=`${b(e,i)}${t}`,o=Object.assign({params:{}},i),a=o.rawResponse;return o.rawResponse=!0,o.params.f=null,(0,n.WY)(s,o).then((e=>a?e:"json"!==r?e[r]():e.text().then((e=>JSON.parse(e.replace(g,""))))))}function _(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/protect`;return(0,n.WY)(r,e)}))}function D(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/unprotect`;return(0,n.WY)(r,e)}))}function P(e,t){const r=`${i(t)}/community/groups/${e}`,s=Object.assign({httpMethod:"GET"},t);return(0,n.WY)(r,s)}function k(e,t){const r=`${i(t)}/content/groups/${e}`,s=Object.assign(Object.assign({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(s.params=Object.assign({},t.paging)),(0,n.WY)(r,s)}function x(e,t){const r=`${i(t)}/community/groups/${e}/users`,s=Object.assign({httpMethod:"GET"},t);return(0,n.WY)(r,s)}function R(e,t){const r=`${i(t)}/community/groups/${e}/userlist`,s=(0,n.tH)(t||{},["name","num","start","sortField","sortOrder","joined","memberType"],{httpMethod:"GET"});return(0,n.WY)(r,s)}function U(e){return P(e.groupId,e).then((e=>e.userMembership.memberType)).catch((()=>"none"))}function M(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/delete`;return(0,n.WY)(r,e)}))}function N(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/removeResources`;return e.params=Object.assign(Object.assign({},e.params),{resource:e.resource}),void 0!==e.deleteAll&&(e.params.deleteAll=e.deleteAll),(0,n.WY)(r,e)}))}function j(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${encodeURIComponent(t)}/${e.folderId}/delete`;return(0,n.WY)(r,e)}))}class ${constructor(e=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}match(...e){return this.termStack=this.termStack.concat(e),this}in(e){const t=`\`in(${e?`"${e}"`:""})\``;return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=`${e}:`),this.commit()):((0,n.ZK)(`${t} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this)}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?((0,n.ZK)("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(e){return this.hasTerms?((0,n.ZK)('`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):(this.rangeStack[0]=e,this)}to(e){return this.hasTerms?((0,n.ZK)('`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):(this.rangeStack[1]=e,this)}boost(e){return this.commit(),this.q+=`^${e}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new $(this.q+"")}addModifier(e){return this.currentModifer?((0,n.ZK)(`You have called \`${this.currentModifer}()\` after \`${e}()\`. Your current query was not modified.`),this):(this.commit(),""===this.q&&"not"!==e?((0,n.ZK)(`You have called \`${e}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=`${e.toUpperCase()} `,this))}hasWhiteSpace(e){return/\s/g.test(e)}formatTerm(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.hasWhiteSpace(e)?`"${e}"`:e}commit(){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((e=>this.formatTerm(e))).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for((0,n.ZK)(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;const e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&(0,n.ZK)("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}}function F(e,t){let r,s;switch(r="string"==typeof e||e instanceof $?{httpMethod:"GET",params:{q:e}}
47:(0,n.tH)(e,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"}),t){case"item":s="/search";break;case"group":s="/community/groups";break;case"groupContent":if("string"==typeof e||e instanceof $||!e.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));s=`/content/groups/${e.groupId}/search`;break;case"communityUser":s="/community/users";break;default:s="/portals/self/users/search"}const o=i(r)+s;return(0,n.WY)(o,r).then((r=>(r.nextStart&&-1!==r.nextStart&&(r.nextPage=function(){let n;return"string"==typeof e||e instanceof $?n={q:e,start:r.nextStart}:(n=e,n.start=r.nextStart),F(n,t)}),r)))}function G(e){return F(e,"item")}function L(e){const t=e.partNum;return!Number.isInteger(t)||t<1||t>1e4?Promise.reject(new Error("The part number must be an integer between 1 to 10000, inclusive.")):s(e).then((r=>{const s=`${i(e)}/content/users/${r}/items/${e.id}/addPart?partNum=${t}`,o=(0,n.tH)(e,["file"],{params:Object.assign({},e.params)});return(0,n.WY)(s,o)}))}function H(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/commit`,s=(0,n.tH)(e,[],{params:Object.assign(Object.assign({},e.params),e.item)});return(0,n.WY)(r,s)}))}function B(e){return s(e).then((t=>{const r=`${i(e)}/content/users/${t}/items/${e.id}/cancel`;return(0,n.WY)(r,e)}))}function W(e,t){if(0===e.length)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function q(e){const t=e.id,r=`${i(e)}/community/groups/${t}/addUsers`,s=Object.assign({},e,{admins:void 0,users:void 0}),o=[...V("users",e.users,s),...V("admins",e.admins,s)].map((e=>function(e,t){return(0,n.WY)(e,t).catch((e=>({errors:[e]})))}(r,e)));return Promise.all(o).then(K)}function V(e,t,r){return!t||t.length<1?[]:W(t,25).map((t=>function(e,t,r){return Object.assign({},r,{[e]:t,params:Object.assign(Object.assign({},r.params),{[e]:t})})}(e,t,r)))}function K(e){const t=e.filter((e=>e.notAdded)).reduce(((e,t)=>e.concat(t.notAdded)),[]),r=e.filter((e=>e.errors)).reduce(((e,t)=>e.concat(t.errors)),[]),n={notAdded:t};return r.length>0&&(n.errors=r),n}function z(e){const{id:t,users:r}=e,s=`${i(e)}/community/groups/${t}/removeUsers`,o=W(r,25).map((t=>(t=>{const r=Object.assign(Object.assign({},e),{users:t,params:{users:t}});return(0,n.WY)(s,r).catch((e=>({errors:[e]})))})(t)));return Promise.all(o).then((e=>{const t=t=>e.filter((e=>e[t])).reduce(((e,r)=>e.concat(r[t])),[]),r=t("errors"),n={notRemoved:t("notRemoved")};return r.length?Object.assign(Object.assign({},n),{errors:r}):n}))}function Y(e){const t=e.id,r=`${i(e)}/community/groups/${t}/invite`,s=function(e){return W(e.users,25).map((t=>function(e,t){const r=Object.assign({},t);return r.params=Object.assign(Object.assign({},r.params),{users:e,role:r.role,expiration:r.expiration}),r}(t,e)))}(e),o=s.map((e=>function(e,t){return(0,n.WY)(e,t).catch((e=>({errors:[e]})))}(r,e)));return Promise.all(o).then(J)}function J(e){const t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat(t.errors||[])),[]),n={success:t};return r.length>0&&(n.errors=r),n}function Q(e){const t=`${i(e)}/community/createGroup`;return e.params=Object.assign(Object.assign({},e.params),e.group),(0,n.WY)(t,e)}function Z(e){const t=`${i(e)}/community/groups/${e.id}/protect`;return(0,n.WY)(t,e)}function X(e){const t=`${i(e)}/community/groups/${e.id}/unprotect`;return(0,n.WY)(t,e)}function ee(e){const t=`${i(e)}/community/groups/${e.id}/delete`,r=Object.assign({},e);return(0,n.WY)(t,r)}function te(e){return F(e,"group")}function re(e){return F(e,"groupContent")}function ne(e){const t=`${i(e)}/community/groups/${e.group.id}/update`;return e.params=Object.assign(Object.assign({},e.params),e.group),(0,n.WY)(t,e)}function ie(e){const t=`${i(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,(0,n.WY)(t,r)}function se(e){const t=`${i(e)}/community/groups/${e.id}/join`;return(0,n.WY)(t,e)}function oe(e){
48const t=`${i(e)}/community/groups/${e.id}/leave`;return(0,n.WY)(t,e)}function ae(e){const t=`${i(e)}/portals/self/createNotification`,r=function(e){return W(e.users,e.batchSize||25).map((t=>function(e,t){const r=Object.assign({},t);return r.params=Object.assign(Object.assign({},r.params),{users:e,subject:t.subject,message:t.message,notificationChannelType:r.notificationChannelType}),r}(t,e)))}(e),s=r.map((e=>function(e,t){return(0,n.WY)(e,t).catch((e=>({errors:[e]})))}(t,e)));return Promise.all(s).then(ce)}function ce(e){const t=e.every((e=>e.success)),r=e.reduce(((e,t)=>e.concat(t.errors||[])),[]),n={success:t};return r.length>0&&(n.errors=r),n}async function ue(e){let t,r={httpMethod:"GET"};if("string"==typeof e)t=`https://www.arcgis.com/sharing/rest/community/users/${e}`;else{const n=await async function(e){var t;return e.username?encodeURIComponent(e.username):(null===(t=e.authentication)||void 0===t?void 0:t.username)?encodeURIComponent(e.authentication.username):e.authentication?e.authentication.getUsername().then(encodeURIComponent):void 0}(e);t=`${i(e)}/community/users/${n}`,r=Object.assign(Object.assign({},e),r)}return(0,n.WY)(t,r)}function le(e){return`${i(e)}/community/users/${encodeURIComponent(e.username)}`}function de(e){return F(e,"user")}function pe(e){return F(e,"communityUser")}async function he(e){const t=await e.authentication.getUsername(),r=function(e,t){const r=t||e.authentication.username,n=e.owner||r;return`${i(e)}/content/users/${encodeURIComponent(n)}/items/${e.id}
48/share`}(e,t);return function(e,t){const r=t||e.authentication.username;return(e.owner||r)===r}(e,t)?me(r,e):function(e){return e.authentication.getUser().then((e=>e&&"org_admin"===e.role&&!e.roleId))}(e).then((n=>{if(n)return me(r,e);throw Error(`This item can not be shared by ${t}. They are neither the item owner nor an organization admin.`)}))}function me(e,t){return t.params=Object.assign({org:!1,everyone:!1},t.params),"private"===t.access&&(t.params.groups=" "),"org"===t.access&&(t.params.org=!0),"public"===t.access&&(t.params.account=!0,t.params.everyone=!0),(0,n.WY)(e,t)}function fe(e){return G({q:`id: ${e.id} AND group: ${e.groupId}`,start:1,num:10,sortField:"title",authentication:e.authentication,httpMethod:"POST"}).then((t=>{let r=!1;if(t.total>0)return r=t.results.some((t=>t.id===e.id)),r}))}async function ge(e){return fe(e).then((async t=>{if(t)return{itemId:e.id,shortcut:!0,notSharedWith:[]};const{owner:r,confirmItemControl:n}=e,i=await e.authentication.getUsername(),s=r||i;if(s!==i){let t=!1,r=!1;return Promise.all([ue({username:i,authentication:e.authentication}),ue({username:s,authentication:e.authentication}),U(e)]).then((([i,s,o])=>{const a=!!n;return t="org_admin"===i.role&&!i.roleId,r=i.orgId!==s.orgId,function(e,t,r,n,i,s){const o=[];if(s.groupId!==e.favGroupId)if(t){if(!n)throw Error(`This item can not be shared to shared editing group ${s.groupId} by ${e.username} as they not the item owner or org admin.`);o.push(be(e,e,!1,`Error adding ${e.username} as member to edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s),be(e,i,!0,"none"===r?`Error adding user ${i.username} to edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`:`Error promoting user ${i.username} to admin in edit group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s))}else if(n)o.push(be(e,e,!1,`Error adding ${e.username} as member to view group ${s.groupId}. Consequently item ${s.id} was not shared to the group.`,s));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 ${s.groupId}.`);return o}(i,a,o,t,s,e)})).then((n=>{const[{revert:i}={promise:Promise.resolve({notAdded:[]}),revert:e=>Promise.resolve(e)}]=n;return Promise.all(n.map((({promise:e})=>e))).then((()=>ye(e,t,r))).then((e=>i(e)))}))}return ye(e)})).then((t=>{if(t.notSharedWith.length)throw Error(`Item ${e.id} could not be shared to group ${e.groupId}.`);return t}))}async function ye(e,t=!1,r=!1){const s=await e.authentication.getUsername(),o=e.owner||s;let a=`${i(e)}/content/items/${e.id}/share`;return(o===s||t&&!r)&&(a=`${i(e)}/content/users/${o}/items/${e.id}/share`),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},(0,n.WY)(a,e)}function be(e,t,r,n,i){const s=t.groups||[],o=s.find((e=>e.id===i.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 ${i.groupId} nor can item ${i.id} be shared to the group.`);if(!o&&s.length>511)throw Error(`User ${t.username} already has 512 groups, and can not be added to group ${i.groupId}. Consequently item ${i.id} can not be shared to the group.`);let a,c;if(o)r&&"member"===o.userMembership.memberType?(a=ie({id:i.groupId,users:[t.username],newMemberType:"admin",authentication:i.authentication}).then((e=>{const t=e.results.reduce(((e,t)=>(t.success||e.push(t.username),e)),[]);return Promise.resolve({notAdded:t})})).catch((()=>({notAdded:[t.username]}))),c=e=>ie({id:i.groupId,users:[t.username],newMemberType:"member",authentication:i.authentication}).then((()=>e)).catch((()=>e))):(a=Promise.resolve({notAdded:[]}),c=e=>Promise.resolve(e));else{const e=r?"admins":"users";a=q({id:i.groupId,[e]:[t.username],authentication:i.authentication}).then((e=>{if(e.errors&&e.errors.length)throw e.errors[0];return e})).catch((()=>({notAdded:[t.username]}))),c=e=>z({id:i.groupId,users:[t.username],authentication:i.authentication}).then((()=>e))}return{promise:a.then((e=>{if(e.notAdded.length)throw new Error(n);return e})),revert:c}}function ve(e){return fe(e).then((async t=>{if(!t)return Promise.resolve({itemId:e.id,shortcut:!0,notUnsharedFrom:[]});const{owner:r}=e,s=await e.authentication.getUsername();return Promise.all([U(e),ue({username:s,authentication:e.authentication})]).then((([t,o])=>{const a=(r||s)===s,c="org_admin"===o.role&&!o.roleId;if(!a&&!c&&["admin","owner"].indexOf(t)<0)throw Error(`This item can not be unshared from group ${e.groupId} by ${s} as they not the item owner, an org admin, group admin or group owner.`);return async function(e){const t=await e.authentication.getUsername(),r=e.owner||t;let s=`${i(e)}/content/items/${e.id}
48/unshare`;return r===t&&(s=`${i(e)}/content/users/${r}/items/${e.id}/unshare`),e.params={groups:e.groupId},(0,n.WY)(s,e)}(e)})).then((t=>{if(t.notUnsharedFrom.length)throw Error(`Item ${e.id} could not be unshared to group ${e.groupId}`);return t}))}))}function we(e){return Se(null,e)}function Se(e,t){const r=e||"self",s=`${i(t)}/portals/${r}`,o=Object.assign({httpMethod:"GET"},t);return(0,n.WY)(s,o)}function Ee(e,t){const r=e||"self",s=`${i(t)}/portals/${r}/settings`,o=Object.assign({httpMethod:"GET"},t);return(0,n.WY)(s,o)}},348753:(e,t,r)=>{"use strict";r.d(t,{ah:()=>w,$l:()=>$,yE:()=>l,cv:()=>v,tH:()=>T,bw:()=>_,hv:()=>u,Ov:()=>G,jH:()=>g,WY:()=>E,jz:()=>h,ZK:()=>y});var n=r(732247);function i(e){return Object.keys(e).some((t=>{let r=e[t];if(!r)return!1;switch(r&&r.toParam&&(r=r.toParam()),r.constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}}))}function s(e){const t={};return Object.keys(e).forEach((r=>{var n,i;let s,o=e[r];if(o&&o.toParam&&(o=o.toParam()),o||0===o||"boolean"==typeof o||"string"==typeof o){switch(o.constructor.name){case"Array":const e=null===(i=null===(n=o[0])||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name;s="Array"===e?o:"Object"===e?JSON.stringify(o):o.join(",");break;case"Object":s=JSON.stringify(o);break;case"Date":s=o.valueOf();break;case"Function":s=null;break;case"Boolean":s=o+"";break;default:s=o}(s||0===s||"string"==typeof s||Array.isArray(s))&&(t[r]=s)}})),t}function o(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map((t=>o(e,t))).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}function a(e){const t=s(e);return Object.keys(t).map((e=>o(e,t[e]))).join("&")}var c=r(543598);function u(e,t){const r=i(e)||t,n=s(e);if(r){const e=new c.FormData;return Object.keys(n).forEach((t=>{if("undefined"!=typeof Blob&&n[t]instanceof Blob){const r=n.fileName||n[t].name||t;e.append(t,n[t],r)}else e.append(t,n[t])})),e}return a(e)}class l extends Error{constructor(e,t,r,n,i){super(e);const s=new.target.prototype;Object.setPrototypeOf(this,s),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=i}}const d="ARCGIS_REST_JS_NO_CORS";globalThis[d]||(globalThis[d]=Object.assign({},{noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}}));const p=globalThis[d];function h(e){const t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");const r=t.origin;return p.pendingNoCorsRequests[r]||(p.pendingNoCorsRequests[r]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then((e=>{-1===p.noCorsDomains.indexOf(r)&&p.noCorsDomains.push(r),p.crossOriginNoCorsDomains[r.toLowerCase()]=Date.now(),delete p.pendingNoCorsRequests[r]})).catch((e=>(delete p.pendingNoCorsRequests[r],Promise.reject(new Error(`no-cors request to ${r} failed`)))))),p.pendingNoCorsRequests[r]}function m(e){const t=new URL(e).origin;-1===p.noCorsDomains.indexOf(t)&&p.noCorsDomains.push(t)}function f(e){let t=!1;if(p.noCorsDomains.length){const r=new URL(e).origin.toLowerCase();t=p.noCorsDomains.some((e=>r.includes(e)))}return t}function g(e){let t=!1;if(f(e)){const r=new URL(e).origin.toLowerCase(),n=p.crossOriginNoCorsDomains[r]||0;Date.now()-36e5>n&&(t=!0)}return t}function y(e){console&&console.warn&&console.warn.apply(console,[e])}var b=r(398080);const v="@esri/arcgis-rest-js";class w extends l{constructor(e="AUTHENTICATION_ERROR",t="AUTHENTICATION_ERROR_CODE",r,n,i){super(e,t,r,n,i),this.name="ArcGISAuthError",this.message="AUTHENTICATION_ERROR_CODE"===t?e:`${t}: ${e}`;const s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(e,t=1){let r=0;const n=(i,s)=>{r+=1,e(this.url,this.options).then((e=>{const t=Object.assign(Object.assign({},this.options),{authentication:e});return S(this.url,t)})).then((e=>{i(e)})).catch((e=>{"ArcGISAuthError"===e.name&&r<t?n(i,s):e.name===this.name&&e.message===this.message&&r>=t?s(this):s(e)}))};return new Promise(((e,t)=>{n(e,t)}))}}function S(e,t){const r=globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}},n=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},r),t),{params:Object.assign(Object.assign({},r.params),t.params),headers:Object.assign(Object.assign({},r.headers),t.headers)}),{httpMethod:s,rawResponse:o}=n,c=Object.assign({f:"json"},n.params);let d=null;const p={method:s,signal:n.signal,credentials:n.credentials||"same-origin"};let S;if(f(e)&&(p.credentials="include"),n.headers&&n.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(p.credentials="include"),"string"==typeof n.authentication){const e=n.authentication;S={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(e)},n.authentication.startsWith("AAPK")||n.authentication.startsWith("AATK")||n.suppressWarnings||globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING||(y("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else S=n.authentication;const E=e;let T=!1;"undefined"!=typeof window&&(T=function(e,t){var r;if((t||window)&&e){const n=null===(r=(t=t||window).location)||void 0===r?void 0:r.origin;return e.startsWith(n)}return!1}(e));const I=!T&&g(e);n.headers&&n.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(p.credentials="include");let C=Promise.resolve();return I&&(p.credentials="include",C=h(e)),C.then((()=>S?S.getToken(e).catch((t=>(t.url=e,t.options=n,d=t,Promise.resolve("")))):Promise.resolve(""))).then((t=>{t.length&&(c.token=t),S&&S.getDomainCredentials&&(p.credentials=S.getDomainCredentials(e));const r={};if("GET"===p.method){c.token&&n.hideToken&&"undefined"==typeof window&&(r["X-Esri-Authorization"]=`Bearer ${c.token}`,delete c.token);const i=""===a(c)?e:e+"?"+a(c);n.maxUrlLength&&i.length>n.maxUrlLength||!n.maxUrlLength&&i.length>2e3||c.token&&n.hideToken?(p.method="POST",t.length&&n.hideToken&&(c.token=t,delete r["X-Esri-Authorization"])):e=i}const s=new RegExp("/items/.+/updateResources").test(e);return"POST"===p.method&&(p.body=u(c,s)),p.headers=Object.assign(Object.assign({},r),n.headers),("undefined"==typeof window||window&&void 0===window.document)&&!p.headers.referer&&(p.headers.referer=v),i(c)||s||(p.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,p):(0,b.getFetch)().then((({fetch:t})=>t(e,p)))})).then((t=>{if(!t.ok)return t.json().then((r=>{const{status:i,statusText:s}=t,{message:o,details:a}=r.error,c=`${o}. ${a?a.join(" "):""}`.trim();throw new l(c,`HTTP ${i} ${s}`,r,e,n)})).catch((r=>{if("ArcGISRequestError"===r.name)throw r;const{status:i,statusText:s}=t;throw new l(s,`HTTP ${i}`,t,e,n)}));if(o)return t;switch(c.f){case"json":case"geojson":return t.json();case"html":case"text":return t.text();default:return t.blob()}})).then((t=>{if("json"!==c.f&&"geojson"!==c.f||o)return t;{const r=function(e,t,r,n,i){if(e.code>
48=400){const{message:r,code:i}=e;throw new l(r,i,e,t,n)}if(e.error){const{message:r,code:s,messageCode:o}=e.error,a=o||s||"UNKNOWN_ERROR_CODE";if(498===s||499===s)throw i||new w(r,a,e,t,n);throw new l(r,a,e,t,n)}if("failed"===e.status||"failure"===e.status){let r,i="UNKNOWN_ERROR_CODE";try{r=JSON.parse(e.statusMessage).message,i=JSON.parse(e.statusMessage).code}catch(t){r=e.statusMessage||e.message}throw new l(r,i,e,t,n)}return e}(t,E,0,n,d);if(t&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(t.authorizedCrossOriginNoCorsDomains)&&t.authorizedCrossOriginNoCorsDomains.forEach((e=>{e=e.toLowerCase(),/^https?:\/\//.test(e)?m(e):(m("http://"+e),m("https://"+e))})),d){const t=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];n.authentication.federatedServers[t]={token:[],expires:new Date(Date.now()+864e5)},d=null}return r}}))}function E(e,t={params:{f:"json"}}){const{request:r}=t,i=(0,n.__rest)(t,["request"]);return r?r(e,i):S(e,i).catch((e=>e instanceof w&&t.authentication&&"string"!=typeof t.authentication&&t.authentication.canRefresh&&t.authentication.refreshCredentials?e.retry((()=>t.authentication.refreshCredentials()),1):Promise.reject(e)))}function T(e,t,r){const n=Object.assign(Object.assign({params:{}},r),e);return n.params=t.reduce(((t,r)=>((e[r]||"boolean"==typeof e[r]||"number"==typeof e[r]&&0===e[r])&&(t[r]=e[r]),t)),n.params),["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"].reduce(((e,t)=>(n[t]&&(e[t]=n[t]),e)),{})}var I,C,A;(A=I||(I={})).TOKEN_REFRESH_FAILED="TOKEN_REFRESH_FAILED",A.GENERATE_TOKEN_FOR_SERVER_FAILED="GENERATE_TOKEN_FOR_SERVER_FAILED",A.REFRESH_TOKEN_EXCHANGE_FAILED="REFRESH_TOKEN_EXCHANGE_FAILED",A.NOT_FEDERATED="NOT_FEDERATED",A.UNKNOWN_ERROR_CODE="UNKNOWN_ERROR_CODE";class O extends Error{constructor(e="UNKNOWN_ERROR",t=I.UNKNOWN_ERROR_CODE,r,n,i){super(e);const s=new.target.prototype;Object.setPrototypeOf(this,s),this.name="ArcGISTokenRequestError",this.message=`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=r,this.url=n,this.options=i}}function _(e){return"string"!=typeof e||"/"===(e=e.trim())[e.length-1]&&(e=e.slice(0,-1)),e}!function(e){e.ArcGISRequestError="ArcGISRequestError",e.ArcGISAuthError="ArcGISAuthError",e.ArcGISAccessDeniedError="ArcGISAccessDeniedError",e.ArcGISTokenRequestError="ArcGISTokenRequestError"}(C||(C={}));const D=3e5;function P(e,t){const r=t;return r.rawResponse=!1,E(e,r).then((e=>{if("token"in e&&"expires"in e)return{token:e.token,username:t.params.username,expires:new Date(e.expires)};const r={token:e.access_token,username:e.username,expires:new Date(Date.now()+1e3*e.expires_in-D),ssl:!0===e.ssl};return e.refresh_token&&(r.refreshToken=e.refresh_token),e.refresh_token_expires_in&&(r.refreshTokenExpires=new Date(Date.now()+1e3*e.refresh_token_expires_in-D)),r}))}class k{constructor(e){this.portal=e.portal?_(e.portal):"https://www.arcgis.com/sharing/rest",this._username=e.username}get username(){return this._username?this._username:this._user&&this._user.username?this._user.username:void 0}getUsername(){return this.username?Promise.resolve(this.username):this.getUser().then((e=>e.username))}getUser(e){if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);{const t=`${this.portal}/community/self`,r=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=E(t,r).then((e=>(this._user=e,this._pendingUserRequest=null,e))),this._pendingUserRequest}}clearCachedUserInfo(){this._user=null}}const x=/^https?:\/\/(\S+)\.arcgis\.com.+/;function R(e){return x.test(e)}function U(e){if(!x.test(e))return null;const t=e.match(x)[1].split(".").pop();return t.includes("dev")?"dev":t.includes("qa")?"qa":"production"}function M(e,t=window){return!t&&window&&(t=window),t.btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function N(e){return!e&&window&&(e=window),M(e.crypto.getRandomValues(new Uint8Array(32)))}
48class j extends Error{constructor(){super("The user has denied your authorization request.");const e=new.target.prototype;Object.setPrototypeOf(this,e),this.name="ArcGISAccessDeniedError"}}class $ extends k{constructor(e){if(super(e),this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?_(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.server=e.server,this.referer=e.referer,this.federatedServers={},this.trustedDomains=[],e.server){const t=this.getServerRootUrl(e.server);this.federatedServers[t]={token:e.token,expires:e.tokenExpires}}this._pendingTokenRequests={}}get token(){return this._token}get tokenExpires(){return this._tokenExpires}get refreshToken(){return this._refreshToken}get refreshTokenExpires(){return this._refreshTokenExpires}get canRefresh(){return!(!this.username||!this.password)||!!(this.clientId&&this.refreshToken&&this.redirectUri)}static beginOAuth2(e,t){!t&&window&&(t=window);const{portal:r,provider:n,clientId:i,expiration:s,redirectUri:o,popup:c,popupWindowFeatures:u,locale:l,params:d,style:p,pkce:h,state:m}=Object.assign({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",locale:"",style:"",pkce:!0},e),f=m||N(t),g=`ARCGIS_REST_JS_AUTH_STATE_${i}`;t.localStorage.setItem(g,f);let y=`${_(r)}/oauth2/authorize`;const b={client_id:i,response_type:h?"code":"token",expiration:s,redirect_uri:o,state:JSON.stringify({id:f,originalUrl:t.location.href}),locale:l,style:p};let v;if("arcgis"!==n&&(y=`${_(r)}/oauth2/social/authorize`,b.socialLoginProviderName=n,b.autoAccountCreateForSocial=!0),h){const e=N(t),r=`ARCGIS_REST_JS_CODE_VERIFIER_${i}`;t.localStorage.setItem(r,e),v=function(e,t=window){if(!t&&window&&(t=window),e&&t.isSecureContext&&t.crypto&&t.crypto.subtle){const r=(new t.TextEncoder).encode(e);return t.crypto.subtle.digest("SHA-256",r).then((e=>M(new Uint8Array(e),t)))}return Promise.resolve(null)}(e,t).then((function(t){b.code_challenge_method=t?"S256":"plain",b.code_challenge=t||e}))}else v=Promise.resolve();return v.then((()=>(y=`${y}?${a(b)}`,d&&(y=`${y}&${a(d)}`),c?new Promise(((e,n)=>{t.addEventListener(`arcgis-rest-js-popup-auth-${i}`,(t=>{if("access_denied"===t.detail.error){const e=new j;return n(e),e}if(t.detail.errorMessage){const e=new w(t.detail.errorMessage,t.detail.error);return n(e),e}e(new $({clientId:i,portal:r,ssl:t.detail.ssl,token:t.detail.token,tokenExpires:t.detail.expires,username:t.detail.username,refreshToken:t.detail.refreshToken,refreshTokenExpires:t.detail.refreshTokenExpires,redirectUri:o}))}),{once:!0}),t.open(y,"oauth-window",u),t.dispatchEvent(new CustomEvent("arcgis-rest-js-popup-auth-start"))})):void(t.location.href=y))))}static completeOAuth2(e,t){!t&&window&&(t=window);const{portal:r,clientId:n,popup:i,pkce:s,redirectUri:o}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",popup:!0,pkce:!0},e),a=`ARCGIS_REST_JS_AUTH_STATE_${n}`,c=t.localStorage.getItem(a),u=!(d=s?t.location.search.replace(/^\?/,""):t.location.hash.replace(/^#/,""))||d.length<=0?{}:d.replace(/^#/,"").replace(/^\?/,"").split("&").reduce(((e,t)=>{const{key:r,value:n}=function(e){const[t,r]=e.split("=");return{key:decodeURIComponent(t),value:decodeURIComponent(r)}}(t);return e[r]=n,e}),{}),l=u&&u.state?JSON.parse(u.state):void 0;var d;function p(e,r,s){return t.localStorage.removeItem(a),i&&t.opener?(t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${n}`,{detail:{error:r,errorMessage:e}})),void t.close()):(s&&t.history.replaceState(t.history.state,"",s),"access_denied"===r?Promise.reject(new j):Promise.reject(new w(e,r)))}function h(e,s){return t.localStorage.removeItem(a),i&&t.opener?(t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${n}`,{detail:Object.assign({},e)}
48)),void t.close()):(t.history.replaceState(t.history.state,"",s),new $({clientId:n,portal:r,ssl:e.ssl,token:e.token,tokenExpires:e.expires,username:e.username,refreshToken:e.refreshToken,refreshTokenExpires:e.refreshTokenExpires,redirectUri:o||location.href.replace(location.search,"")}))}if(!c||!l)return p("No authentication state was found, call `ArcGISIdentityManager.beginOAuth2(...)` to start the authentication process.","no-auth-state");if(l.id!==c)return p("Saved client state did not match server sent state.","mismatched-auth-state");if(u.error){const e=u.error;return p(u.error_description||"Unknown error",e,l.originalUrl)}if(s&&u.code){const e=_(`${r}/oauth2/token/`),i=`ARCGIS_REST_JS_CODE_VERIFIER_${n}`,s=t.localStorage.getItem(i);return t.localStorage.removeItem(i),P(e,{httpMethod:"POST",params:{client_id:n,code_verifier:s,grant_type:"authorization_code",redirect_uri:o||location.href.replace(location.search,""),code:u.code}}).then((e=>h(Object.assign(Object.assign({},e),l),l.originalUrl))).catch((e=>p(e.originalMessage,e.code,l.originalUrl)))}return!s&&u.access_token?Promise.resolve(h(Object.assign({token:u.access_token,expires:new Date(Date.now()+1e3*parseInt(u.expires_in,10)),ssl:"true"===u.ssl,username:u.username},l),l.originalUrl)):p("Unknown error","oauth-error",l.originalUrl)}static fromParent(e,t){let r;return!t&&window&&(t=window),new Promise(((n,i)=>{r=e=>{if(e.source===t.parent&&e.data)try{return n($.parentMessageHandler(e))}catch(e){return i(e)}},t.addEventListener("message",r,!1),t.parent.postMessage({type:"arcgis:auth:requestCredential"},e)})).then((e=>(t.removeEventListener("message",r,!1),e)))}static authorize(e,t){const{portal:r,clientId:n,expiration:i,redirectUri:s,state:o}=Object.assign({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),c={client_id:n,expiration:i,response_type:"code",redirect_uri:s};o&&(c.state=o);const u=`${r}/oauth2/authorize?${a(c)}`;t.writeHead(301,{Location:u}),t.end()}static exchangeAuthorizationCode(e,t){const{portal:r,clientId:n,redirectUri:i}=Object.assign({portal:"https://www.arcgis.com/sharing/rest"},e);return P(`${r}/oauth2/token`,{params:{grant_type:"authorization_code",client_id:n,redirect_uri:i,code:t}}).then((e=>new $({clientId:n,portal:r,ssl:e.ssl,redirectUri:i,refreshToken:e.refreshToken,refreshTokenExpires:e.refreshTokenExpires,token:e.token,tokenExpires:e.expires,username:e.username}))).catch((e=>{throw new O(e.message,I.REFRESH_TOKEN_EXCHANGE_FAILED,e.response,e.url,e.options)}))}static deserialize(e){const t=JSON.parse(e);return new $({clientId:t.clientId,refreshToken:t.refreshToken,refreshTokenExpires:t.refreshTokenExpires?new Date(t.refreshTokenExpires):void 0,username:t.username,password:t.password,token:t.token,tokenExpires:t.tokenExpires?new Date(t.tokenExpires):void 0,portal:t.portal,ssl:t.ssl,tokenDuration:t.tokenDuration,redirectUri:t.redirectUri,server:t.server})}static fromCredential(e,t){const r=void 0===e.ssl||e.ssl,n=e.expires||Date.now()+72e5;return t.hasServer?new $({server:e.server,ssl:r,token:e.token,username:e.userId,tokenExpires:new Date(n)}):new $({portal:_(e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest"),ssl:r,token:e.token,username:e.userId,tokenExpires:new Date(n)})}static parentMessageHandler(e){if("arcgis:auth:credential"===e.data.type){const t=e.data.credential;return function(e){return"string"==typeof e.userId||"number"==typeof e.expires}(t)?$.fromCredential(t,{hasPortal:!0,hasServer:!1,server:t.server}):new $(t)}if("arcgis:auth:error"===e.data.type){const t=new Error(e.data.error.message);throw t.name=e.data.error.name,t}throw new Error("Unknown message type.")}static destroy(e){return function(e){const t=`${_(e.portal||"https://www.arcgis.com/sharing/rest")}/oauth2/revokeToken/`,r=e.token,n=e.clientId;delete e.portal,delete e.clientId,delete e.token;const i=Object.assign(Object.assign({},e),{httpMethod:"POST",params:{client_id:n,auth_token:r}});return E(t,i).then((e=>{if(!e.success)throw new l("Unable to revoke token",500,e,t,i);return e}))}({clientId:e.clientId,portal:e.portal,token:e.refreshToken||e.token})}static fromToken(e){const t=new $(e);return t.getUser().then((()=>t))}static signIn(e){const t=new $(e);return t.getUser().then((()=>t))}toCredential(){return{expires:this.tokenExpires.getTime(),server:this.server||this.portal,ssl:this.ssl,token:this.token,userId:this.username}}
48getPortal(e){if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);{const t=`${this.portal}/portals/self`,r=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=E(t,r).then((e=>(this._portalInfo=e,this._pendingPortalRequest=null,e))),this._pendingPortalRequest}}getToken(e,t){return function(e,t){const r=R(e),n=R(t),i=U(e),s=U(t);return!(!r||!n||i!==s)}(this.portal,e)||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t)}validateAppAccess(e){return this.getToken(this.portal).then((t=>function(e,t,r="https://www.arcgis.com/sharing/rest"){return E(`${r}/oauth2/validateAppAccess`,{method:"POST",params:{f:"json",client_id:t,token:e}})}(t,e)))}toJSON(){return{type:"ArcGISIdentityManager",clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires||void 0,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires||void 0,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,server:this.server}}serialize(){return JSON.stringify(this)}enablePostMessageAuth(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)}disablePostMessageAuth(e){!e&&window&&(e=window),e.removeEventListener("message",this._hostHandler,!1)}refreshCredentials(e){return this.clearCachedUserInfo(),this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new O("Unable to refresh token. No refresh token or password present.",I.TOKEN_REFRESH_FAILED))}getServerRootUrl(e){const[t]=_(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/),[r,n,i]=t.match(/(https?:\/\/)(.+)/),[s,...o]=i.split("/");return`${n}${s.toLowerCase()}/${o.join("/")}`}getDomainCredentials(e){return this.trustedDomains&&this.trustedDomains.length?(e=e.toLowerCase(),this.trustedDomains.some((t=>e.startsWith(t.toLowerCase())))?"include":"same-origin"):"same-origin"}signOut(){return $.destroy(this)}createPostMessageHandler(e){return t=>{const r=e.indexOf(t.origin)>-1,n="arcgis:auth:requestCredential"===t.data.type,i=this.tokenExpires.getTime()>Date.now();if(r&&n){let e={};if(i){const t=this.toCredential();t.server=t.server.replace("/sharing/rest",""),e={type:"arcgis:auth:credential",credential:t}}else e={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Token was expired, and not returned to the child application"}};t.source.postMessage(e,t.origin)}}}getTokenForServer(e,t){const r=this.getServerRootUrl(e),n=this.federatedServers[r];return n&&n.expires&&n.expires.getTime()>Date.now()?Promise.resolve(n.token):(this._pendingTokenRequests[r]||(this._pendingTokenRequests[r]=this.fetchAuthorizedDomains().then((()=>E(`${r}/rest/info`,{credentials:this.getDomainCredentials(e)}).then((n=>{if(n.owningSystemUrl){if(function(e,t){const r=_(function(e){if(!x.test(e))return e;switch(U(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?:\/\//,""),n=_(e).replace(/https?:\/\//,"");return new RegExp(n,"i").test(r)}(n.owningSystemUrl,this.portal))return E(`${n.owningSystemUrl}/sharing/rest/info`,t);throw new O(`${e} is not federated with ${this.portal}.`,I.NOT_FEDERATED)}if(n.authInfo&&void 0!==this.federatedServers[r])return Promise.resolve({authInfo:n.authInfo});throw new O(`${e} is not federated with any portal and is not explicitly trusted.`,I.NOT_FEDERATED)})).then((e=>this.token&&this.tokenExpires.getTime()<Date.now()?this.server?this.refreshCredentials().then((()=>({token:this.token,expires:this.tokenExpires}))):this.refreshCredentials().then((()=>this.generateTokenForServer(e.authInfo.tokenServicesUrl,r))):this.generateTokenForServer(e.authInfo.tokenServicesUrl,r))).then((e=>(this.federatedServers[r]=e,delete this._pendingTokenRequests[r],e.token)))))),this._pendingTokenRequests[r])}generateTokenForServer(e,t){return E(e,{params:{token:this.token,serverUrl:t,expiration:this.tokenDuration}}).then((e=>({token:e.token,expires:new Date(e.expires-3e5)}))).catch((e=>{throw new O(e.message,I.GENERATE_TOKEN_FOR_SERVER_FAILED,e.response,e.url,e.options)}))}getFreshToken(e){return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>
48Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshCredentials(e).then((()=>(this._pendingTokenRequests[this.portal]=null,this.token)))),this._pendingTokenRequests[this.portal])}refreshWithUsernameAndPassword(e){const t={username:this.username,password:this.password,expiration:this.tokenDuration,client:"referer",referer:this.referer?this.referer:"undefined"!=typeof window&&void 0!==window.document&&window.location&&window.location.origin?window.location.origin:v};return(this.server?E(`${this.getServerRootUrl(this.server)}/rest/info`).then((r=>E(r.authInfo.tokenServicesUrl,Object.assign({params:t},e)))):E(`${this.portal}/generateToken`,Object.assign({params:t},e))).then((e=>(this.updateToken(e.token,new Date(e.expires)),this))).catch((e=>{throw new O(e.message,I.TOKEN_REFRESH_FAILED,e.response,e.url,e.options)}))}refreshWithRefreshToken(e){if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()-864e5<Date.now())return this.exchangeRefreshToken(e);const t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return P(`${this.portal}/oauth2/token`,t).then((e=>this.updateToken(e.token,e.expires))).catch((e=>{throw new O(e.message,I.TOKEN_REFRESH_FAILED,e.response,e.url,e.options)}))}updateToken(e,t){return this._token=e,this._tokenExpires=t,this}exchangeRefreshToken(e){const t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return P(`${this.portal}/oauth2/token`,t).then((e=>(this._token=e.token,this._tokenExpires=e.expires,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this))).catch((e=>{throw new O(e.message,I.REFRESH_TOKEN_EXCHANGE_FAILED,e.response,e.url,e.options)}))}fetchAuthorizedDomains(){return this.server||!this.portal?Promise.resolve(this):this.getPortal().then((e=>(e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(this.trustedDomains=e.authorizedCrossOriginDomains.filter((e=>!e.startsWith("http://"))).map((e=>e.startsWith("https://")?e:`https://${e}`))),this)))}}function F(e){return console.log("DEPRECATED:, 'UserSession' is deprecated. Use 'ArcGISIdentityManager' instead."),new $(e)}function G(e,t,r="https://www.arcgis.com/sharing/rest"){return E(`${r}/oauth2/exchangeToken`,{method:"POST",params:{f:"json",client_id:t,token:e}}).then((e=>e.token))}var L,H;F.beginOAuth2=function(...e){return console.warn("DEPRECATED:, 'UserSession.beginOAuth2' is deprecated. Use 'ArcGISIdentityManager.beginOAuth2' instead."),$.beginOAuth2(...e)},F.completeOAuth2=function(...e){return console.warn("DEPRECATED:, 'UserSession.completeOAuth2()' is deprecated. Use 'ArcGISIdentityManager.completeOAuth2()' instead."),e.length<=1&&console.warn("WARNING:, 'UserSession.completeOAuth2()' is now async and returns a promise the resolves to an instance of `ArcGISIdentityManager`."),$.completeOAuth2(...e)},F.fromParent=function(...e){return console.warn("DEPRECATED:, 'UserSession.fromParent' is deprecated. Use 'ArcGISIdentityManager.fromParent' instead."),$.fromParent(...e)},F.authorize=function(...e){return console.warn("DEPRECATED:, 'UserSession.authorize' is deprecated. Use 'ArcGISIdentityManager.authorize' instead."),$.authorize(...e)},F.exchangeAuthorizationCode=function(...e){return console.warn("DEPRECATED:, 'UserSession.exchangeAuthorizationCode' is deprecated. Use 'ArcGISIdentityManager.exchangeAuthorizationCode' instead."),$.exchangeAuthorizationCode(...e)},F.fromCredential=function(...e){return console.log("DEPRECATED:, 'UserSession.fromCredential' is deprecated. Use 'ArcGISIdentityManager.fromCredential' instead."),console.warn("WARNING:, 'UserSession.fromCredential' now requires a `ServerInfo` object from the JS API as a second parameter."),$.fromCredential(...e)},F.deserialize=function(...e){return console.log("DEPRECATED:, 'UserSession.deserialize' is deprecated. Use 'ArcGISIdentityManager.deserialize' instead."),$.deserialize(...e)},(H=L||(L={})).Success="Succeeded",H.Failed="Failed",H.Waiting="Waiting",H.Cancelled="Cancelled",H.Cancelling="Cancelling",H.New="New",H.Executing="Executing",H.Submitted="Submitted",H.Failure="Failure",H.TimedOut="TimedOut",H.Error="Error",H.Status="Etatus",H.Unknown="Unknown"},970758:(e,t,r)=>{"use strict";r.d(t,{c:()=>c,r:()=>a});var n=r(917112),i=r(718278),s=r(795290);const o=n.iv``,a=(0,i.RD)({defaultAssetPath:"https://js.arcgis.com/0.1/hub-web-components/",hydratedAttribute:"hydrated",commonStyles:o}),{customElement:c,getAssetPath:u,setAssetPath:l}=a;a.t=s.it,a.o=s.kR,a.c=s.Vz,a.r=s.LJ},599155:(e,t,r)=>{"use strict";r.r(t),r.d(t,{defineCustomElements:()=>i});var n=r(970758);const i=(0,r(718278).D2)(n.r,{"arcgis-text-element":[()=>r.e(6827).then(r.bind(r,806827)),"html"],"arcgis-chat-shell":[()=>r.e(45629).then(r.bind(r,445629)),"aboutContent,aboutVisible,chatComponent:,featureTable:,map:,mapEnabled,mapVisible"],"arcgis-chat-ui":[()=>
48Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(2371),r.e(53790),r.e(99384),r.e(44722)]).then(r.bind(r,944722)),"botDescription,botTitle,conversationId,defaultSuggestions:,devFeatureMessage:,getFinderResponse:,inputText;;submitUserMessage"],"arcgis-hub-ai-assistant":[()=>Promise.all([r.e(97053),r.e(67529),r.e(36399),r.e(40285),r.e(77319),r.e(2371),r.e(53790),r.e(99384),r.e(88089)]).then(r.bind(r,888089)),"apiUrl,authentication:,botDescription,botTitle,context,defaultSuggestions:,entityId,extent:,hub,itemId,language,location,mapBasemap,mapEnabled,mapLayers:,mapShowTable,mapVisible,portalUrl"],"arcgis-layout":[()=>r.e(99920).then(r.bind(r,999920)),"debug,isEditMode,layout:,options:"],"arcgis-layout-container":[()=>r.e(69495).then(r.bind(r,369495))],"arcgis-layout-column":[()=>r.e(90379).then(r.bind(r,790379)),"currentNode:,debug,isEditMode,node:,utils:"],"arcgis-layout-row":[()=>r.e(48763).then(r.bind(r,248763)),"currentNode:,debug,isEditMode,node:,utils:"],"arcgis-layout-section":[()=>r.e(66459).then(r.bind(r,66459)),"currentNode:,debug,isEditMode,node:,utils:"]})},718278:(e,t,r)=>{"use strict";r.d(t,{oi:()=>ut,yM:()=>K,oF:()=>gt,D2:()=>Ee,RD:()=>pt,hZ:()=>we,Ld:()=>bt,Vp:()=>ht,kA:()=>mt});class n{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const i=(e,t,...r)=>{try{return e?.call(t,...r)}catch(t){console.error(t,e)}},s=async(e,t,...r)=>{try{const n=e?.call(t,...r);return await n}catch(t){console.error(t,e)}},o=("ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),e=>e.replace(a,((e,t)=>`${0===t?"":"-"}${e.toLowerCase()}`))),a=/[A-Z]+(?![a-z])|[A-Z]/gu;var c=r(917112);const{is:u,defineProperty:l,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:h,getPrototypeOf:m}=Object,f=globalThis,g=f.trustedTypes,y=g?g.emptyScript:"",b=f.reactiveElementPolyfillSupport,v=(e,t)=>e,w={toAttribute(e,t){switch(t){case Boolean:e=e?y:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},S=(e,t)=>!u(e,t),E={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class T extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&l(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const s=n?.call(this);i?.call(this,t),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=m(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...p(e),...h(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift((0,c.i1)(e))}else void 0!==e&&t.push((0,c.i1)(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}
48removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return(0,c.ec)(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:w).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:w;this._$Em=n,this[n]=i.fromAttribute(t,e.type)??this._$Ej?.get(n)??null,this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){const n=this.constructor,i=this[e];if(r??=n.getPropertyOptions(e),!((r.hasChanged??S)(i,t)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:i},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==i||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[v("elementProperties")]=new Map,T[v("finalized")]=new Map,b?.({ReactiveElement:T}),(f.reactiveElementVersions??=[]).push("2.1.0");var I=r(322601);const C=globalThis;class A extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,I.sY)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return I.Jb}}A._$litElement$=!0,A.finalized=!0,C.litElementHydrateSupport?.({LitElement:A});const O=C.litElementPolyfillSupport;function _(e,t,r){D(e,t),t.set(e,r)}function D(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function P(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function k(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,R(e,t,"get"))}function x(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,R(e,t,"set"),r),r}function R(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}O?.({LitElement:A}),(C.litElementVersions??=[]).push("4.2.0");const U=Symbol.for("controller");let M;const N=e=>{M!==e&&(M=e,queueMicrotask((()=>M===e?M=void 0:0)))},j=e=>M;let $=[];const F=()=>$;let G;const L=async(e,t)=>{const r=B(e);if(void 0===r)return e;if(await r.ready,"function"==typeof t){const e=r.watchExports((r=>t(r,e)))}
48return r.exports},H=async e=>{const t=B(e);return await t.ready,t},B=e=>{const t=j().manager.X(e);if(void 0!==t)return t;if((e=>"object"==typeof e&&null!==e&&(U in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e))(e))return e;const r=(()=>{const e=G;return G=void 0,e})();return void 0!==r?r:void 0};let W;const q=()=>{W?.forEach((({callbacks:e},t)=>{const r=Object.keys(t);e.forEach((e=>e(r)))})),W=void 0},V=(e,t,r)=>{const n=e.manager;return n.V!==I.Ld&&n.V!==r&&n.S(void 0,void 0),0===n.T.length&&queueMicrotask((()=>n.S(void 0,void 0))),n.V=r,n.T.push(((e,n)=>i(t,void 0,r===n?e:void 0))),r},K=((e="",t={},r=j())=>{const n={emit:n=>{""===e&&q();const i=new CustomEvent(e,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return r.el.dispatchEvent(i),i}};return""===e&&((e=[j(),...F()],t,r)=>{const n=Array.isArray(e)?e:[e];let s=n.length+1;const o=e=>{s-=1,void 0!==e&&(s=Math.min(s,0)),0===s&&t(e)};n.forEach((e=>((e,t,r)=>{const n=Object.keys(e),s=n.length;void 0===W&&queueMicrotask(q),W??=new Map;let o=W.get(e);return void 0===o&&(o={callbacks:[],keyCount:s},W.set(e,o)),o.keyCount!==s&&(o.callbacks.forEach((e=>e(n))),o.callbacks=[],o.keyCount=s),o.callbacks.push((n=>{const o=e=>i(t,null,e),a=n[s];void 0===a?o(void 0):e[a]===r?o(a):o(void 0)})),r})(e,(t=>o(void 0===t?void 0:{key:t,host:e,isReactive:!1})),r)));for(const e of n)if("manager"in e&&e.manager.component===e){V(e,(t=>o(void 0===t?void 0:{key:t,host:e,isReactive:!0})),r);break}})(void 0,(t=>e=t.key),n),n}).bind(null,"");var z;z=U;var Y=new WeakMap,J=new WeakMap,Q=new WeakMap,Z=new WeakMap,X=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,ie=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,ce=new WeakSet;function ue(e){N(k(this,se));const t=i(e);(Array.isArray(t)?t:[t]).forEach((e=>{"function"==typeof e?k(this,ne).push(e):"object"==typeof e&&"function"==typeof e.remove&&k(this,ne).push(e.remove)}))}function le(e){i(e,void 0,this)}const de=class{constructor(e){var t;D(this,t=ce),t.add(this),_(this,Y,{writable:!0,value:void 0}),_(this,J,{writable:!0,value:void 0}),_(this,Q,{writable:!0,value:void 0}),_(this,Z,{writable:!0,value:void 0}),_(this,X,{writable:!0,value:void 0}),_(this,ee,{writable:!0,value:void 0}),_(this,te,{writable:!0,value:void 0}),_(this,re,{writable:!0,value:void 0}),_(this,ne,{writable:!0,value:void 0}),_(this,ie,{writable:!0,value:void 0}),_(this,se,{writable:!0,value:void 0}),_(this,oe,{writable:!0,value:void 0}),_(this,ae,{writable:!0,value:void 0}),x(this,Y,[]),x(this,J,[]),x(this,Q,[]),x(this,Z,[]),x(this,X,[]),x(this,ee,[]),x(this,te,[]),x(this,re,[]),x(this,ne,[]),x(this,ie,!1),this.P=new n,this.connectedCalled=!1,this.loadedCalled=!1,this[z]=!0,x(this,ae,[]);const r=this,i=e??j(new.target.name);x(r,se,i),r.ready=r.P.promise,x(r,oe,pe(r)),r.component=i,k(r,se).addController(r),void 0===k(r,se).manager||((e=>{if(void 0===e)return void($=[]);const t=$.indexOf(e);$=-1===t?[...$,e]:$.slice(0,t+1),queueMicrotask((()=>$=[]))})(r),queueMicrotask((()=>r.catchUpLifecycle())))}catchUpLifecycle(){const{manager:e}=k(this,se);!e.connectedCalled||this.connectedCalled||this.triggerConnected(),!k(e,ie)||this.triggerLoad().then((()=>e.loadedCalled&&this.triggerLoaded())).catch(console.error)}get exports(){return k(this,oe)}set exports(e){const t=k(this,oe);t!==e&&(x(this,oe,e),k(this,ae).forEach(i),this.connectedCalled&&!1!==this.O&&k(this,se).requestUpdate(this.O,t)),this.P.resolve(e)}setProvisionalExports(e,t=!0){x(this,oe,t?pe(e):e),k(this,ae).forEach(i)}watchExports(e){const t=()=>e(k(this,oe));return k(this,ae).push(t),()=>{k(this,ae).splice(k(this,ae).indexOf(t),1)}}get use(){return N(k(this,se)),L}get useRef(){return N(k(this,se)),H}get useRefSync(){return N(k(this,se)),B}controllerRemoved(){k(this,se).el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){k(this,Y).push(e)}onDisconnected(e){k(this,J).push(e)}onLoad(e){k(this,Q).push(e)}onLoaded(e){k(this,Z).push(e)}onUpdate(e){k(this,X).push(e)}onUpdated(e){k(this,ee).push(e)}onDestroy(e){k(this,te).push(e)}onLifecycle(e){k(this,re).push(e),this.connectedCalled&&k(this,se).el.isConnected&&P(this,ce,ue).call(this,e)}triggerConnected(){const e=this;e.hostConnected&&i(e.hostConnected,e),k(e,Y).forEach(i),e.triggerLifecycle(),e.connectedCalled=!0}triggerDisconnected(){const e=this;e.hostDisconnected&&i(e.hostDisconnected,e),k(e,J).forEach(i),k(e,ne).forEach(i),x(e,ne,[])}
48async triggerLoad(){if(k(this,ie))return;x(this,ie,!0);const e=this;e.hostLoad&&await s(e.hostLoad,e),k(this,Q).length>0&&await Promise.allSettled(k(this,Q).map(s)),this.P.resolve(k(this,oe))}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&i(this.hostLoaded,this),k(this,Z).forEach(i),this.loadedCalled=!0)}triggerUpdate(e){this.hostUpdate&&i(this.hostUpdate,this,e),
49k(this,X).forEach(le,e)}triggerUpdated(e){this.hostUpdated&&i(this.hostUpdated,this,e),k(this,ee).forEach(le,e)}triggerDestroy(){this.hostDestroy&&i(this.hostDestroy,this),k(this,te).forEach(i)}triggerLifecycle(){this.hostLifecycle&&P(this,ce,ue).call(this,(()=>this.hostLifecycle())),k(this,re).forEach(P(this,ce,ue),this)}},pe=e=>{if("object"!=typeof e&&"function"!=typeof e||null===e)return e;const t=new Proxy(e,{get(e,r,n){if("exports"!==r&&"_exports"!==r||!(r in e)||e[r]!==t)return r in e||r in Promise.prototype||"symbol"==typeof r?"function"==typeof e?e[r]:Reflect.get(e,r,n):void 0}});return t};function he(e,t,r){me(e,t),t.set(e,r)}function me(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fe(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,be(e,t,"get"))}function ge(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function ye(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,be(e,t,"set"),r),r}function be(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}const ve=e=>{let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){const r=t;return r.manager?.loadedCalled||(r.J??r._offspring).push(e),(r.I??r._postLoad).promise}return!1},we={};function Se(){}const Ee=(e,t)=>function(r,n){if(!globalThis.customElements)return;const i=(n??r??{}).resourcesUrl;i&&e.setAssetPath(i);for(const[r,[n,i=""]]of Object.entries(t)){var s;if(customElements.get(r))continue;const[t,o,a]=i.split(";"),c=t?t?.split(",").map(Ie):void 0,u=c?.map((([e])=>e)),l=(s=class e extends Pe{constructor(){!e.B&&(e.B=n(),e.F()),super()}},s.observedAttributes=c?.map((([,e])=>e)).filter((e=>""!==e)),s.C=u,s.E=o?o?.split(","):void 0,s.D=a?.split(","),s.L=r,s.K=e,s);customElements.define(r,l)}},Te=Object.defineProperty,Ie=e=>{const t=e.split(":");return 1===t.length?[t[0],o(t[0])]:t},Ce=globalThis.HTMLElement??Se;var Ae=new WeakMap,Oe=new WeakMap,_e=new WeakMap,De=new WeakSet;class Pe extends Ce{constructor(){var e;super(),me(this,e=De),e.add(this),he(this,Ae,{writable:!0,value:void 0}),he(this,Oe,{writable:!0,value:void 0}),he(this,_e,{writable:!0,value:void 0}),ye(this,Oe,{}),ye(this,_e,[]),this.I=new n,this.H=new n,this.J=[];const t=this,r=t.constructor;t._offspring=t.J,t._postLoad=t.I,r.C?.forEach((e=>{Object.hasOwn(t,e)&&(fe(t,Oe)[e]=t[e],delete t[e])})),r.A?ge(t,De,ke).call(t,{a:r.A}):r.B.then((async e=>{await r.K.p,ge(t,De,ke).call(t,await(e.default?.then((e=>"function"==typeof e?{a:e}:e))??e))})).catch((e=>{t.H.reject(e),setTimeout((()=>{throw e}))}))}static F(){for(const e of this.C??[])Te(this.prototype,e,{configurable:!0,enumerable:!0,get(){return fe(this,Oe)[e]},set(t){fe(this,Oe)[e]=t}});for(const e of this.E??[])Te(this.prototype,e,{async value(...t){fe(this,Ae)||await this.H.promise;const r=fe(this,Ae);return await r[e](...t)},configurable:!0});for(const e of this.D??[])Te(this.prototype,e,{value(...t){return fe(this,Ae)[e](...t)},configurable:!0})}get manager(){return fe(this,Ae)?.manager}attributeChangedCallback(e,t,r){fe(this,Ae)?.attributeChangedCallback(e,t,r),fe(this,Ae)||fe(this,_e).push(e)}connectedCallback(){fe(this,Ae)?fe(this,Ae).connectedCallback?.():queueMicrotask((()=>this.G=ve(this)))}disconnectedCallback(){fe(this,Ae)?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}addController(){}requestUpdate(){fe(this,Ae)?.requestUpdate()}}function ke(e){const t=this.constructor,r=t.L,n=fe(this,Oe),i=Object.values(e).find((e=>e.L===r)),s=`${r}--lazy`;let o=i;for(;o&&!Object.hasOwn(o,"lumina");
49)o=Object.getPrototypeOf(o);Re(o),!t.A&&(t.A=i,customElements.define(s,i)),i.N=this;const a=document.createElement(s);i.N=void 0,ye(this,Ae,a),ye(this,Oe,a),fe(this,_e).forEach((e=>a.attributeChangedCallback(e,null,this.getAttribute(e)))),Object.entries(n).forEach(xe,a);const c=this.isConnected;(c||this.G)&&(a.connectedCallback?.(),c||a.disconnectedCallback())}function xe([e,t]){this[e]=t}Pe.lumina=!0;const Re=e=>{const t=e.prototype,r=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(e,t){r.setAttribute.call(this.el,e,t)},t.removeAttribute=function(e){r.removeAttribute.call(this.el,e)},Te(t,"isConnected",{get(){return Reflect.get(r,"isConnected",this.el)}}))};var Ue=r(495293);const Me=(0,Ue.XM)(class extends Ue.Xe{constructor(e){if(super(e),e.type!==Ue.pX.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return I.Jb}}),Ne="important",je=" !"+Ne,$e=(0,Ue.XM)(class extends Ue.Xe{constructor(e){if(super(e),e.type!==Ue.pX.ATTRIBUTE||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];return null==n?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const n=t[e];if(null!=n){this.ft.add(e);const t="string"==typeof n&&n.endsWith(je);e.includes("-")||t?r.setProperty(e,t?n.slice(0,-11):n,t?Ne:""):r[e]=n}}return I.Jb}});var Fe,Ge=r(569009);function Le(e,t){Ve(e,t),t.add(e)}function He(){return He="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Be(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},He.apply(this,arguments)}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function We(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function qe(e,t,r){Ve(e,t),t.set(e,r)}function Ve(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ke(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,Ye(e,t,"get"))}function ze(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,Ye(e,t,"set"),r),r}function Ye(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}(0,Ue.XM)(class extends Ue.Xe{constructor(e){if(super(e),e.type!==Ue.pX.PROPERTY&&e.type!==Ue.pX.ATTRIBUTE&&e.type!==Ue.pX.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(0,Ge.OR)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===I.Jb||t===I.Ld)return t;const r=e.element,n=e.name;if(e.type===Ue.pX.PROPERTY){if(t===r[n])return I.Jb}else if(e.type===Ue.pX.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(n))return I.Jb}else if(e.type===Ue.pX.ATTRIBUTE&&r.getAttribute(n)===t+"")return I.Jb;return(0,Ge.hl)(e),t}});
49var Je=new WeakMap,Qe=new WeakMap,Ze=new WeakMap;class Xe extends de{constructor(e){super(e),qe(this,Je,{writable:!0,value:void 0}),qe(this,Qe,{writable:!0,value:void 0}),qe(this,Ze,{writable:!0,value:void 0}),this.destroyed=!1,this.R=!1,this.V=I.Ld,this.T=[],ze(this,Ze,new WeakMap),ze(this,Qe,e),this.exports=void 0,this.hasDestroy=tt in e&&"function"==typeof e.destroy,A.prototype.addController.call(e,{hostConnected:()=>{if(this.destroyed){const t=e.el.localName;throw e.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${tt} prop.`)}void 0!==Ke(this,Je)&&clearTimeout(Ke(this,Je)),q();for(const t of e.M)"triggerConnected"in t?t.triggerConnected():i(t.hostConnected,t)},hostDisconnected:()=>{for(const t of e.M)"triggerDisconnected"in t?t.triggerDisconnected():i(t.hostDisconnected,t);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const t of e.M)"triggerUpdate"in t?t.triggerUpdate(this.Q):i(t.hostUpdate,t,this.Q)},hostUpdated:()=>{for(const t of e.M)"triggerUpdated"in t?t.triggerUpdated(this.Q):i(t.hostUpdated,t,this.Q);this.Q=void 0}}),queueMicrotask((()=>this.R=!0)),N(e)}async destroy(){if(!this.destroyed){Ke(this,Qe).el.isConnected&&(this.hasDestroy=!1,Ke(this,Qe).el.remove()),ze(this,Je,void 0),this.destroyed=!0;for(const e of Ke(this,Qe).M)"triggerDestroy"in e?e.triggerDestroy():i(e.hostDestroy,e);Ke(this,Qe).M.splice(0)}}U(){void 0!==Ke(this,Je)&&clearTimeout(Ke(this,Je)),Ke(this,Qe).el.isConnected||Ke(this,Qe).autoDestroyDisabled||ze(this,Je,((e,t)=>{const r=t>4e3?2e3:t/4;let n=0;const i=setInterval((()=>{n+=r,n>=t&&(clearInterval(i),e())}),r);return i})((()=>{Ke(this,Qe).destroy()}),et))}S(e,t){const r=this.T;this.V=I.Ld,this.T=[],r.forEach((r=>r(e,t)))}W(e,t){("object"==typeof t&&null!==t||"function"==typeof t)&&Ke(this,Ze).set(t,e)}X(e){return"object"==typeof e&&null!==e||"function"==typeof e?Ke(this,Ze).get(e):void 0}}let et=1e3;const tt="autoDestroyDisabled";var rt=new WeakMap,nt=new WeakMap,it=new WeakMap,st=new WeakMap,ot=new WeakMap,at=new WeakSet,ct=new WeakSet;class ut extends A{constructor(){super(),Le(this,ct),Le(this,at),qe(this,rt,{writable:!0,value:void 0}),qe(this,nt,{writable:!0,value:void 0}),qe(this,it,{writable:!0,value:void 0}),qe(this,st,{writable:!0,value:void 0}),qe(this,ot,{writable:!0,value:void 0}),this.M=[],this.manager=new Xe(this);const e=this,t=e.constructor,r=t.N,i=t.K.o,s=ut.prototype.shouldUpdate;ze(e,st,r?.H??new n),e.I=r?.I??new n,e.J=r?.J??[],e._offspring=e.J,e._postLoad=e.I,e.el=r??e,ze(e,it,e.enableUpdating),e.enableUpdating=Se,e.shouldUpdate!==s&&(ze(e,nt,e.shouldUpdate),e.shouldUpdate=s),i&&(ze(e,rt,new Map),t.elementProperties.forEach(((t,r)=>Ke(e,rt).set(r,i()))))}static finalizeStyles(e){const t=super.finalizeStyles(e),r=this.shadowRootOptions===we;return void 0===this.K?.commonStyles||r?t:[this.K.commonStyles,...t]}static createProperty(e,t){const r="number"==typeof t?t:Array.isArray(t)?t[0]:0,n=Array.isArray(t)?t[1]:void 0,i=n?.hasChanged??S,s={attribute:!!(1&r&&"string"==typeof e)&&o(e),reflect:!!(2&r),type:4&r?Boolean:8&r?Number:void 0,state:!!(16&r),readOnly:!!(32&r),noAccessor:!!(64&r),c:!1,...n,hasChanged(e,t){const r=i(e,t);return s.c=r,r}};super.createProperty(e,s)}static getPropertyDescriptor(e,t,r){const n=this.K,i=super.getPropertyDescriptor(e,t,r);return r.d=i,{...i,get(){return n.t?.(Ke(this,rt).get(e)),i.get?.call(this)},set(t){const n=this.manager;if(r.readOnly&&(n.R||n.connectedCalled))throw Error(`Cannot assign to read-only property "${e}" of ${this.el.localName}. Trying to assign "${t}"`);i.set.call(this,t??void 0),r.c&&Ke(this,rt)?.get(e)?.notify(),n.T.length>0&&n?.S(e,t)}}}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;const e=this.constructor.K.c?.((()=>this.requestUpdate()));ze(this,ot,e);const t=!this.manager.connectedCalled;super.connectedCallback(),t?queueMicrotask((()=>We(this,ct,dt).call(this).catch((e=>{Ke(this,st).reject(e),setTimeout((()=>{throw e}))})))):e&&this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),Ke(this,ot)?.destroy(),ze(this,ot,void 0)}createRenderRoot(){const e=this.el.shadowRoot,t=this.constructor,r=t.shadowRootOptions,n=e??(r===we?this.el:this.el.attachShadow(r));if(e)return A.prototype.createRenderRoot.call(this),e;if(this.isConnected){const e=n.getRootNode();e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t.elementStyles.map((e=>"styleSheet"in e?e.styleSheet:e))]}return n}shouldUpdate(e){return this.manager.Q=e,Ke(this,nt)?.call(this,e)??!0}update(e){Ke(this,ot)?We(this,at,lt).call(this,e):super.update(e)}listen(e,t,r){const n=t?.bind(this)??t;this.manager.onLifecycle((()=>(this.el.addEventListener(e,n,r),()=>this.el.removeEventListener(e,n,r))))}listenOn(e,t,r,n){const i=r?.bind(this)??r;this.manager.onLifecycle((()=>(e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n))))}async componentOnReady(){return await Ke(this,st).promise,this}addController(e){this.M.push(e),!(U in e)&&this.renderRoot&&this.el.isConnected&&e.hostConnected?.()}
49removeController(e){this.M.splice(this.M.indexOf(e),1),e.controllerRemoved?.()}}function lt(e){try{Ke(this,ot).clear(),this.constructor.K.r(Ke(this,ot),(()=>He(Be(Fe.prototype),"update",this).call(this,e)))}catch(e){throw Ke(this,ot).clear(),e}}async function dt(){const e=this.el.G??ve(this.el);e&&await e;const t=[];for(const e of this.M)"triggerLoad"in e?t.push(e.triggerLoad()):t.push(s(e.hostLoad,e));await Promise.all(t),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate((e=>e.has(tt)&&this.manager.U())),Ke(this,it).call(this,!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();const r=this.J.filter((e=>!e.manager?.loadedCalled));r.length&&await Promise.allSettled(r.map((async e=>await e.componentOnReady()))),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const e of this.M)"triggerLoaded"in e?e.triggerLoaded():i(e.hostLoaded,e);this.loaded?.(),Ke(this,st).resolve()}(Fe=ut).lumina=!0;const pt=e=>{let t;const r=e=>{t=new URL(e,globalThis.location?.href||void 0).href},n={...e,getAssetPath(e){const r=new URL(e,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:r,customElement(e,t){t.K=n,t.L=e,customElements.get(e)||customElements.define(e,t)}};return r(e.defaultAssetPath),n},ht=e=>"object"==typeof e&&null!=e?Me(e):e,mt=e=>"object"==typeof e&&null!=e?$e(e):e;class ft extends Ue.Xe{update(e){const t=e.element.localName;customElements.get(t)||yt.get(t)?.()}render(){return I.Jb}}const gt=(0,Ue.XM)(ft)(),yt=new Map,bt=I.Ld},917112:(e,t,r)=>{"use strict";r.d(t,{ec:()=>u,i1:()=>l,iv:()=>c});const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,s)},u=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,s))(t)})(e):e},569009:(e,t,r)=>{"use strict";r.d(t,{OR:()=>s,hl:()=>a});var n=r(322601);const{I:i}=n._$LH,s=e=>void 0===e.strings,o={},a=(e,t=o)=>e._$AH=t},495293:(e,t,r)=>{"use strict";r.d(t,{XM:()=>i,Xe:()=>s,pX:()=>n});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=e=>(...t)=>({_$litDirective$:e,values:t});class s{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},322601:(e,t,r)=>{"use strict";r.d(t,{Jb:()=>C,Ld:()=>A,_$LH:()=>G,dy:()=>I,sY:()=>H});const n=globalThis,i=n.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,o="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,c="?"+a,u=`<${c}>`,l=document,d=()=>l.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,h=Array.isArray,m=e=>h(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,b=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,S=/"/g,E=/^(?:script|style|textarea|title)$/i,T=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}
vendor: 5,599 bytes, line 49
49),I=T(1),C=(T(2),T(3),Symbol.for("lit-noChange")),A=Symbol.for("lit-nothing"),O=new WeakMap,_=l.createTreeWalker(l,129);function D(e,t){if(!h(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(t):t}const P=(e,t)=>{const r=e.length-1,n=[];let i,s=2===t?"<svg>":3===t?"<math>":"",c=g;for(let t=0;t<r;t++){const r=e[t];let l,d,p=-1,h=0;for(;h<r.length&&(c.lastIndex=h,d=c.exec(r),null!==d);)h=c.lastIndex,c===g?"!--"===d[1]?c=y:void 0!==d[1]?c=b:void 0!==d[2]?(E.test(d[2])&&(i=RegExp("</"+d[2],"g")),c=v):void 0!==d[3]&&(c=v):c===v?">"===d[0]?(c=i??g,p=-1):void 0===d[1]?p=-2:(p=c.lastIndex-d[2].length,l=d[1],c=void 0===d[3]?v:'"'===d[3]?S:w):c===S||c===w?c=v:c===y||c===b?c=g:(c=v,i=void 0);const m=c===v&&e[t+1].startsWith("/>")?" ":"";s+=c===g?r+u:p>=0?(n.push(l),r.slice(0,p)+o+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[D(e,s+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class k{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,u=0;const l=e.length-1,p=this.parts,[h,m]=P(e,t);if(this.el=k.createElement(h,r),_.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=_.nextNode())&&p.length<l;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(o)){const t=m[u++],r=n.getAttribute(e).split(a),i=/([.?@])?(.*)/.exec(t);p.push({type:1,index:s,name:i[2],strings:r,ctor:"."===i[1]?N:"?"===i[1]?j:"@"===i[1]?$:M}),n.removeAttribute(e)}else e.startsWith(a)&&(p.push({type:6,index:s}),n.removeAttribute(e));if(E.test(n.tagName)){const e=n.textContent.split(a),t=e.length-1;if(t>0){n.textContent=i?i.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],d()),_.nextNode(),p.push({type:2,index:++s});n.append(e[t],d())}}}else if(8===n.nodeType)if(n.data===c)p.push({type:2,index:s});else{let e=-1;for(;-1!==(e=n.data.indexOf(a,e+1));)p.push({type:7,index:s}),e+=a.length-1}s++}}static createElement(e,t){const r=l.createElement("template");return r.innerHTML=e,r}}function x(e,t,r=e,n){if(t===C)return t;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const s=p(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(e),i._$AT(e,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(t=x(e,i._$AS(e,t.values),i,n)),t}class R{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??l).importNode(t,!0);_.currentNode=n;let i=_.nextNode(),s=0,o=0,a=r[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new U(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new F(i,this,e)),this._$AV.push(t),a=r[++o]}s!==a?.index&&(i=_.nextNode(),s++)}return _.currentNode=l,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class U{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=x(this,e,t),p(e)?e===A||null==e||""===e?(this._$AH!==A&&this._$AR(),this._$AH=A):e!==this._$AH&&e!==C&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):m(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==A&&p(this._$AH)?this._$AA.nextSibling.data=e:this.T(l.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=k.createElement(D(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new R(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=O.get(e.strings);return void 0===t&&O.set(e.strings,t=new k(e)),t}k(e){h(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new U(this.O(d()),this.O(d()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=A,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=A}_$AI(e,t=this,r,n){const i=this.strings;let s=!1;if(void 0===i)e=x(this,e,t,0),s=!p(e)||e!==this._$AH&&e!==C,s&&(this._$AH=e);else{const n=e;let o,a;for(e=i[0],o=0;o<i.length-1;o++)a=x(this,n[r+o],t,o),a===C&&(a=this._$AH[o]),s||=!p(a)||a!==this._$AH[o],a===A?e=A:e!==A&&(e+=(a??"")+i[o+1]),this._$AH[o]=a}s&&!n&&this.j(e)}j(e){e===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class N extends M{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A?void 0:e}}class j extends M{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==A)}}class $ extends M{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}
49_$AI(e,t=this){if((e=x(this,e,t,0)??A)===C)return;const r=this._$AH,n=e===A&&r!==A||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==A&&(r===A||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class F{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){x(this,e)}}const G={M:o,P:a,A:c,C:1,L:P,R:R,D:m,V:x,I:U,H:M,N:j,U:$,B:N,F:F},L=n.litHtmlPolyfillSupport;L?.(k,U),(n.litHtmlVersions??=[]).push("3.3.0");const H=(e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new U(t.insertBefore(d(),e),e,void 0,r??{})}return i._$AI(e),i}},621450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Sanitizer:()=>ie,default:()=>ie});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i={exports:{}},s={},o={exports:{}},a={};var c=/javascript\s*\:/gim;a.whiteList={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice"
49:!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1},a.getDefaultWhiteList=function(){return{"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice"
49:!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1}},a.onAttr=function(e,t,r){},a.onIgnoreAttr=function(e,t,r){},a.safeAttrValue=function(e,t){return c.test(t)?"":t};var u=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},l=a,d=function(e,t){";"!==(e=function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}(e))[e.length-1]&&(e+=";");var r=e.length,n=!1,i=0,s=0,o="";function a(){if(!n){var r=u(e.slice(i,s)),a=r.indexOf(":");if(-1!==a){var c=u(r.slice(0,a)),l=u(r.slice(a+1));if(c){var d=t(i,o.length,c,l,r);d&&(o+=d+"; ")}}}i=s+1}for(;s<r;s++){var c=e[s];if("/"===c&&"*"===e[s+1]){var l=e.indexOf("*/",s+2);if(-1===l)break;i=(s=l+1)+1,n=!1}else"("===c?n=!0:")"===c?n=!1:";"===c?n||a():"\n"===c&&a()}return u(o)};function p(e){return null==e}function h(e){(e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{})).whiteList=e.whiteList||l.whiteList,e.onAttr=e.onAttr||l.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||l.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||l.safeAttrValue,this.options=e}h.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onAttr,i=t.onIgnoreAttr,s=t.safeAttrValue;return d(e,(function(e,t,o,a,c){var u=r[o],l=!1;if(!0===u?l=u:"function"==typeof u?l=u(a):u instanceof RegExp&&(l=u.test(a)),!0!==l&&(l=!1),a=s(o,a)){var d,h={position:t,sourcePosition:e,source:c,isWhite:l};return l?p(d=n(o,a,h))?o+":"+a:d:p(d=i(o,a,h))?void 0:d}}))};var m=h;!function(e,t){var r=a,n=m;for(var i in(t=e.exports=function(e,t){return new n(t).process(e)}).FilterCSS=n,r)t[i]=r[i]}
vendor: 9,248 bytes, line 49
49(o,o.exports);var f=o.exports,g={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},y=f.FilterCSS,b=f.getDefaultWhiteList,v=g,w=new y;function S(e){return e.replace(E,"&lt;").replace(T,"&gt;")}var E=/</g,T=/>/g,I=/"/g,C=/&quot;/g,A=/&#([a-zA-Z0-9]*);?/gim,O=/&colon;?/gim,_=/&newline;?/gim,D=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,P=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,k=/u\s*r\s*l\s*\(.*/gi;function x(e){return e.replace(I,"&quot;")}function R(e){return e.replace(C,'"')}function U(e){return e.replace(A,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function M(e){return e.replace(O,":").replace(_," ")}function N(e){for(var t="",r=0,n=e.length;r<n;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return v.trim(t)}function j(e){return N(e=M(e=U(e=R(e))))}function $(e){return S(e=x(e))}s.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},s.getDefaultWhiteList=function(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}},s.onTag=function(e,t,r){},s.onIgnoreTag=function(e,t,r){},s.onTagAttr=function(e,t,r){},s.onIgnoreTagAttr=function(e,t,r){},s.safeAttrValue=function(e,t,r,n){if(r=j(r),"href"===t||"src"===t){if("#"===(r=v.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===t){if(D.lastIndex=0,D.test(r))return""}else if("style"===t){if(P.lastIndex=0,P.test(r))return"";if(k.lastIndex=0,k.test(r)&&(D.lastIndex=0,D.test(r)))return"";!1!==n&&(r=(n=n||w).process(r))}return $(r)},s.escapeHtml=S,s.escapeQuote=x,s.unescapeQuote=R,s.escapeHtmlEntities=U,s.escapeDangerHtml5Entities=M,s.clearNonPrintableCharacter=N,s.friendlyAttrValue=j,s.escapeAttrValue=$,s.onIgnoreTagStripAll=function(){return""},s.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var r=!Array.isArray(e),n=[],i=!1;return{onIgnoreTag:function(s,o,a){if(function(t){return!!r||-1!==v.indexOf(e,t)}(s)){if(a.isClosing){var c=a.position+10;return n.push([!1!==i?i:a.position,c]),i=!1,"[/removed]"}return i||(i=a.position),"[removed]"}return t(s,o,a)},remove:function(e){var t="",r=0;return v.forEach(n,(function(n){t+=e.slice(r,n[0]),r=n[1]})),t+=e.slice(r)}}},s.stripCommentTag=function(e){for(var t="",r=0;r<e.length;){var n=e.indexOf("\x3c!--",r);if(-1===n){t+=e.slice(r);break}t+=e.slice(r,n);var i=e.indexOf("--\x3e",n);if(-1===i)break;r=i+3}return t},s.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)}))).join("")},s.cssFilter=w,s.getDefaultCSSWhiteList=b;var F={},G=g;function L(e){var t,r=G.spaceIndex(e);return t=-1===r?e.slice(1,-1):e.slice(1,r+1),"/"===(t=G.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}function H(e){return"</"===e.slice(0,2)}var B=/[^a-zA-Z0-9\\_:.-]/gim;function W(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"="===r?t:-1}}function q(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"'"===r||'"'===r?t:-1}}function V(e,t){for(;t>0;t--){var r=e[t];if(" "!==r)return"="===r?t:-1}}function K(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}F.parseTag=function(e,t,r){var n="",i=0,s=!1,o=!1,a=0,c=e.length,u="",l="";e:for(a=0;a<c;a++){var d=e.charAt(a);if(!1===s){if("<"===d){s=a;continue}}else if(!1===o){if("<"===d){n+=r(e.slice(i,a)),s=a,i=a;continue}if(">"===d){n+=r(e.slice(i,s)),u=L(l=e.slice(s,a+1)),n+=t(s,n.length,u,l,H(l)),i=a+1,s=!1;continue}if('"'===d||"'"===d)for(var p=1,h=e.charAt(a-p);""===h.trim()||"="===h;){if("="===h){o=d;continue e}h=e.charAt(a-++p)}}else if(d===o){o=!1;continue}}return i<e.length&&(n+=r(e.substr(i))),n},F.parseAttr=function(e,t){var r=0,n=0,i=[],s=!1,o=e.length;function a(e,r){if(!((e=(e=G.trim(e)).replace(B,"").toLowerCase()).length<1)){var n=t(e,r||"");n&&i.push(n)}}for(var c=0;c<o;c++){var u,l=e.charAt(c);if(!1!==s||"="!==l)if(!1===s||c!==n){if(/\s|\n|\t/.test(l)){if(e=e.replace(/\s|\n|\t/g," "),!1===s){if(-1===(u=W(e,c))){a(G.trim(e.slice(r,c))),s=!1,r=c+1;continue}c=u-1;continue}if(-1===(u=V(e,c-1))){a(s,K(G.trim(e.slice(r,c)))),s=!1,r=c+1;continue}}}else{if(-1===(u=e.indexOf(l,c+1)))break;a(s,G.trim(e.slice(n+1,u))),s=!1,r=(c=u)+1}else s=e.slice(r,c),r=c+1,n='"'===e.charAt(r)||"'"===e.charAt(r)?r:q(e,c+1)}return r<e.length&&(!1===s?a(e.slice(r)):a(s,K(G.trim(e.slice(r))))),G.trim(i.join(" "))};var z=f.FilterCSS,Y=s,J=F,Q=J.parseTag,Z=J.parseAttr,X=g;function ee(e){return null==e}function te(e){(e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=Y.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=function(e){var t={};for(var r in e)Array.isArray(e[r])?t[r.toLowerCase()]=e[r].map((function(e){return e.toLowerCase()})):t[r.toLowerCase()]=e[r];return t}(e.whiteList||e.allowList):e.whiteList=Y.whiteList,e.onTag=e.onTag||Y.onTag,e.onTagAttr=e.onTagAttr||Y.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||Y.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||Y.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||Y.safeAttrValue,e.escapeHtml=e.escapeHtml||Y.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new z(e.css))}te.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onTag,i=t.onIgnoreTag,s=t.onTagAttr,o=t.onIgnoreTagAttr,a=t.safeAttrValue,c=t.escapeHtml,u=this.cssFilter;t.stripBlankChar&&(e=Y.stripBlankChar(e)),t.allowCommentTag||(e=Y.stripCommentTag(e));var l=!1;t.stripIgnoreTagBody&&(l=Y.StripTagBody(t.stripIgnoreTagBody,i),i=l.onIgnoreTag);var d=Q(e,(function(e,t,l,d,p){var h={sourcePosition:e,position:t,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(r,l)},m=n(l,d,h);if(!ee(m))return m;if(h.isWhite){if(h.isClosing)return"</"+l+">";var f=function(e){var t=X.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var r="/"===(e=X.trim(e.slice(t+1,-1)))[e.length-1];return r&&(e=X.trim(e.slice(0,-1))),{html:e,closing:r}}(d),g=r[l],y=Z(f.html,(function(e,t){var r=-1!==X.indexOf(g,e),n=s(l,e,t,r);return ee(n)?r?(t=a(l,e,t,u))?e+'="'+t+'"':e:ee(n=o(l,e,t,r))?void 0:n:n}));return d="<"+l,y&&(d+=" "+y),f.closing&&(d+=" /"),d+">"}return ee(m=i(l,d,h))?c(d):m}),c);return l&&(d=l.remove(d)),d};var re=te;!function(e,t){var r=s,n=F,i=re;function o(e,t){return new i(t).process(e)}
49(t=e.exports=o).filterXSS=o,t.FilterXSS=i,function(){for(var e in r)t[e]=r[e];for(var i in n)t[i]=n[i]}(),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}(i,i.exports);var ne=i.exports,ie=function(){function e(e,t){var r,i=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],details:["style"],div:["align","style","aria-label","aria-hidden"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=n(n({},ne.getDefaultCSSWhiteList()),{flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,"line-height":!0,"justify-content":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(e,t,r,n){return"a"===e&&"href"===t||("img"===e||"source"===e)&&"src"===t?i.sanitizeUrl(r):ne.safeAttrValue(e,t,r,n)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"},e&&!t?r=e:e&&t?((r=Object.create(this.arcgisFilterOptions)).css={whiteList:this.arcgisCSSWhiteList},Object.keys(e).forEach((function(t){if("whiteList"===t)r.whiteList=i._extendObjectOfArrays([i.arcgisWhiteList,e.whiteList||{}]);else if("css"===t){var n=e.css.whiteList;null!=n&&e.css instanceof Object&&Object.keys(n).forEach((function(e){return r.css.whiteList[e]=n[e]}))}else r[t]=e[t]}))):((r=Object.create(this.arcgisFilterOptions)).whiteList=this.arcgisWhiteList,r.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=r,this._xssFilter=new ne.FilterXSS(r)}
50return e.prototype.sanitize=function(e,t){switch(void 0===t&&(t={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,t);default:if(t.allowUndefined&&void 0===e)return;return null}},e.prototype.sanitizeUrl=function(e,t){var r=(null!=t?t:{}).isProtocolRequired,n=void 0===r||r,i=this._trim(e.substring(0,e.indexOf(":"))),s="/"===e,o=/^#/.test(e),a=i&&this.allowedProtocols.indexOf(i.toLowerCase())>-1;return s||o||a?ne.escapeAttrValue(e):i||n?"":ne.escapeAttrValue("https://".concat(e))},e.prototype.sanitizeHTMLAttribute=function(e,t,r,n){return"function"==typeof this.xssFilterOptions.safeAttrValue?this.xssFilterOptions.safeAttrValue(e,t,r,n):ne.safeAttrValue(e,t,r,n)},e.prototype.validate=function(e,t){void 0===t&&(t={});var r=this.sanitize(e,t);return{isValid:e===r,sanitized:r}},e.prototype.encodeHTML=function(e){var t=this;return String(e).replace(/[&<>"'\/]/g,(function(e){return t._entityMap[e]}))},e.prototype.encodeAttrValue=function(e){var t=/^[a-zA-Z0-9]$/;return String(e).replace(/[\x00-\xFF]/g,(function(r,n){return t.test(r)?r:"&#x".concat(Number(e.charCodeAt(n)).toString(16),";")}
50))},e.prototype._extendObjectOfArrays=function(e){var t={};return e.forEach((function(e){Object.keys(e).forEach((function(r){Array.isArray(e[r])&&Array.isArray(t[r])?t[r]=t[r].concat(e[r]):t[r]=e[r]}))})),t},e.prototype._iterateOverObject=function(e,t){var r=this;void 0===t&&(t={});try{var n=!1,i=void 0;if(Array.isArray(e))i=e.reduce((function(e,i){var s=r.validate(i,t);return s.isValid?e.concat([i]):(n=!0,e.concat([s.sanitized]))}),[]);else{if(!function(e){if("object"!=typeof e||null===e)return!1;if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)){if(t.allowUndefined&&void 0===e)return;return null}i=Object.keys(e).reduce((function(i,s){var o=e[s],a=r.validate(o,t);return a.isValid?i[s]=o:(n=!0,i[s]=a.sanitized),i}),{})}return n?i:e}catch(e){return null}},e.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},e}()},326404:(e,t,r)=>{"use strict";function n(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map((function(e){e(r)})),(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}}}r.r(t),r.d(t,{default:()=>n})},516873:e=>{"use strict";e.exports=JSON.parse('{"category":{"CONTENT":"Content","INTERACTION":"Interaction","GROUPS":"Groups","NAVIGATION":"Navigation","USERS":"Users","ORG":"Org","CATALOG":"Catalog"},"action":{"DOWNLOAD":"Download","VIEW":"View","OPEN":"Open","SHARE":"Share","ZOOM":"Zoom","CLOSE":"Close","SEARCH":"Search","UPDATE":"Update","EXTERNAL":"External","DELETE":"Delete","VIEWED":"Viewed","CREATE":"Create","ENABLE":"Enable","DISABLE":"Disable","SELECT":"Select","DRAW":"Draw","DESELECT":"Deselect","EDIT":"Edit","ON_PAGE":"On-Page","NEW":"New","ALERT":"Alert","SUBSCRIBE":"Subscribe","HOME":"Home","ADD":"Add","REMOVE":"Remove","MANAGE":"Manage","AUTHENTICATE":"Authenticate","ALLOW":"Allow","BLOCK":"Block","JOIN":"Join","LEAVE":"Leave","CANCEL":"Cancel","COPY":"Copy","BROWSE":"Browse"},"label":{"CONTENT":"Content","POPOVER":"Popover","LINK":"Link","IN":"In","OUT":"Out","POST_LIST":"Post List","THREAD":"Thread","PANEL":"Panel","QUERY":"Query","CATEGORY_CARD":"Category Card","SEARCH":"Search","TO":"To","HUB_STATUS":"Hub Status","RECENTS":"Recents","EMPTY":"Empty","EDITOR":"Editor","POST":"Post","TABLE":"Table","USERS":"Users","GROUPS":"Groups","DRAW":"Draw","SELECT":"Select","START":"Start","COMPLETE":"Complete","DELETE":"Delete","FILTER":"Filter","UPDATE":"Update","MODAL":"Modal","ITEM_DETAILS":"Item Details","UPLOAD":"Upload","URL":"URL","FILTERS":"Filters","PROFILE":"Profile","THUMBNAIL":"Thumbnail","OVERVIEW":"Overview","TEAMS":"Teams","FAVORITES":"Favorites","BIO":"Bio","CLICK":"Click","LOAD_MORE":"Load More","LOCATIONS":"Locations","ABOUT":"About","EXPLORE":"Explore","BACK_TO_TOP":"Back to Top","ADD_LOCATION":"Add Location","LOCATION":"Location","STEPPER":"Stepper","NOTIFICATIONS":"Notifications","VIEW":"View","SETTINGS":"Settings","WARNING":"Warning","POP_UP":"Pop-Up","WEB_HELP":"Web Help","ACCORDION":"Accordion","CHART":"Chart","WHATS_NEW":"Whats New","TOOLTIP":"Tooltip","STATUS":"Status","REACTION":"Reaction","REPLY":"Reply","NEWSLETTER":"Newsletter","CHANGELOG":"Changelog","ARC_GIS_BLOG":"ArcGIS Blog","HUB_OVERVIEW":"Hub Overview","IMAGE":"Image","STEP":"Step","COLLAPSE":"Collapse","DESCRIPTION":"Description","SUMMARY":"Summary","TIMELINE":"Timeline","FEATURED_CONTENT":"Featured Content","ACCESS":"Access","ALERT":"Alert","CUSTOMER_FEEDBACK":"Customer Feedback","ARC_GIS_ONLINE":"ArcGIS Online","DROPDOWN":"Dropdown","ACTION":"Action","FEEDS":"Feeds","ORGS":"Orgs","MENU":"Menu","SIDE_PANEL":"Side Panel","SIGNOUT":"Signout","LAYOUT":"Layout","SITE":"Site","TEMPLATE":"Template","CATALOG_CONFIGURATION":"Catalog Configuration","PAGE":"Page","UPDATE_CACHE":"Update cache","NO_LOCATION":"No Location","ORGANIZATIONS_EXTENT":"Organization\'s Extent","CUSTOM_LOCATION":"Custom Location","DISCUSSIONS":"Discussions","TAGS":"Tags","CHANNEL":"Channel","DISCUSSION_BOARD_VIEW":"Discussion Board View","CHECK_FOR_ERRORS":"Check for errors","ADVANCED":"Advanced","MEMBERSHIP_ACCESS":"Membership Access","CONTENT_CONTRIBUTION":"Content Contribution","FOLLOW_TAB":"Follow Tab","NOTICE":"Notice","PRIVACY":"Privacy","METRIC":"Metric","SEARCH_POSTS":"Search Posts","RECENT":"Recent","SUGGEST"
50:"Suggest","WORKSPACE":"Workspace","CALL_TO_ACTION":"Call to Action","METRICS":"Metrics","LAYOUT_EDITOR":"Layout Editor","HOME":"Home","GROUP":"Group","PROTECT":"Protect","UNPROTECT":"Unprotect","PERMANENTLY_DELETE":"Permanently Delete","ARC_GIS_APPLICATION":"ArcGIS Application","DRAFT":"Draft","MEMBERS":"Members","OPT_OUT":"Opt-out","EVENT":"Event","SCHEDULE":"Schedule","OPTIONS":"Options","ACTIVITY":"Activity","ASSOCIATION":"Association","PROJECTS":"Projects","INITIATIVES":"Initiatives","CARD":"Card","SHEET":"Sheet","REGISTRANTS":"Registrants","REGISTER":"Register","UNREGISTER":"Unregister","INPUT":"Input","ADD":"Add","NEW_FILTER":"New filter","NEW_COLLECTION":"New collection","ITEMS":"Items","EVENTS":"Events","APPEARANCE":"Appearance","DETAILS":"Details","CSV":"CSV","BROWSE_TEMPLATES":"Browse Templates","INDEX":"Index","SLUG":"Slug","MIGRATE":"Migrate","CATALOG":"Catalog","HOME_APP":"Home App","ENTITY_VIEW":"Entity View","GALLERY":"Gallery"},"details":{"DCAT":"DCAT","DCAT_US_1_1":"DCAT-US-1.1","DCAT_AP_2_0_1":"DCAT-AP-2.0.1","SHARE":"Share","CACHE":"Cache","EXPORT":"Export","LEGEND":"Legend","FOCUS":"Focus","LOSE_FOCUS":"Lose Focus","THREAD":"Thread","POST_LIST":"Post List","DETAILS":"Details","PROFILE":"Profile","OPTIONS":"Options","SELECT_TOOL":"Select Tool","POLYGON":"Polygon","POLYLINE":"Polyline","POINT":"Point","CLEAR":"Clear","UPDATE":"Update","HELP":"Help","RECENTS":"Recents","ADD_POST":"Add Post","ADD_CONTENT":"Add Content","NEW_CONTENT":"New Content","ADD_EXISTING_CONTENT":"Add Existing Content","ABOUT":"About","HOSTED_DOWNLOADS_DISABLED":"Hosted Downloads Disabled","HOSTED_DOWNLOADS_ENABLED":"Hosted Downloads Enabled","LIBRARY":"Library","SOURCE_PROJECT_SEARCH":"Source: Project Search","APP":"App","FEEDBACK":"Feedback","TEMPLATE":"Template","EVENT":"Event","MORE":"More","LESS":"Less","RESET":"Reset","DATE_UPDATED":"Date Updated","CREATE_PROJECT":"Create Project","REPLY":"Reply","BODY_ACTION":"Body Action","SOURCE_SEARCH":"Source: Search","SEARCH_API_EXPLORER":"Search API Explorer","HUB_SITE_OGC_API_LANDING_PAGE":"Hub Site OGC API Landing Page","LINE":"Line","MANAGE_PREFERENCES":"Manage Preferences","ENABLED":"Enabled","DISABLED":"Disabled","ALL_POSTS":"All Posts","EMAIL_NOTIFICATIONS":"Email Notifications","POST_ACTIVITY":"Post Activity","DISCUSSION_OPTIONS":"Discussion Options","ALLOW_DISCUSSIONS":"Allow Discussions","BLOCK_DISCUSSIONS":"Block Discussions","DISCUSSIONS_BLOCKED":"Discussions Blocked","FEEDS":"Feeds","POST":"Post","LOCATION":"Location","ATTRIBUTES":"Attributes","ATTRIBUTE":"Attribute","EXIT_MODAL":"Exit modal","ACCEPT_MODAL":"Accept modal","OPEN_MODAL":"Open modal","CHIP_COMPONENT_WITH_STRING_HIDDEN":"Chip Component with string Hidden","HIDE":"Hide","SHOW":"Show","SMILING_FACE":"Smiling face","CONFUSED_FACE":"Confused face","GRINNING_FACE":"Grinning face","LAUGHING_FACE":"Laughing face","FACE_WITH_TEARS_OF_JOY":"Face with tears of joy","THINKING_FACE":"Thinking face","WINKING_FACE":"Winking face","PARTYING_FACE":"Partying face","SAD_FACE":"Sad face","SHOCKED_FACE":"Shocked face","THUMBS_UP":"Thumbs up","THUMBS_DOWN":"Thumbs down","CLAPPING_HANDS":"Clapping hands","RAISING_HANDS":"Raising hands","WAVING_HAND":"Waving hand","RED_HEART":"Red heart","HUNDRED_POINTS":"Hundred points","FIRE":"Fire","PARTY_POPPER":"Party popper","ROCKET":"Rocket","UP_ARROW":"Up arrow","DOWN_ARROW":"Down arrow","EYES":"Eyes","TROPHY":"Trophy","WORLD_MAP":"World map","REACTION_OVERFLOW":"Reaction overflow","ADD_REACTION":"Add reaction","SWITCH_TO_CLASSIC_VIEW":"Switch to classic view","BANNER_DISMISS":"Banner dismiss","ENABLE_WEEKLY_REPORT":"Enable Weekly Report","DISABLE_WEEKLY_REPORT":"Disable Weekly Report","SITE":"Site","ADD_GROUPS":"Add Groups","ADD_USERS":"Add Users","FEATURES_POINTS":"Features: points","FEATURES_LINES":"Features: lines","FEATURES_POLYGONS":"Features: polygons","POINTS_POINTS":"Points: points","POINTS_LINES":"Points: lines","POINTS_POLYGONS":"Points: polygons","COMPLETE":"Complete","EMPTY":"Empty","STEPS":"Steps","TIMELINE":"Timeline","PUBLIC":"Public","ORG":"Org","SHARED":"Shared","PRIVATE":"Private","PROJECT_WORKSPACE_INTRO_NOTICE":"Project Worksp
50ace Intro Notice","LEARN_MORE_ABOUT_HUB_PROJECTS":"Learn more about Hub Projects","HUB_PROJECT_FEEDBACK_SURVEY":"Hub Project Feedback Survey","REMOVE_EDIT_GROUPS":"Remove Edit Groups","REMOVE_VIEW_GROUPS":"Remove View Groups","ORGANIZATION":"Organization","ADD_VIEW_GROUPS":"Add View Groups","ADD_EDIT_GROUPS":"Add Edit Groups","DELETE_CONTENT":"Delete Content","ENABLE_FOR_ALL_USERS":"Enable for all users","ENABLE_BETA_VIEW":"Enable beta view","DISABLE_BETA_VIEW":"Disable beta view","CLEAR_ALL":"Clear all","ACTIVITY_ENABLED":"Activity Enabled","ACTIVITY_DISABLED":"Activity Disabled","ENABLE_OR_DISABLE_HUB_ACTIVITY_TRACKING":"Enable or Disable Hub Activity Tracking","OVERFLOW":"Overflow","EXPORT_CATALOG":"Export catalog","EXPORT_SEARCH_RESULTS":"Export search results","WEEKLY":"Weekly","HUB_FEEDS":"Hub feeds","FEEDS_API_EXPLORER":"Feeds API Explorer","LAYOUT_EDITOR":"Layout Editor","WORKSPACE":"Workspace","PUBLISHED_DRAFT":"Published Draft","PREVIEW_DRAFT":"Preview Draft","OVERVIEW":"Overview","VIEW":"View","USER":"User","SHARING":"Sharing","DRAFT":"Draft","CLONE":"Clone","ADD_CATALOG_GROUPS":"Add Catalog Groups","REMOVE_CATALOG_GROUPS":"Remove Catalog Groups","PUBLISH":"Publish","CONFIGURE_EMPTY_CATALOG":"Configure empty catalog","APPLICATION_EDITOR":"Application Editor","ADD":"Add","REMOVE":"Remove","CREATE_DISCUSSION_BOARD":"Create Discussion Board","ADD_CHANNEL":"Add Channel","FEATURED_CHANNEL":"Featured Channel","MAP_VIEW":"Map View","GRID_VIEW":"Grid View","LIST_VIEW":"List View","REMOVE_PARTICIPANT_GROUP":"Remove Participant Group","REHARVEST":"Reharvest","MANAGERS":"Managers","ALL":"All","ON":"On","OFF":"Off","PRIVACY":"Privacy","NECESSARY":"Necessary","FUNCTIONAL":"Functional","PERFORMANCE":"Performance","TARGETING":"Targeting","FUNCTIONAL_PERFORMANCE":"Functional, Performance","FUNCTIONAL_TARGETING":"Functional, Targeting","PERFORMANCE_TARGETING":"Performance, Targeting","LEARN_MORE_ABOUT_HUB_INITIATIVES":"Learn more about Hub Initiatives","INVITE":"Invite","VIEW_DISCUSSION_BOARD":"View Discussion Board","UPDATE_DISCUSSION_BOARD_SETTINGS":"Update Discussion Board Settings","CREATE_INITIATIVE":"Create Initiative","ADD_CHANNELS":"Add Channels","ADD_ALLOWED_CHANNEL":"Add allowed channel","DISCUSSION":"Discussion","DISABLE_WORKSPACE":"Disable Workspace","ENABLE_WORKSPACE":"Enable Workspace","ROLE_MEMBER":"Role: Member","ROLE_MANAGER":"Role: Manager","METRIC":"Metric","CREATE":"Create","DELETE":"Delete","FEATURED":"Featured","CREATE_GROUP":"Create Group","SURVEY_123":"Survey123","UNSUPPORTED_DEVICE":"Unsupported device","SOURCE_INITIATIVE_SEARCH":"Source: Initiative Search","DOWNLOAD_ERROR_MESSAGE":"Download error message","ABOUT_WORKSPACES":"About workspaces","INTRODUCING_WORKSPACES":"Introducing workspaces","SETTINGS":"Settings","PHASE_1_WORKSPACES":"Phase 1 workspaces","INITIATIVES_V_2_ANNOUNCEMENT":"Initiatives v2 Announcement","RE_INTRODUCING_HUB_INITIATIVES":"Re-Introducing — Hub Initiatives","MY_CONTENT":"My Content","MY_ORGANIZATION":"My Organization","FORCE_UPDATE":"Force update","AUTOMATIC":"Automatic","DAILY":"Daily","MONTHLY":"Monthly","YEARLY":"Yearly","MANUAL":"Manual","SELECT_GROUPS":"Select groups","CONFIRM":"Confirm","SELECT_CONTENT":"Select content","FAILURE":"Failure","SUCCESS":"Success","MANAGER":"Manager","MEMBER":"Member","SLOW_SERVICE":"Slow service","DOWN_SERVICE":"Down service","MAP":"Map","INFO":"Info","LAYER_LIST":"Layer List","FILTERS":"Filters","AUTH_REQUIRED":"Auth Required","EXTERNAL_URL":"External URL","GENERATE":"Generate","GENERATE_DOWNLOAD":"Generate download","SCHEDULE":"Schedule","UPDATE_SCHEDULE":"Update Schedule","SOLUTIONS_TEMPLATE":"Solutions Template","ACTIVATION_WITH_GROUPS":"Activation with Groups","INITIATIVE_TEMPLATES":"Initiative Templates","TEMPLATES":"Templates","COMMUNITY":"Community","REBUILD_INDEX":"Rebuild index","DCAT_AP_2_1_1":"DCAT-AP-2.1.1","MIGRATE_PAGE":"Migrate page","PAGE":"Page","EDIT_CHANNEL":"Edit channel","VIEW_CHANNEL":"View channel","DELETE_CATALOG":"Delete catalog","CONNECTED":"Connected","RELATED":"Related","EVENT_2_0_DEPRECATION":"Event 2.0 deprecation","WORKSPACE_GA":"Workspace GA","USERS":"Users","SELECT_CHANNEL":"Select channel","SELECT_USERS":"Select users","ALLOWED":"Allowed","REMOVE_ALLOWED_CHANNELS":"Remove allowed channels","CATALOG_UPGRADED":"C
50atalog upgraded","SEARCH":"Search","UPGRADE_CATALOG":"Upgrade catalog","UPGRADE":"Upgrade"},"element":{"ACTIONS_MENU":"Actions Menu","CONTENT_HERO":"Content Hero","DOWNLOAD_CARD":"Download Card","EXPLORE_ALL_CONTENT":"Explore All Content","RESULTS_LIST":"Results List","ON_PAGE":"On-Page","RESET_FILTERS":"Reset Filters","CHIPS":"Chips","EXPLORE_SITE":"Explore Site","BACK_TO_TOP":"Back to Top","VIEW_BUTTON":"View Button","X_BUTTON":"x button","OKAY_BUTTON":"okay button","INFO_BUTTON":"info button","NEWSLETTER_REPORTS_NOTICE":"newsletter reports notice","INITIATIVES_V_2_ANNOUNCEMENT_NOTICE":"Initiatives v2 announcement notice","POPUP":"Pop-Up"},"response":{"SUCCESS":"Success","FAILURE":"Failure"}}')},123608:e=>{"use strict"
51;e.exports=JSON.parse('{"category":{"content":{"action":{"delete":{"category":"Content","action":"Delete","label":{"location":{"details":{"point":{"category":"Content","action":"Delete","label":"Location","details":"Point"},"line":{"category":"Content","action":"Delete","label":"Location","details":"Line"},"polygon":{"category":"Content","action":"Delete","label":"Location","details":"Polygon"}}},"reaction":{"details":{"smilingFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Smiling face"},"confusedFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Confused face"},"grinningFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Grinning face"},"laughingFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Laughing face"},"faceWithTearsOfJoy":{"category":"Content","action":"Delete","label":"Reaction","details":"Face with tears of joy"},"thinkingFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Thinking face"},"winkingFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Winking face"},"partyingFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Partying face"},"sadFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Sad face"},"shockedFace":{"category":"Content","action":"Delete","label":"Reaction","details":"Shocked face"},"thumbsUp":{"category":"Content","action":"Delete","label":"Reaction","details":"Thumbs up"},"thumbsDown":{"category":"Content","action":"Delete","label":"Reaction","details":"Thumbs down"},"clappingHands":{"category":"Content","action":"Delete","label":"Reaction","details":"Clapping hands"},"raisingHands":{"category":"Content","action":"Delete","label":"Reaction","details":"Raising hands"},"wavingHand":{"category":"Content","action":"Delete","label":"Reaction","details":"Waving hand"},"redHeart":{"category":"Content","action":"Delete","label":"Reaction","details":"Red heart"},"hundredPoints":{"category":"Content","action":"Delete","label":"Reaction","details":"Hundred points"},"fire":{"category":"Content","action":"Delete","label":"Reaction","details":"Fire"},"partyPopper":{"category":"Content","action":"Delete","label":"Reaction","details":"Party popper"},"rocket":{"category":"Content","action":"Delete","label":"Reaction","details":"Rocket"},"upArrow":{"category":"Content","action":"Delete","label":"Reaction","details":"Up arrow"},"downArrow":{"category":"Content","action":"Delete","label":"Reaction","details":"Down arrow"},"eyes":{"category":"Content","action":"Delete","label":"Reaction","details":"Eyes"},"trophy":{"category":"Content","action":"Delete","label":"Reaction","details":"Trophy"},"worldMap":{"category":"Content","action":"Delete","label":"Reaction","details":"World map"}}},"modal":{"category":"Content","action":"Delete","label":"Modal"},"site":{"category":"Content","action":"Delete","label":"Site"},"page":{"category":"Content","action":"Delete","label":"Page"},"permanentlyDelete":{"category":"Content","action":"Delete","label":"Permanently Delete"},"delete":{"category":"Content","action":"Delete","label":"Delete"},"catalog":{"category":"Content","action":"Delete","label":"Catalog"}},"details":{"allPosts":{"category":"Content","action":"Delete","details":"All Posts"}}},"create":{"category":"Content","action":"Create","label":{"upload":{"category":"Content","action":"Create","label":"Upload"},"url":{"category":"Content","action":"Create","label":"URL"},"location":{"details":{"point":{"category":"Content","action":"Create","label":"Location","details":"Point"},"line":{"category":"Content","action":"Create","label":"Location","details":"Line"},"polygon":{"category":"Content","action":"Create","label":"Location","details":"Polygon"}}},"reaction":{"details":{"smilingFace":{"category":"Content","action":"Create","label":"Reaction","details":"Smiling face"},"confusedFace":{"category":"Content","action":"Create","label":"Reaction","details":"Confused face"},"grinningFace":{"category":"Content","action":"Create","label":"Reaction","details":"Grinning face"},"laughingFace":{"category":"Content","action":"Create","label":"Reaction","details":"Laughing face"},"faceWithTearsOfJoy":{"category":"Content","action":"Create","label":"Reaction","details":"Face with tears of joy"},"thinkingFace":{"category":"Content","action":"Create","label":"Reaction","details":"Thinking face"},"winkingFace":{"category":"Content","action":"Create","label":"Reaction","details":"Winking face"},"partyingFace":{"category":"Content","action":"Create","label":"Reaction","details":"Partying face"},"sadFace":{"category":"Content","action":"Create","label":"Reaction","details":"Sad face"},"shockedFace":{"category":"Content","action":"Create","label":"Reaction","details":"Shocked face"},"thumbsUp":{"category":"Content","action":"Create","label":"Reaction","details":"Thumbs up"},"thumbsDown":{"category":"Content","action":"Create","label":"Reaction","details":"Thumbs down"},"clappingHands":{"category":"Content","action":"Create","label":"Reaction","details":"Clapping hands"},"raisingHands":{"category":"Content","action":"Create","label":"Reaction","details":"Raising hands"},"wavingHand":{"category":"Content","action":"Create","label":"Reaction","details":"Waving hand"},"redHeart":{"category":"Content","action":"Create","label":"Reaction","details":"Red heart"},"hundredPoints":{"category":"Content","action":"Create","label":"Reaction","details":"Hundred points"},"fire":{"category":"Content","action":"Create","label":"Reaction","details":"Fire"},"partyPopper":{"category":"Content","action":"Create","label":"Reaction","details":"Party popper"},"rocket":{"category":"Content","action":"Create","label":"Reaction","details":"Rocket"},"upArrow":{"category":"Content","action":"Create","label":"Reaction","details":"Up arrow"},"downArrow":{"category":"Content","action":"Create","label":"Reaction","details":"Down arrow"},"eyes":{"category":"Content","action":"Create","label":"Reaction","details":"Eyes"},"trophy":{"category":"Content","action":"Create","label":"Reaction","details":"Trophy"},"worldMap":{"category":"Content","action":"Create","label":"Reaction","details":"World map"}}},"post":{"category":"Content","action":"Create","label":"Post"},"reply":{"category":"Content","action":"Create","label":"Reply"},"site":{"details":{"clone":{"category":"Content","action":"Create","label":"Site","details":"Clone"}}},"template":{"details":{"site":{"category":"Content","action":"Create","label":"Template","details":"Site"}}}}},"update":{"category":"Content","action":"Update","label":{"groups":{"category":"Content","action":"Update","label":"Groups","details":{"removeEditGroups":{"category":"Content","action":"Update","label":"Groups","details":"Remove Edit Groups"},"removeViewGroups":{"category":"Content","action":"Update","label":"Groups","details":"Remove View Groups"},"addViewGroups":{"category":"Content","action":"Update","label":"Groups","details":"Add View Groups"},"addEditGroups":{"category":"Content","action":"Update","label":"Groups","details":"Add Edit Groups"},"addCatalogGroups":{"category":"Content","action":"Update","label":"Groups","details":"Add Catalog Groups"},"removeCatalogGroups":{"category":"Content","action":"Update","label":"Groups","details":"Remove Catalog Groups"},"add":{"category":"Content","action":"Update","label":"Groups","details":"Add"},"remove":{"category":"Content","action":"Update","label":"Groups","details":"Remove"},"removeParticipantGroup":{"category":"Content","action":"Update","label":"Groups","details":"Remove Participant Group"}}},"location":{"details":{"point":{"category":"Content","action":"Update","label":"Location","details":"Point"},"line":{"category":"Content","action":"Update","label":"Location","details":"Line"},"polygon":{"category":"Content","action":"Update","label":"Location","details":"Polygon"},"featuresPoints":{"category":"Content","action":"Update","label":"Location","details":"Features: points"},"featuresLines":{"category":"Content","action":"Update","label":"Location","details":"Features: lines"},"featuresPolygons":{"category":"Content","action":"Update","label":"Location","details":"Features: polygons"},"pointsPoints":{"category":"Content","action":"Update","label":"Location","details":"Points: points"},"pointsLines":{"category":"Content","action":"Update","label":"Location","details":"Points: lines"},"pointsPolygons":{"category":"Content","action":"Update","label":"Location","details":"Points: polygons"}}},"settings":{"details":{"allowDiscussions":{"category":"Content","action":"Update","label":"Settings","details":"Allow Discussions"},"blockDiscussions":{"category":"Content","action":"Update","label":"Settings","details":"Block Discussions"},"addAllowedChannel":{"category":"Content","action":"Update","label":"Settings","details":"Add allowed channel"},"updateSchedule":{"category":"Content","action":"Update","label":"Settings","details":"Update Schedule"},"removeAllowedChannels":{"category":"Content","action":"Update","label":"Settings","details":"Remove allowed channels"}},"category":"Content","action":"Update","label":"Settings"},"status":{"details":{"hide":{"category":"Content","action":"Update","label":"Status","details":"Hide "},"show":{"category":"Content","action":"Update","label":"Status","details":"Show"}},"category":"Content","action":"Update","label":"Status"},"post":{"category":"Content","action":"Update","label":"Post"},"reply":{"category":"Content","action":"Update","label":"Reply"},"description":{"category":"Content","action":"Update","label":"Description"},"summary":{"category":"Content","action":"Update","label":"Summary"},"image":{"details":{"complete":{"category":"Content","action":"Update","label":"Image","details":"Complete"},"empty":{"category":"Content","action":"Update","label":"Image","details":"Empty"}}},"timeline":{"details":{"steps":{"category":"Content","action":"Update","label":"Timeline","details":"Steps"}}},"featuredContent":{"category":"Content","action":"Update","label":"Featured Content"},"access":{"details":{"public":{"category":"Content","action":"Update","label":"Access","details":"Public"},"org":{"category":"Content","action":"Update","label":"Access","details":"Org"},"shared":{"category":"Content","action":"Update","label":"Access","details":"Shared"},"private":{"category":"Content","action":"Update","label":"Access","details":"Private"}}},"layout":{"details":{"draft":{"category":"Content","action":"Update","label":"Layout","details":"Draft"},"publish":{"category":"Content","action":"Update","label":"Layout","details":"Publish"}}},"advanced":{"category":"Content","action":"Update","label":"Advanced"},"followTab":{"details":{"on":{"category":"Content","action":"Update","label":"Follow Tab","details":"On"},"off":{"category":"Content","action":"Update","label":"Follow Tab","details":"Off"}}},"metric":{"details":{"create":{"category":"Content","action":"Update","label":"Metric","details":"Create"},"update":{"category":"Content","action":"Update","label":"Metric","details":"Update"},"delete":{"category":"Content","action":"Update","label":"Metric","details":"Delete"},"show":{"category":"Content","action":"Update","label":"Metric","details":"Show"},"hide":{"category":"Content","action":"Update","label":"Metric","details":"Hide"},"featured":{"category":"Content","action":"Update","label":"Metric","details":"Featured"}}},"callToAction":{"category":"Content","action":"Update","label":"Call to Action"},"protect":{"category":"Content","action":"Update","label":"Protect"},"unprotect":{"category":"Content","action":"Update","label":"Unprotect"},"draft":{"details":{"delete":{"category":"Content","action":"Update","label":"Draft","details":"Delete"}}},"schedule":{"details":{"forceUpdate":{"category":"Content","action":"Update","label":"Schedule","details":"Force update"},"automatic":{"category":"Content","action":"Update","label":"Schedule","details":"Automatic"},"daily":{"category":"Content","action":"Update","label":"Schedule","details":"Daily"},"weekly":{"category":"Content","action":"Update","label":"Schedule","details":"Weekly"},"monthly":{"category":"Content","action":"Update","label":"Schedule","details":"Monthly"},"yearly":{"category":"Content","action":"Update","label":"Schedule","details":"Yearly"},"manual":{"category":"Content","action":"Update","label":"Schedule","details":"Manual"}}},"association":{"category":"Content","action":"Update","label":"Association"},"feeds":{"details":{"disabled":{"category":"Content","action":"Update","label":"Feeds","details":"Disabled"}},"category":"Content","action":"Update","label":"Feeds"},"index":{"category":"Content","action":"Update","label":"Index"},"slug":{"category":"Content","action":"Update","label":"Slug"},"migrate":{"details":{"page":{"category":"Content","action":"Update","label":"Migrate","details":"Page"}}},"catalog":{"category":"Content","action":"Update","label":"Catalog","details":{"upgrade":{"category":"Content","action":"Update","label":"Catalog","details":"Upgrade"}}}}},"download":{"label":{"updateCache":{"category":"Content","action":"Download","label":"Update cache"},"activity":{"category":"Content","action":"Download","label":"Activity"}}}}},"interaction":{"action":{"open":{"label":{"popover":{"details":{"share":{"category":"Interaction","action":"Open","label":"Popover","details":"Share"},"details":{"category":"Interaction","action":"Open","label":"Popover","details":"Details"},"options":{"category":"Interaction","action":"Open","label":"Popover","details":"Options"},"help":{"category":"Interaction","action":"Open","label":"Popover","details":"Help"},"smilingFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Smiling face"},"confusedFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Confused face"},"grinningFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Grinning face"},"laughingFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Laughing face"},"faceWithTearsOfJoy":{"category":"Interaction","action":"Open","label":"Popover","details":"Face with tears of joy"},"thinkingFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Thinking face"},"winkingFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Winking face"},"partyingFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Partying face"},"sadFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Sad face"},"shockedFace":{"category":"Interaction","action":"Open","label":"Popover","details":"Shocked face"},"thumbsUp":{"category":"Interaction","action":"Open","label":"Popover","details":"Thumbs up"},"thumbsDown":{"category":"Interaction","action":"Open","label":"Popover","details":"Thumbs down"},"clappingHands":{"category":"Interaction","action":"Open","label":"Popover","details":"Clapping hands"},"raisingHands":{"category":"Interaction","action":"Open","label":"Popover","details":"Raising hands"},"wavingHand":{"category":"Interaction","action":"Open","label":"Popover","details":"Waving hand"},"redHeart":{"category":"Interaction","action":"Open","label":"Popover","details":"Red heart"},"hundredPoints":{"category":"Interaction","action":"Open","label":"Popover","details":"Hundred points"},"fire":{"category":"Interaction","action":"Open","label":"Popover","details":"Fire"},"partyPopper":{"category":"Interaction","action":"Open","label":"Popover","details":"Party popper"},"rocket":{"category":"Interaction","
51action":"Open","label":"Popover","details":"Rocket"},"upArrow":{"category":"Interaction","action":"Open","label":"Popover","details":"Up arrow"},"downArrow":{"category":"Interaction","action":"Open","label":"Popover","details":"Down arrow"},"eyes":{"category":"Interaction","action":"Open","label":"Popover","details":"Eyes"},"trophy":{"category":"Interaction","action":"Open","label":"Popover","details":"Trophy"},"worldMap":{"category":"Interaction","action":"Open","label":"Popover","details":"World map"},"reactionOverflow":{"category":"Interaction","action":"Open","label":"Popover","details":"Reaction overflow"},"addReaction":{"category":"Interaction","action":"Open","label":"Popover","details":"Add reaction"},"activityEnabled":{"category":"Interaction","action":"Open","label":"Popover","details":"Activity Enabled"},"activityDisabled":{"category":"Interaction","action":"Open","label":"Popover","details":"Activity Disabled"},"site":{"category":"Interaction","action":"Open","label":"Popover","details":"Site"}}},"postList":{"category":"Interaction","action":"Open","label":"Post List"},"panel":{"details":{"legend":{"category":"Interaction","action":"Open","label":"Panel","details":"Legend"},"discussionOptions":{"category":"Interaction","action":"Open","label":"Panel","details":"Discussion Options"},"layerList":{"category":"Interaction","action":"Open","label":"Panel","details":"Layer List"},"search":{"category":"Interaction","action":"Open","label":"Panel","details":"Search"}},"category":"Interaction","action":"Open","label":"Panel"},"search":{"category":"Interaction","action":"Open","label":"Search"},"thread":{"category":"Interaction","action":"Open","label":"Thread","details":{"bodyAction":{"category":"Interaction","action":"Open","label":"Thread","details":"Body Action"},"location":{"category":"Interaction","action":"Open","label":"Thread","details":"Location"},"post":{"category":"Interaction","action":"Open","label":"Thread","details":"Post"}}},"editor":{"category":"Interaction","action":"Open","label":"Editor","details":{"reply":{"category":"Interaction","action":"Open","label":"Editor","details":"Reply"},"metric":{"category":"Interaction","action":"Open","label":"Editor","details":"Metric"}}},"table":{"category":"Interaction","action":"Open","label":"Table"},"modal":{"details":{"newContent":{"category":"Interaction","action":"Open","label":"Modal","details":"New Content"},"addExistingContent":{"category":"Interaction","action":"Open","label":"Modal","details":"Add Existing Content"},"addContent":{"category":"Interaction","action":"Open","label":"Modal","details":"Add Content"},"createProject":{"category":"Interaction","action":"Open","label":"Modal","details":"Create Project"},"feeds":{"category":"Interaction","action":"Open","label":"Modal","details":"Feeds"},"addGroups":{"category":"Interaction","action":"Open","label":"Modal","details":"Add Groups"},"addUsers":{"category":"Interaction","action":"Open","label":"Modal","details":"Add Users"},"share":{"category":"Interaction","action":"Open","label":"Modal","details":"Share"},"deleteContent":{"category":"Interaction","action":"Open","label":"Modal","details":"Delete Content"},"createDiscussion":{"category":"Interaction","action":"Open","label":"Modal","details":"Create Discussion Board"},"createInitiative":{"category":"Interaction","action":"Open","label":"Modal","details":"Create Initiative"},"addChannels":{"category":"Interaction","action":"Open","label":"Modal","details":"Add Channels"},"delete":{"category":"Interaction","action":"Open","label":"Modal","details":"Delete"},"createGroup":{"category":"Interaction","action":"Open","label":"Modal","details":"Create Group"},"aboutWorkspaces":{"category":"Interaction","action":"Open","label":"Modal","details":"About workspaces"},"add":{"category":"Interaction","action":"Open","label":"Modal","details":"Add"},"info":{"category":"Interaction","action":"Open","label":"Modal","details":"Info"},"generateDownload":{"category":"Interaction","action":"Open","label":"Modal","details":"Generate download"},"updateSchedule":{"category":"Interaction","action":"Open","label":"Modal","details":"Update Schedule"},"solutionsTemplate":{"category":"Interaction","action":"Open","label":"Modal","details":"Solutions Template"},"templates":{"category":"Interaction","action":"Open","label":"Modal","details":"Templates"},"rebuildIndex":{"category":"Interaction","action":"Open","label":"Modal","details":"Rebuild index"},"migratePage":{"category":"Interaction","action":"Open","label":"Modal","details":"Migrate page"},"editChannel":{"category":"Interaction","action":"Open","label":"Modal","details":"Edit channel"},"viewChannel":{"category":"Interaction","action":"Open","label":"Modal","details":"View channel"},"deleteCatalog":{"category":"Interaction","action":"Open","label":"Modal","details":"Delete catalog"}
51,"workspaceGa":{"category":"Interaction","action":"Open","label":"Modal","details":"Workspace GA"},"selectChannel":{"category":"Interaction","action":"Open","label":"Modal","details":"Select channel"},"selectContent":{"category":"Interaction","action":"Open","label":"Modal","details":"Select content"},"selectGroups":{"category":"Interaction","action":"Open","label":"Modal","details":"Select groups"},"selectUsers":{"category":"Interaction","action":"Open","label":"Modal","details":"Select users"},"catalogUpgraded":{"category":"Interaction","action":"Open","label":"Modal","details":"Catalog upgraded"},"upgradeCatalog":{"category":"Interaction","action":"Open","label":"Modal","details":"Upgrade catalog"}}},"locations":{"category":"Interaction","action":"Open","label":"Locations"},"stepper":{"category":"Interaction","action":"Open","label":"Stepper","details":{"emailNotifications":{"category":"Interaction","action":"Open","label":"Stepper","details":"Email Notifications"},"postActivity":{"category":"Interaction","action":"Open","label":"Stepper","details":"Post Activity"},"selectGroups":{"category":"Interaction","action":"Open","label":"Stepper","details":"Select groups"},"confirm":{"category":"Interaction","action":"Open","label":"Stepper","details":"Confirm"},"selectContent":{"category":"Interaction","action":"Open","label":"Stepper","details":"Select content"},"activationWithGroups":{"category":"Interaction","action":"Open","label":"Stepper","details":"Activation with Groups"}}},"popUp":{"details":{"post":{"category":"Interaction","action":"Open","label":"Pop-Up","details":"Post"}},"category":"Interaction","action":"Open","label":"Pop-Up"},"accordion":{"details":{"attribute":{"category":"Interaction","action":"Open","label":"Accordion","details":"Attribute"},"downloadErrorMessage":{"category":"Interaction","action":"Open","label":"Accordion","details":"Download error message"},"schedule":{"category":"Interaction","action":"Open","label":"Accordion","details":"Schedule"}}},"tooltip":{"details":{"chipComponentWithStringHidden":{"category":"Interaction","action":"Open","label":"Tooltip","details":"Chip Component with string Hidden"}}},"timeline":{"category":"Interaction","action":"Open","label":"Timeline"},"dropdown":{"category":"Interaction","action":"Open","label":"Dropdown"},"menu":{"details":{"view":{"category":"Interaction","action":"Open","label":"Menu","details":"View"},"options":{"category":"Interaction","action":"Open","label":"Menu","details":"Options"},"user":{"category":"Interaction","action":"Open","label":"Menu","details":"User"}}},"sidePanel":{"details":{"sharing":{"category":"Interaction","action":"Open","label":"Side Panel","details":"Sharing"}}},"notice":{"details":{"privacy":{"category":"Interaction","action":"Open","label":"Notice","details":"Privacy"}}},"settings":{"details":{"privacy":{"category":"Interaction","action":"Open","label":"Settings","details":"Privacy"}}},"options":{"details":{"add":{"category":"Interaction","action":"Open","label":"Options","details":"Add"}}},"sheet":{"details":{"filters":{"category":"Interaction","action":"Open","label":"Sheet","details":"Filters"}}},"events":{"category":"Interaction","action":"Open","label":"Events"},"items":{"category":"Interaction","action":"Open","label":"Items"},"details":{"category":"Interaction","action":"Open","label":"Details"},"appearance":{"category":"Interaction","action":"Open","label":"Appearance"}}},"download":{"category":"Interaction","action":"Download","details":{"cache":{"category":"Interaction","action":"Download","details":"Cache"},"export":{"category":"Interaction","action":"Download","details":"Export"}},"label":{"csv":{"details":{"export":{"category":"Interaction","action":"Download","label":"CSV","details":"Export"}}}}},"share":{"label":{"link":{"category":"Interaction","action":"Share","label":"Link"}}},"zoom":{"label":{"in":{"category":"Interaction","action":"Zoom","label":"In"},"out":{"category":"Interaction","action":"Zoom","label":"Out"},"to":{"category":"Interaction","action":"Zoom","label":"To"}}},"close":{"label":{"postList":{"category":"Interaction","action":"Close","label":"Post List"},"thread":{"category":"Interaction","action":"Close","label":"Thread"},"panel":{"details":{"legend":{"category":"Interaction","action":"Close","label":"Panel","details":"Legend"},"layerList":{"category":"Interaction","action":"Close","label":"Panel","details":"Layer List"},"search":{"category":"Interaction","action":"Close","label":"Panel","details":"Search"}}},"search":{"category":"Interaction","action":"Close","label":"Search"},"editor":{"category":"Interaction","action":"Close","label":"Editor","details":{"addPost":{"category":"Interaction","action":"Close","label":"Editor","details":"Add Post"},"metric":{"category":"Interaction","action":"Close","label":"Editor","details":"Metric"}}},"table":{"category":"Interaction","action":"Close","label":"Table"},"modal":{"details":{"addContent":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Content"},"newContent":{"category":"Interaction","action":"Close","label":"Modal","details":"New Content"},"addExistingContent":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Existing Content"},"createProject":{"category":"Interaction","action":"Close","label":"Modal","details":"Create Project"},"managePreferences":{"category":"Interaction","action":"Close","label":"Modal","details":"Manage Preferences"},"discussionOptions":{"category":"Interaction","action":"Close","label":"Modal","details":"Discussion Options"},"addGroups":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Groups"},"addUsers":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Users"},"deleteContent":{"category":"Interaction","action":"Close","label":"Modal","details":"Delete Content"},"share":{"category":"Interaction","action":"Close","label":"Modal","details":"Share"},"createDiscussion":{"category":"Interaction","action":"Close","label":"Modal","details":"Create Discussion Board"},"addChannel":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Channel"},"addChannels":{"category":"Interaction","action":"Close","label":"Modal","details":"Add Channels"},"delete":{"category":"Interaction","action":"Close","label":"Modal","details":"Delete"},"createGroup":{"category":"Interaction","action":"Close","label":"Modal","details":"Create Group"},"aboutWorkspaces":{"category":"Interaction","action":"Close","label":"Modal","details":"About workspaces"}
51,"introducingWorkspaces":{"category":"Interaction","action":"Close","label":"Modal","details":"Introducing workspaces"},"reIntroducingHubInitiatives":{"category":"Interaction","action":"Close","label":"Modal","details":"Re-Introducing — Hub Initiatives"},"add":{"category":"Interaction","action":"Close","label":"Modal","details":"Add"},"info":{"category":"Interaction","action":"Close","label":"Modal","details":"Info"},"generateDownload":{"category":"Interaction","action":"Close","label":"Modal","details":"Generate download"},"updateSchedule":{"category":"Interaction","action":"Close","label":"Modal","details":"Update Schedule"},"rebuildIndex":{"category":"Interaction","action":"Close","label":"Modal","details":"Rebuild index"},"migratePage":{"category":"Interaction","action":"Close","label":"Modal","details":"Migrate page"},"editChannel":{"category":"Interaction","action":"Close","label":"Modal","details":"Edit channel"},"viewChannel":{"category":"Interaction","action":"Close","label":"Modal","details":"View channel"},"deleteCatalog":{"category":"Interaction","action":"Close","label":"Modal","details":"Delete catalog"},"workspaceGa":{"category":"Interaction","action":"Close","label":"Modal","details":"Workspace GA"},"selectChannel":{"category":"Interaction","action":"Close","label":"Modal","details":"Select channel"},"selectContent":{"category":"Interaction","action":"Close","label":"Modal","details":"Select content"},"selectGroups":{"category":"Interaction","action":"Close","label":"Modal","details":"Select groups"},"selectUsers":{"category":"Interaction","action":"Close","label":"Modal","details":"Select users"},"upgradeCatalog":{"category":"Interaction","action":"Close","label":"Modal","details":"Upgrade catalog"}}},"locations":{"category":"Interaction","action":"Close","label":"Locations"},"popover":{"details":{"options":{"category":"Interaction","action":"Close","label":"Popover","details":"Options"},"help":{"category":"Interaction","action":"Close","label":"Popover","details":"Help"}}},"popUp":{"details":{"post":{"category":"Interaction","action":"Close","label":"Pop Up","details":"Post"}},"category":"Interaction","action":"Close","label":"Pop-Up"},"accordion":{"details":{"attribute":{"category":"Interaction","action":"Close","label":"Accordion","details":"Attribute"},"downloadErrorMessage":{"category":"Interaction","action":"Close","label":"Accordion","details":"Download error message"},"schedule":{"category":"Interaction","action":"Close","label":"Accordion","details":"Schedule"}}},"alert":{"details":{"projectWorkspaceIntroNotice":{"category":"Interaction","action":"Close","label":"Alert","details":"Project Workspace Intro Notice"}},"category":"Interaction","action":"Close","label":"Alert"},"timeline":{"category":"Interaction","action":"Close","label":"Timeline"}},"details":{"deleteContent":{"category":"Interaction","action":"Close","details":"Delete Content"}}},"search":{"label":{"query":{"category":"Interaction","action":"Search","label":"Query","details":{"focus":{"category":"Interaction","action":"Search","label":"Query","details":"Focus"},"loseFocus":{"category":"Interaction","action":"Search","label":"Query","details":"Lose Focus"}}},"filter":{"category":"Interaction","action":"Search","label":"Filter","details":{"clear":{"category":"Interaction","action":"Search","label":"Filter","details":"Clear"}}},"click":{"category":"Interaction","action":"Search","label":"Click"},"loadMore":{"category":"Interaction","action":"Search","label":"Load More","details":{"attributes":{"category":"Interaction","action":"Search","label":"Load More","details":"Attributes"}}},"backToTop":{"category":"Interaction","action":"Search","label":"Back to Top"},"view":{"category":"Interaction","action":"Search","label":"View"},"whatsNew":{"category":"Interaction","action":"Search","label":"Whats New","details":{"switchToClassicView":{"category":"Interaction","action":"Search","label":"Whats New","details":"Switch to classic view"},"bannerDismiss":{"category":"Interaction","action":"Search","label":"Whats New","details":"Banner dismiss"},"enableForAllUsers":{"category":"Interaction","action":"Search","label":"Whats New","details":"Enable for all users"}}},"action":{"details":{"overflow":{"category":"Interaction","action":"Search","label":"Action","details":"Overflow"},"exportCatalog":{"category":"Interaction","action":"Search","label":"Action","details":"Export catalog"},"exportSearchResults":{"category":"Interaction","action":"Search","label":"Action","details":"Export search results"}}},"searchPosts":{"details":{"mapView":{"category":"Interaction","action":"Search","label":"Search Posts","details":"Map View"}}},"recent":{"category":"Interaction","action":"Search","label":"Recent"},"suggest":{"category":"Interaction","action":"Search","label":"Suggest"}}},"update":{"label":{"categoryCard":{"category":"Interaction","action":"Update","label":"Category Card"}}},"viewed":{"label":{"recents":{"category":"Interaction","action":"Viewed","label":"Recents"},"empty":{"category":"Interaction","action":"Viewed","label":"Empty"},"post":{"details":{"thread":{"category":"Interaction","action":"Viewed","label":"Post","details":"Thread"},"postList":{"category":"Interaction","action":"Viewed","label":"Post","details":"Post List"}}},"filters":{"details":{"hostedDownloadsDisabled":{"category":"Interaction","action":"Viewed","label":"Filters","details":"Hosted Downloads Disabled"},"hostedDownloadsEnabled":{"category":"Interaction","action":"Viewed","label":"Filters","details":"Hosted Downloads Enabled"}}},"alert":{"category":"Interaction","action":"Viewed","label":"Alert"},"notice":{"details":{"privacy":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Privacy"},"unsupportedDevice":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Unsupported device"}
51,"introducingWorkspaces":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Introducing workspaces"},"initiativesV2Announcement":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Initiatives v2 announcement"},"slowService":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Slow service"},"downService":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Down service"},"authRequired":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Auth Required"},"event20Deprecation":{"category":"Interaction","action":"Viewed","label":"Notice","details":"Event 2.0 deprecation"}}},"card":{"details":{"app":{"category":"Interaction","action":"Viewed","label":"Card","details":"App"},"map":{"category":"Interaction","action":"Viewed","label":"Card","details":"Map"},"feedback":{"category":"Interaction","action":"Viewed","label":"Card","details":"Feedback"},"externalUrl":{"category":"Interaction","action":"Viewed","label":"Card","details":"External URL"}}},"gallery":{"category":"Interaction","action":"Viewed","label":"Gallery"}}},"enable":{"label":{"draw":{"category":"Interaction","action":"Enable","label":"Draw","details":{"update":{"category":"Interaction","action":"Enable","label":"Draw","details":"Update"}}},"select":{"category":"Interaction","action":"Enable","label":"Select"},"addLocation":{"category":"Interaction","action":"Enable","label":"Add Location"},"collapse":{"details":{"timeline":{"category":"Interaction","action":"Enable","label":"Collapse","details":"Timeline"}}},"notifications":{"details":{"weekly":{"category":"Interaction","action":"Enable","label":"Notifications","details":"Weekly"}}},"content":{"details":{"hubFeeds":{"category":"Interaction","action":"Enable","label":"Content","details":"Hub feeds"}}},"event":{"category":"Interaction","action":"Enable","label":"Event"}}},"disable":{"label":{"draw":{"category":"Interaction","action":"Disable","label":"Draw","details":{"update":{"category":"Interaction","action":"Disable","label":"Draw","details":"Update"}}},"select":{"category":"Interaction","action":"Disable","label":"Select"},"addLocation":{"category":"Interaction","action":"Disable","label":"Add Location"},"collapse":{"details":{"timeline":{"category":"Interaction","action":"Disable","label":"Collapse","details":"Timeline"}}},"notifications":{"details":{"weekly":{"category":"Interaction","action":"Disable","label":"Notifications","details":"Weekly"}}},"content":{"details":{"hubFeeds":{"category":"Interaction","action":"Disable","label":"Content","details":"Hub feeds"}}}}},"select":{"label":{"content":{"category":"Interaction","action":"Select","label":"Content","details":{"selectTool":{"category":"Interaction","action":"Select","label":"Content","details":"Select Tool"}}},"groups":{"category":"Interaction","action":"Select","label":"Groups","details":{"recents":{"category":"Interaction","action":"Select","label":"Groups","details":"Recents"}}},"collapse":{"details":{"timeline":{"category":"Interaction","action":"Select","label":"Collapse","details":"Timeline"}}},"noLocation":{"category":"Interaction","action":"Select","label":"No Location"},"organizationsExtent":{"category":"Interaction","action":"Select","label":"Organization\'s Extent"},"customLocation":{"category":"Interaction","action":"Select","label":"Custom Location"},"tags":{"category":"Interaction","action":"Select","label":"Tags"},"discussionBoardView":{"details":{"mapView":{"category":"Interaction","action":"Select","label":"Discussion Board View","details":"Map View"},"gridView":{"category":"Interaction","action":"Select","label":"Discussion Board View","details":"Grid View"},"listView":{"category":"Interaction","action":"Select","label":"Discussion Board View","details":"List View"}}},"register":{"details":{"event":{"category":"Interaction","action":"Select","label":"Register","details":"Event"}}},"unregister":{"details":{"event":{"category":"Interaction","action":"Select","label":"Unregister","details":"Event"}}},"newFilter":{"category":"Interaction","action":"Select","label":"New filter"},"newCollection":{"category":"Interaction","action":"Select","label":"New collection"}
51,"channel":{"details":{"recents":{"category":"Interaction","action":"Select","label":"Channel","details":"Recents"},"allowed":{"category":"Interaction","action":"Select","label":"Channel","details":"Allowed"}}}},"category":"Interaction","action":"Select"},"draw":{"label":{"start":{"details":{"polygon":{"category":"Interaction","action":"Draw","label":"Start","details":"Polygon"},"polyline":{"category":"Interaction","action":"Draw","label":"Start","details":"Polyline"},"point":{"category":"Interaction","action":"Draw","label":"Start","details":"Point"}}},"complete":{"details":{"polygon":{"category":"Interaction","action":"Draw","label":"Complete","details":"Polygon"},"polyline":{"category":"Interaction","action":"Draw","label":"Complete","details":"Polyline"},"point":{"category":"Interaction","action":"Draw","label":"Complete","details":"Point"}}},"delete":{"details":{"polygon":{"category":"Interaction","action":"Draw","label":"Delete","details":"Polygon"},"polyline":{"category":"Interaction","action":"Draw","label":"Delete","details":"Polyline"},"point":{"category":"Interaction","action":"Draw","label":"Delete","details":"Point"}}},"update":{"details":{"polygon":{"category":"Interaction","action":"Draw","label":"Update","details":"Polygon"},"polyline":{"category":"Interaction","action":"Draw","label":"Update","details":"Polyline"},"point":{"category":"Interaction","action":"Draw","label":"Update","details":"Point"}}}}},"deselect":{"label":{"groups":{"category":"Interaction","action":"Deselect","label":"Groups"},"content":{"category":"Interaction","action":"Deselect","label":"Content"},"collapse":{"details":{"timeline":{"category":"Interaction","action":"Deselect","label":"Collapse","details":"Timeline"}}},"tags":{"category":"Interaction","action":"Deselect","label":"Tags"}},"category":"Interaction","action":"Deselect"},"alert":{"label":{"warning":{"details":{"discussionsBlocked":{"category":"Interaction","action":"Alert","label":"Warning","details":"Discussions Blocked"}}}}},"subscribe":{"label":{"newsletter":{"category":"Interaction","action":"Subscribe","label":"Newsletter"}}},"add":{"label":{"image":{"category":"Interaction","action":"Add","label":"Image"},"content":{"category":"Interaction","action":"Add","label":"Content"},"groups":{"category":"Interaction","action":"Add","label":"Groups"},"users":{"category":"Interaction","action":"Add","label":"Users"},"step":{"details":{"timeline":{"category":"Interaction","action":"Add","label":"Step","details":"Timeline"}}},"channel":{"details":{"featuredChannel":{"category":"Interaction","action":"Add","label":"Channel","details":"Featured Channel"}},"category":"Interaction","action":"Add","label":"Channel"}},"category":"Interaction","action":"Add"},"remove":{"label":{"image":{"category":"Interaction","action":"Remove","label":"Image"},"content":{"category":"Interaction","action":"Remove","label":"Content"},"groups":{"category":"Interaction","action":"Remove","label":"Groups"},"users":{"category":"Interaction","action":"Remove","label":"Users"},"step":{"details":{"timeline":{"category":"Interaction","action":"Remove","label":"Step","details":"Timeline"}}},"location":{"details":{"clearAll":{"category":"Interaction","action":"Remove","label":"Location","details":"Clear All"}}},"channel":{"details":{"featuredChannel":{"category":"Interaction","action":"Remove","label":"Channel","details":"Featured Channel"}},"category":"Interaction","action":"Remove","label":"Channel"}}},"authenticate":{"label":{"signout":{"category":"Interaction","action":"Authenticate","label":"Signout"}}},"allow":{"label":{"discussions":{"category":"Interaction","action":"Allow","label":"Discussions"}},"category":"Interaction","action":"Allow"},"block":{"label":{"discussions":{"category":"Interaction","action":"Block","label":"Discussions"}},"category":"Interaction","action":"Block"},"cancel":{"label":{"event":{"category":"Interaction","action":"Cancel","label":"Event"}}},"delete":{"label":{"event":{"category":"Interaction","action":"Delete","label":"Event"}}},"copy":{"label":{"input":{"category":"Interaction","action":"Copy","label":"Input"}}},"browse":{"label":{"browseTemplates":{"details":{"initiativeTemplates":{"category":"Interaction","action":"Browse","label":"Browse Templates","details":"Initiative Templates"}}}}}}},"groups":{"action":{"update":{"category":"Groups","action":"Update","label":{"settings":{"details":{"allowDiscussions":{"category":"Groups","action":"Update","label":"Settings","details":"Allow Discussions"},"blockDiscussions":{"category":"Groups","action":"Update","label":"Settings","details":"Block Discussions"}},"category":"Groups","action":"Update","label":"Settings"},"membershipAccess":{"category":"Groups","action":"Update","label":"Membership Access"},"contentContribution":{"details":{"managers":{"category":"Groups","action":"Update","label":"Content Contribution","details":"Managers"},"all":{"category":"Groups","action":"Update","label":"Content Contribution","details":"All"}}},"summary":{"category":"Groups","action":"Update","label":"Summary"},"access":{"details":{"private":{"category":"Groups","action":"Update","label":"Access","details":"Private"},"public":{"category":"Groups","action":"Update","label":"Access","details":"Public"},"org":{"category":"Groups","action":"Update","label":"Access","details":"Org"},"shared":{"category":"Groups","action":"Update","label":"Access","details":"Shared"}}},"users":{"details":{"add":{"category":"Groups","action":"Update","label":"Users","details":"Add"},"remove":{"category":"Groups","action":"Update","label":"Users","details":"Remove"},"invite":{"category":"Groups","action":"Update","label":"Users","details":"Invite"},"roleManager":{"category":"Groups","action":"Update","label":"Users","details":"Role: Manager"},"roleMember":{"category":"Groups","action":"Update","label":"Users","details":"Role: Member"}}},"protect":{"category":"Groups","action":"Update","label":"Protect"},"unprotect":{"category":"Groups","action":"Update","label":"Unprotect"},"members":{"details":{"manager":{"category":"Groups","action":"Update","label":"Members","details":"Manager"},"member":{"category":"Groups","action":"Update","label":"Members","details":"Member"}}}}},"create":{"category":"Groups","action":"Create"},"delete":{"category":"Groups","action":"Delete"},"join":{"label":{"members":{"category":"Groups","action":"Join","label":"Members","details":{"add":{"category":"Groups","action":"Join","label":"Members","details":"Add"},"invite":{"category":"Groups","action":"Join","label":"Members","details":"Invite"}}}}},"leave":{"label":{"members":{"category":"Groups","action":"Leave","label":"Members","details":{"remove":{"category":"Groups","action":"Leave","label":"Members","details":"Remove"}}}}},"share":{"label":{"content":{"details":{"failure":{"category":"Groups","action":"Share","label":"Content","details":"Failure"},"success":{"category":"Groups","action":"Share","label":"Content","details":"Success"}}}}}}},"navigation":{"action":{"view":{"label":{"content":{"details":{"dcat":{"category":"Navigation","action":"View","label":"Content","details":"DCAT"},"dcatUs11":{"category":"Navigation","action":"View","label":"Content","details":"DCAT-US-1.1"},"dcatAp201":{"category":"Navigation","action":"View","label":"Content","details":"DCAT-AP-2.0.1"},"rss2":{"category":"Navigation","action":"View","label":"Content","details":"RSS-2.0"},"about":{"category":"Navigation","action":"View","label":"Content","details":"About"},"library":{"category":"Navigation","action":"View","label":"Content","details":"Library"},"hubSiteOgcApiLandingPage":{"category":"Navigation","action":"View","label":"Content","details":"Hub Site OGC API Landing Page"},"layoutEditor":{"category":"Navigation","action":"View","label":"Content","details":"Layout Editor"},"workspace":{"category":"Navigation","action":"View","label":"Content","details":"Workspace"},"publishedDraft":{"category":"Navigation","action":"View","label":"Content","details":"Published Draft"},"previewDraft":{"category":"Navigation","action":"View","label":"Content","details":"Preview Draft"},"site":{"category":"Navigation","action":"View","label":"Content","details":"Site"},"applicationEditor":{"category":"Navigation","action":"View","label":"Content","details":"Application 
51Editor"},"viewDiscussionBoard":{"category":"Navigation","action":"View","label":"Content","details":"View Discussion Board"},"discussion":{"category":"Navigation","action":"View","label":"Content","details":"Discussion"},"dcatAp211":{"category":"Navigation","action":"View","label":"Content","details":"DCAT-AP-2.1.1"}},"category":"Navigation","action":"View","label":"Content"},"users":{"details":{"profile":{"category":"Navigation","action":"View","label":"Users","details":"Profile"},"settings":{"category":"Navigation","action":"View","label":"Users","details":"Settings"},"workspace":{"category":"Navigation","action":"View","label":"Users","details":"Workspace"}}},"groups":{"details":{"profile":{"category":"Navigation","action":"View","label":"Groups","details":"Profile"},"about":{"category":"Navigation","action":"View","label":"Groups","details":"About"},"community":{"category":"Navigation","action":"View","label":"Groups","details":"Community"},"workspace":{"category":"Navigation","action":"View","label":"Groups","details":"Workspace"}}},"search":{"details":{"sourceProjectSearch":{"category":"Navigation","action":"View","label":"Search","details":"Source: Project Search"},"sourceSearch":{"category":"Navigation","action":"View","label":"Search","details":"Source: Search"},"searchApiExplorer":{"category":"Navigation","action":"View","label":"Search","details":"Search API Explorer"},"sourceInitiativeSearch":{"category":"Navigation","action":"View","label":"Search","details":"Source: Initiative Search"}}},"feeds":{"details":{"feedsApiExplorer":{"category":"Navigation","action":"View","label":"Feeds","details":"Feeds API Explorer"}}},"orgs":{"details":{"overview":{"category":"Navigation","action":"View","label":"Orgs","details":"Overview"}}},"layoutEditor":{"category":"Navigation","action":"View","label":"Layout Editor"},"home":{"details":{"workspace":{"category":"Navigation","action":"View","label":"Home","details":"Workspace"}}},"group":{"category":"Navigation","action":"View","label":"Group"},"settings":{"category":"Navigation","action":"View","label":"Settings","details":{"user":{"category":"Navigation","action":"View","label":"Settings","details":"User"}}},"registrants":{"category":"Navigation","action":"View","label":"Registrants"},"entityView":{"category":"Navigation","action":"View","label":"Entity View"},"workspace":{"category":"Navigation","action":"View","label":"Workspace","details":{"sharing":{"category":"Navigation","action":"View","label":"Workspace","details":"Sharing"},"users":{"category":"Navigation","action":"View","label":"Workspace","details":"Users"}}}},"category":"Navigation","action":"View"},"external":{"label":{"hubStatus":{"category":"Navigation","action":"External","label":"Hub Status"},"itemDetails":{"category":"Navigation","action":"External","label":"Item Details"},"link":{"category":"Navigation","action":"External","label":"Link"},"webHelp":{"category":"Navigation","action":"External","label":"Web Help","details":{"projectWorkspaceIntroNotice":{"category":"Navigation","action":"External","label":"Web Help","details":"Project Workspace Intro Notice"},"learnMoreAboutHubProjects":{"category":"Navigation","action":"External","label":"Web Help","details":"Learn more about Hub Projects"},"enableOrDisableHubActivityTracking":{"category":"Navigation","action":"External","label":"Web Help","details":"Enable or Disable Hub Activity Tracking"},"learnMoreAboutHubInitiatives":{"category":"Navigation","action":"External","label":"Web Help","details":"Learn more about Hub Initiatives"}}},"changelog":{"category":"Navigation","action":"External","label":"Changelog"},"arcGisBlog":{"category":"Navigation","action":"External","label":"ArcGIS Blog","details":{"initiativesV2Announcement":{"category":"Navigation","action":"External","label":"ArcGIS Blog","details":"Initiatives v2 announcement"}}},"customerFeedback":{"details":{"hubProjectFeedbackSurvey":{"category":"Navigation","action":"External","label":"Customer Feedback","details":"Hub Project Feedback Survey"}}},"arcGisOnline":{"details":{"organization":{"category":"Navigation","action":"External","label":"ArcGIS Online","details":"Organization"},"myContent":{"category":"Navigation","action":"External","label":"ArcGIS Online","details":"My Content"},"myOrganization":{"category":"Navigation","action":"External","label":"ArcGIS Online","details":"My Organization"},"details":{"category":"Navigation","action":"External","label":"ArcGIS Online","details":"Details"}}},"arcGisApplication":{"details":{"survey123":{"category":"Navigation","action":"External","label":"ArcGIS Application","details":"Survey123"}}},"homeApp":{"category":"Navigation","action":"External","label":"Home App"}},"category":"Navigation","action":"External"},"edit":{"label":{"profile":{"category":"Navigation","action":"Edit","label":"Profile"},"thumbnail":{"category":"Navigation","action":"Edit","label":"Thumbn
51ail"},"bio":{"category":"Navigation","action":"Edit","label":"Bio"},"content":{"details":{"site":{"category":"Navigation","action":"Edit","label":"Content","details":"Site"},"hubFeeds":{"category":"Navigation","action":"Edit","label":"Content","details":"Hub feeds"}}},"advanced":{"category":"Navigation","action":"Edit","label":"Advanced"}},"category":"Navigation","action":"Edit"},"onPage":{"label":{"overview":{"category":"Navigation","action":"On Page","label":"Overview"},"teams":{"category":"Navigation","action":"On Page","label":"Teams"},"content":{"category":"Navigation","action":"On Page","label":"Content"},"favorites":{"category":"Navigation","action":"On Page","label":"Favorites"},"chart":{"category":"Navigation","action":"On Page","label":"Chart"},"table":{"category":"Navigation","action":"On Page","label":"Table"},"metrics":{"category":"Navigation","action":"On Page","label":"Metrics"},"projects":{"category":"Navigation","action":"On Page","label":"Projects"},"members":{"category":"Navigation","action":"On Page","label":"Members"},"settings":{"category":"Navigation","action":"On Page","label":"Settings"},"initiatives":{"category":"Navigation","action":"On Page","label":"Initiatives"},"explore":{"category":"Navigation","action":"On Page","label":"Explore"},"feeds":{"category":"Navigation","action":"On Page","label":"Feeds"}},"category":"Navigation","action":"On Page"},"new":{"label":{"content":{"category":"Navigation","action":"New","label":"Content","details":{"app":{"category":"Navigation","action":"New","label":"Content","details":"App"},"feedback":{"category":"Navigation","action":"New","label":"Content","details":"Feedback"},"template":{"category":"Navigation","action":"New","label":"Content","details":"Template"},"event":{"category":"Navigation","action":"New","label":"Content","details":"Event"}}},"groups":{"category":"Navigation","action":"New","label":"Groups"}}},"home":{"category":"Navigation","action":"Home","label":{"hubOverview":{"category":"Navigation","action":"Home","label":"Hub Overview"}}}}},"users":{"action":{"update":{"category":"Users","action":"Update","label":{"notifications":{"details":{"enabled":{"category":"Users","action":"Update","label":"Notifications","details":"Enabled"},"disabled":{"category":"Users","action":"Update","label":"Notifications","details":"Disabled"}}},"privacy":{"details":{"all":{"category":"Users","action":"Update","label":"Privacy","details":"All"},"necessary":{"category":"Users","action":"Update","label":"Privacy","details":"Necessary"},"functional":{"category":"Users","action":"Update","label":"Privacy","details":"Functional"},"performance":{"category":"Users","action":"Update","label":"Privacy","details":"Performance"},"targeting":{"category":"Users","action":"Update","label":"Privacy","details":"Targeting"},"functionalPerformance":{"category":"Users","action":"Update","label":"Privacy","details":"Functional, Performance"},"functionalTargeting":{"category":"Users","action":"Update","label":"Privacy","details":"Functional, Targeting"},"performanceTargeting":{"category":"Users","action":"Update","label":"Privacy","details":"Performance, Targeting"}}},"workspace":{"details":{"enabled":{"category":"Users","action":"Update","label":"Workspace","details":"Enabled"},"disabled":{"category":"Users","action":"Update","label":"Workspace","details":"Disabled"}}},"optOut":{"details":{"phase1Workspaces":{"category":"Users","action":"Update","label":"Opt-out","details":"Phase 1 workspaces"},"initiativesV2Announcement":{"category":"Users","action":"Update","label":"Opt-out","details":"Initiatives v2 announcement"}}}}},"create":{"category":"Users","action":"Create"}}},"org":{},"catalog":{"action":{"update":{"label":{"checkForErrors":{"details":{"openModal":{"category":"Catalog","action":"Update","label":"Check for errors","details":"Open modal"},"reharvest":{"category":"Catalog","action":"Update","label":"Check for errors","details":"Reharvest"}}}}}}}}}')
52},288231:e=>{"use strict";e.exports={i8:"1.9.2"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.