@arcgis/core 4.28.0-rc.2 → 4.28.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/ArcadeDate.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
- package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
- package/assets/esri/core/workers/chunks/1da721608993783dc9cf.js +1 -0
- package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
- package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 3dcb2a82e1e4b520c9c9.js} +11 -8
- package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
- package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
- package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
- package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
- package/assets/esri/core/workers/chunks/6bc1f6f8a2408fa4bb6a.js +1 -0
- package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
- package/assets/esri/core/workers/chunks/78e49a70193e5adea17c.js +1 -0
- package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
- package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
- package/assets/esri/core/workers/chunks/830d99e6c58a52a58973.js +1 -0
- package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
- package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +1 -0
- package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
- package/assets/esri/core/workers/chunks/{a4341ec0fe89b865d849.js → a160576f21ada91995ac.js} +1 -1
- package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
- package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/b6bd31674076e543d8b2.js +1 -0
- package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
- package/assets/esri/core/workers/chunks/{562eafa5090827ebb7ec.js → c87e9280681c20d042b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
- package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +9 -13
- package/assets/esri/themes/base/widgets/_Features.scss +5 -0
- package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
- package/assets/esri/themes/base/widgets/_Popup.scss +0 -1
- package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +1506 -314
- package/intl/date.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/queryValidationUtils.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/utils.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/Subtype.d.ts +4 -0
- package/layers/support/Subtype.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/portal/support/jsonContext.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/rest/featureService/FeatureService.d.ts +4 -0
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/featureService/utils.d.ts +4 -0
- package/rest/query/operations/query.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/versionManagement/VersionManagementService.d.ts +4 -0
- package/versionManagement/VersionManagementService.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
- package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOPool.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +4 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
- package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
- package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
- package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
- package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
- package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
- package/assets/esri/core/workers/chunks/7648f3341b7dff2825c3.js +0 -1
- package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
- package/assets/esri/core/workers/chunks/9c77d69a13ec22cdd760.js +0 -1
- package/assets/esri/core/workers/chunks/a821fa1870b83fed5d31.js +0 -1
- package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
- package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
- package/assets/esri/core/workers/chunks/c416df0668f6c596095f.js +0 -1
- package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
- package/assets/esri/core/workers/chunks/f0d342303fc20e266d27.js +0 -1
- package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
- package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
- package/widgets/DirectionalPad.d.ts +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[821],{65845:(e,t,r)=>{r.d(t,{D:()=>o});var a=r(81153);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},30821:(e,t,r)=>{r.d(t,{save:()=>y,saveAs:()=>f});var a=r(64383),o=r(33516),n=r(14661);const i="Group Layer",l="group-layer-save",s="group-layer-save-as",p=n.Kz.GROUP_LAYER_MAP;function u(e){return{isValid:"group"===e.type,errorMessage:"Layer.type should be 'group'"}}function m(e){return{isValid:(0,n._$)(e,p),errorMessage:`Layer.portalItem.typeKeywords should have '${p}'`}}function c(e){const t=e.layerJSON;return t&&delete t.itemId,Promise.resolve(t&&Object.keys(t).length?t:null)}async function d(e,t){t.title||=e.title,(0,n.qj)(t,p)}async function y(e,t){return(0,a.a1)({layer:e,itemType:i,validateLayer:u,validateItem:m,createJSONContext:e=>(0,o.M4)(e),createItemData:c,errorNamePrefix:l},t)}async function f(e,t,r){return(0,a.po)({layer:e,itemType:i,validateLayer:u,createJSONContext:e=>(0,o.M4)(e),createItemData:c,errorNamePrefix:s,newItem:t,setItemProperties:d},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>v});var a=r(20102),o=r(65845),n=r(48522),i=r(15235),l=r(33516),s=r(14661),p=r(14769);async function u(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new a.Z(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e){const{item:t,itemType:r,errorNamePrefix:o,layer:n,validateItem:i}=e;if((0,p.w)(t),t.type!==r)throw new a.Z(`${o}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:n});if(i){const e=i(t);if(!e.isValid)throw new a.Z(`${o}:invalid-parameters`,e.errorMessage,{layer:n})}}function d(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new a.Z(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!o.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));c({...e,item:o})}function y(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=n.Z.getDefault(),c({...e,item:a}),a}async function f(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const o=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),o}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:n}=e;await u(e),d(e);const i=r.portalItem,s=n?n(i):(0,l.Yv)(i),p=await f(r,s,t),m=await a({layer:r,layerJSON:p},i);return w(i),await i.update({data:m}),(0,o.D)(s),i}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:n,setItemProperties:i}=e;await u(e);const s=y(e),p=n?n(s):(0,l.Yv)(s),m=await f(r,p,t),c=await a({layer:r,layerJSON:m},s);return await i(r,s),w(s),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(s,c,t),r.portalItem=s,(0,o.D)(p),s}},33516:(e,t,r)=>{r.d(t,{M4:()=>s,Yv:()=>i,ht:()=>n,wk:()=>l});var a=r(17452),o=r(48522);function n(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||o.Z.getDefault(),portalItem:e}}function l(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function s(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||o.Z.getDefault(),portalItem:e}}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var a=r(68773),o=r(20102),n=r(71058);function i(e){if(a.default.apiKey&&(0,n.r)(e.portal.url))throw new o.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8592],{48853:(e,t,s)=>{s.d(t,{Qn:()=>h,iG:()=>l});var r,n=s(19153),a=s(1542),i=s(17126);(r||(r={})).TimeZoneNotRecognized="TimeZoneNotRecognized";const o={[r.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class c extends Error{constructor(e,t){super((0,n.gx)(o[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}function u(e,t,s){return e<t?e-t:e>s?e-s:0}function m(e,t,s){return e<t?t:e>s?s:e}class l{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,r=0,n=0,a=0,o=0,c){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(r)||isNaN(n)||isNaN(a)||isNaN(o))return null;const d=i.ou.local(e,t).daysInMonth;let f=i.ou.fromObject({day:m(s,1,d),year:e,month:m(t,1,12),hour:m(r,0,23),minute:m(n,0,59),second:m(a,0,59),millisecond:m(o,0,999)},{zone:h(c)});return f=f.plus({months:u(t,1,12),days:u(s,1,d),hours:u(r,0,23),minutes:u(n,0,59),seconds:u(a,0,59),milliseconds:u(o,0,999)}),new l(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const s=h(t);return e.isUnknownTimeZone||s===a.yV.instance?l.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new l(e._date.setZone(s))}static dateJSToArcadeDate(e){return new l(i.ou.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const s=h(t);return new l(i.ou.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new l(i.ou.fromMillis(e,{zone:a.yV.instance}))}static unknownDateJSToArcadeDate(e){return new l(i.ou.fromMillis(e.getTime(),{zone:a.yV.instance}))}static epochToArcadeDate(e,t="system"){const s=h(t);return new l(i.ou.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new l(e)}clone(){return new l(this._date)}changeTimeZone(e){const t=h(e);return l.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const s=h(t);return e.zone===a.yV.instance||s===a.yV.instance?l.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new l(e.setZone(s))}static nowToArcadeDate(e){const t=h(e);return new l(i.ou.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new l(i.ou.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===l.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===a.yV.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new l(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new l(this._date.toUTC())}toLocal(){return new l(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=i.ou.fromISO(e,{setZone:!0});return new l(t)}}function h(e,t=!0){if(e instanceof i.ld)return e;if("system"===e.toLowerCase())return"system";if("utc"===e.toLowerCase())return"UTC";if("unknown"===e.toLowerCase())return a.yV.instance;if(/^[\+\-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=i.Qf.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const s=i.vF.create(e);if(!s.isValid){if(t)throw new c(r.TimeZoneNotRecognized);return null}return s}},77286:(e,t,s)=>{s.d(t,{EI:()=>n,Lz:()=>i,SV:()=>a,U:()=>c,r1:()=>o});var r=s(6570);function n(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 109404;case"miles":case"mile":case"squaremile":case"squaremiles":return 109439;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 109414;case"acres":case"acre":case"ac":return 109402;case"hectares":case"hectare":case"ha":return 109401;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 109442;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 109405;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 109409}return null}function a(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new r.Z({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function i(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 9001;case"miles":case"mile":case"squaremile":case"squaremiles":return 9093;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 9036;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 9096;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 9002;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 9030}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function c(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},22641:(e,t,s)=>{s.d(t,{u:()=>o});var r=s(48853),n=s(70171),a=s(17126);function i(e){e=e.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const s=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of e.match(s)||[])switch(r){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?t+=`'${r.slice(1,-1)}'`:t+=`'${r}'`}return t}class o{constructor(e,t,s){this._year=e,this._month=t,this._day=s,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return e instanceof o&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new o(this._year,this._month,this._day)}toDateTime(e){return a.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.Qn)(e)})}toDateTimeLuxon(e){return a.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.Qn)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null){if(null===e||""===e)return this.toString();if(!(e=i(e)))return"";const t=this.toDateTime("unknown");return r.iG.dateTimeToArcadeDate(t).toFormat(e,{locale:(0,n.Kd)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return r.iG.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd")}toSQLValue(){return this.toFormat("yyyy-LL-dd")}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd")+"'"}plus(e,t){return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return a.ou.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=a.ou.fromMillis(e,{zone:a.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=a.ou.fromSeconds(e,{zone:a.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,s){const r=new o(e,t,s);return!1===r.isValid?null:r}static fromDateJS(e){return o.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return o.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];if(t)(t=i(t))&&s.push(t);else if(null===t||""===t){const t=a.ou.fromISO(e,{setZone:!0});return t.isValid?o.fromParts(t.year,t.month,t.day):null}for(const r of s){const s=a.ou.fromFormat(e,t??r);if(s.isValid)return new o(s.year,s.month,s.day)}return null}static fromNow(e="system"){const t=a.ou.fromJSDate(new Date).setZone((0,r.Qn)(e));return new o(t.year,t.month,t.day)}}},53970:(e,t,s)=>{s.d(t,{n:()=>o});var r=s(77286),n=s(70171),a=s(17126);function i(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let s="";for(const r of e.match(t)||[])switch(r){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":s+=r;break;case"A":case"a":s+="a";break;default:s+=`'${r}'`}return s}class o{constructor(e,t,s,r){this._hour=e,this._minute=t,this._second=s,this._millisecond=r,this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return e instanceof o&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new o(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,r.U)(this.hour)&&(0,r.U)(this.minute)&&(0,r.U)(this.second)&&(0,r.U)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=i(e))?a.ou.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,n.Kd)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,s,r){const n=new o(e,t,s,r);return n.isValid()?n:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),s=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24),n=Math.floor(e%1e3);return new o(r,s,t,n)}static fromDateJS(e){return new o(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new o(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];t?(t=i(t))&&s.push(t):null!==t&&""!==t||(s.push("HH:mm:ss"),s.push("HH:mm:ss.SSS"),s.push("hh:mm:ss a"),s.push("hh:mm:ss.SSS a"),s.push("HH:mm"),s.push("hh:mm a"),s.push("H:mm"),s.push("h:mm a"),s.push("H:mm:ss"),s.push("h:mm:ss a"),s.push("H:mm:ss.SSS"),s.push("h:mm:ss.SSS a"));for(const t of s){const s=a.ou.fromFormat(e,t);if(s.isValid)return new o(s.hour,s.minute,s.second,s.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return a.ou.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},1542:(e,t,s)=>{s.d(t,{A4:()=>a,L9:()=>i,Rw:()=>o,yV:()=>n});var r=s(17126);class n{}function a(e){return e instanceof r.ld?e===n.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return a(e)?n.instance:e}function o(e,t){return r.ou.fromObject({day:e.day,year:e.year,month:e.month,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond},{zone:t})}n.instance=new r.vF("Etc/UTC")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4330],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},94330:(e,t,r)=>{r.d(t,{save:()=>m,saveAs:()=>c});var a=r(64383),n=r(14661);const o="Stream Service",i="stream-layer-save",l="stream-layer-save-as";function s(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function u(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function p(e,t){const{parsedUrl:r,title:a,fullExtent:o}=e;t.url=r.path,t.title||=a,t.extent=null,null!=o&&(t.extent=await(0,n.$o)(o)),(0,n.qj)(t,n.Kz.SINGLE_LAYER)}async function m(e,t){return(0,a.a1)({layer:e,itemType:o,validateLayer:s,createItemData:u,errorNamePrefix:i},t)}async function c(e,t,r){return(0,a.po)({layer:e,itemType:o,validateLayer:s,createItemData:u,errorNamePrefix:l,newItem:t,setItemProperties:p},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>v});var a=r(20102),n=r(65845),o=r(48522),i=r(15235),l=r(33516),s=r(14661),u=r(14769);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e){const{item:t,itemType:r,errorNamePrefix:n,layer:o,validateItem:i}=e;if((0,u.w)(t),t.type!==r)throw new a.Z(`${n}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:o});if(i){const e=i(t);if(!e.isValid)throw new a.Z(`${n}:invalid-parameters`,e.errorMessage,{layer:o})}}function d(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.Z(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));c({...e,item:n})}function f(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.Z.getDefault(),c({...e,item:a}),a}async function y(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:o}=e;await p(e),d(e);const i=r.portalItem,s=o?o(i):(0,l.Yv)(i),u=await y(r,s,t),m=await a({layer:r,layerJSON:u},i);return w(i),await i.update({data:m}),(0,n.D)(s),i}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i}=e;await p(e);const s=f(e),u=o?o(s):(0,l.Yv)(s),m=await y(r,u,t),c=await a({layer:r,layerJSON:m},s);return await i(r,s),w(s),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(s,c,t),r.portalItem=s,(0,n.D)(u),s}},33516:(e,t,r)=>{r.d(t,{M4:()=>s,Yv:()=>i,ht:()=>o,wk:()=>l});var a=r(17452),n=r(48522);function o(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}function l(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function s(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var a=r(68773),n=r(20102),o=r(71058);function i(e){if(a.default.apiKey&&(0,o.r)(e.portal.url))throw new n.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7865,7873,5732],{92835:(e,t,r)=>{r.d(t,{Z:()=>f});var s,i=r(43697),n=r(96674),a=r(35463),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),d=r(30556),c=r(25031);let p=s=class extends n.wq{static get allTime(){return h}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===s&&r===i}expandTo(e,t=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.JE)(r,e,t));let i=this.end;if(i){const r=(0,a.JE)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.Nm)(r,1,e,t)}return new s({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,o;if(i>=t&&i<=r?a=i:t>=i&&t<=n&&(a=t),r>=i&&r<=n?o=r:n>=t&&n<=r&&(o=n),null!=a&&null!=o&&!isNaN(a)&&!isNaN(o)){const e=new s;return e.start=a===-1/0?null:new Date(a),e.end=o===1/0?null:new Date(o),e}return s.empty}offset(e,t,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:n,end:o}=this;return null!=n&&(i.start=(0,a.Nm)(n,e,t,r)),null!=o&&(i.end=(0,a.Nm)(o,e,t,r)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.r)("end")],p.prototype,"readEnd",null),(0,i._)([(0,d.c)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.r)("start")],p.prototype,"readStart",null),(0,i._)([(0,d.c)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.j)("esri.TimeExtent")],p);const h=new p,y=new p({start:void 0,end:void 0}),f=p},5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),i=r(46791),n=(r(66643),r(20102),r(92604),r(26258),r(87538)),a=r(5600),o=r(52011);let l=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,a.Cb)()],l.prototype,"getCollections",void 0),(0,s._)([(0,a.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,s._)([(0,a.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,s._)([(0,o.j)("esri.core.CollectionFlattener")],l);const u=l},17445:(e,t,r)=>{r.d(t,{N1:()=>p,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>m,on:()=>c,tX:()=>v}),r(66643),r(46791);var s=r(91460),i=r(50758),n=r(70586),a=r(95330),o=r(26258);function l(e,t,r={}){return d(e,t,r,h)}function u(e,t,r={}){return d(e,t,r,y)}function d(e,t,r={},s){let i=null;const a=r.once?(e,r)=>{s(e)&&((0,n.hw)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,o.aQ)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return i}function c(e,t,r,a={}){let o=null,u=null,d=null;function c(){o&&u&&(u.remove(),a.onListenerRemove?.(o),o=null,u=null)}function p(e){a.once&&a.once&&(0,n.hw)(d),r(e)}const h=l(e,((e,r)=>{c(),(0,s.vT)(e)&&(o=e,u=(0,s.on)(e,t,p),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return d=(0,i.kB)((()=>{h.remove(),c()})),d}function p(e,t){return function(e,t,r){if((0,a.Hc)(r))return Promise.reject((0,a.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let o=null;function l(){o=(0,n.hw)(o)}return new Promise(((s,n)=>{o=(0,i.AL)([(0,a.fu)(r,(()=>{l(),n((0,a.zE)())})),d(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??h)])}))}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(87538);const f={sync:!0},m={initial:!0},v={sync:!0,initial:!0}},41123:(e,t,r)=>{r.d(t,{D:()=>i,z:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i()}}`}},40504:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var s=r(43697),i=r(57435),n=r(68668),a=r(92604),o=r(16453),l=r(95330),u=r(17445),d=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(71715),h=r(52011),y=r(30556),f=r(31263),m=r(87085),v=r(71612),b=r(38009),g=r(16859),w=r(72965),_=r(87344),I=r(15235),P=r(46791),C=r(70921);function E(e,t,r){let s,i;if(e)for(let n=0,a=e.length;n<a;n++){if(s=e.at(n),s?.[t]===r)return s;if("group"===s?.type&&(i=E(s.layers,t,r),i))return i}}const T=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new P.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||a.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,C.Z)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof m.Z){const s=e;s.parent===this?this.reorder(s,t):r.add(s,t)}else(0,l.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):a.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let s=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,s),s+=1):this.reorder(e,s)}))}findLayerById(e){return E(this.layers,"id",e)}findLayerByUid(e){return E(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,s._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,s._)([(0,h.j)("esri.support.LayersMixin")],t),t};function S(e,t,r){if(e)for(let s=0,i=e.length;s<i;s++){const i=e.at(s);if(i[t]===r)return i;if("group"===i?.type){const e=S(i.tables,t,r);if(e)return e}}}const A=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new P.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&a.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,C.Z)(e,this._get("tables")))}findTableById(e){return S(this.tables,"id",e)}findTableByUid(e){return S(this.tables,"uid",e)}};return(0,s._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,s._)([(0,h.j)("esri.support.TablesMixin")],t),t},L=Symbol("WebScene");var O=r(12259),F=r(35755),x=r(15650);let U=class extends((0,v.h)((0,w.M)((0,b.q)((0,g.I)(A(T((0,o.R)(m.Z)))))))){constructor(e){var t;super(e),this.allLayers=new i.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new i.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,s)=>{const{save:i,saveAs:n}=await r.e(821).then(r.bind(r,30821));switch(e){case O.x.SAVE:return i(this,t);case O.x.SAVE_AS:return n(this,s,t)}}))}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,u.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&L in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,u.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),a.Z.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),u.tX),(0,u.YP)((()=>this.visible),this._onVisibilityChange.bind(this),u.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,r,s){const i=[];if(!e)return i;e.forEach((e=>{const t=(0,x.Nw)(e,s.webmap?s.webmap.getLayerJSONFromResourceInfo(e):null,s);t?.layerType&&i.push(t)})),t.layers=i}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,t,r){const{itemId:s,layerType:i}=t;if("GroupLayer"===i&&s)return new I.default({id:s,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}async beforeSave(){return(0,F.Pl)(this)}load(e){const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service"],layerModuleTypeMap:_.T},e).catch((e=>{if((0,l.r9)(e),this.originIdOf("portalItem")===f.s3.USER)throw e}));return this.addResolvingPromise(t),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}async save(e){return this._debouncedSaveOperations(O.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(O.x.SAVE_AS,t,e)}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,u.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),u.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,c.vw)(this).initialized)return;const r=this.layers;let s=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!s&&(s=r.at(0),s.visible=!0),this._turnOffOtherLayers(s);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,s._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],U.prototype,"allLayers",void 0),(0,s._)([(0,d.Cb)({readOnly:!0})],U.prototype,"allTables",void 0),(0,s._)([(0,d.Cb)()],U.prototype,"fullExtent",void 0),(0,s._)([(0,d.Cb)({json:{read:!0,write:!0}})],U.prototype,"blendMode",void 0),(0,s._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],U.prototype,"layers",void 0),(0,s._)([(0,y.c)("layers")],U.prototype,"_writeLayers",null),(0,s._)([(0,d.Cb)({type:["GroupLayer"]})],U.prototype,"operationalLayerType",void 0),(0,s._)([(0,d.Cb)({json:{origins:{"web-map":{read:!1,write:{overridePolicy:e=>({enabled:"Group Layer"===e?.type})}},"web-scene":{read:!1,write:!1}}}})],U.prototype,"portalItem",null),(0,s._)([(0,p.r)("web-map","portalItem",["itemId"])],U.prototype,"readPortalItem",null),(0,s._)([(0,y.c)("web-map","portalItem",{itemId:{type:String}})],U.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)()],U.prototype,"spatialReference",void 0),(0,s._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],U.prototype,"type",void 0),(0,s._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],U.prototype,"visibilityMode",null),U=(0,s._)([(0,h.j)("esri.layers.GroupLayer")],U);const Z=U},16859:(e,t,r)=>{r.d(t,{I:()=>I});var s=r(43697),i=r(68773),n=r(40330),a=r(3172),o=r(66643),l=r(20102),u=r(92604),d=r(70586),c=r(95330),p=r(17452),h=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),v=r(84230),b=r(48522),g=r(15235),w=r(86082),_=r(14661);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,_.Ss)(r);let i,a;if(s)i=r.portal.url;else try{i=await(0,v.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!i||!(0,p.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new g.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=P.credential===t?P.user:await this._fetchEditingUser(e);return P.credential=t,P.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=b.Z.getDefault();if(i&&i.loaded&&(0,p.Fv)(i.restUrl)===(0,p.Fv)(s))return i.user;const l=`${s}/community/self`,u=null!=e?e.signal:null,d=await(0,o.q6)((0,a.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?w.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||b.Z.getDefault());return r&&s&&!(0,p.tm)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,s._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},P={credential:null,user:null}},97873:(e,t,r)=>{r.d(t,{FO:()=>c,W7:()=>p,addOrUpdateResource:()=>o,fetchResources:()=>a,removeAllResources:()=>u,removeResource:()=>l});var s=r(3172),i=r(20102),n=r(17452);async function a(e,t={},r){await e.load(r);const s=(0,n.v_)(e.itemUrl,"resources"),{start:i=1,num:a=10,sortOrder:o="asc",sortField:l="created"}=t,u={query:{start:i,num:a,sortOrder:o,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(s,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map((({created:t,size:r,resource:s})=>({created:new Date(t),size:r,resource:e.resourceFromPath(s)})))}}async function o(e,t,r,s){if(!e.hasPath())throw new i.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const a=e.portalItem;await a.load(s);const o=(0,n.v_)(a.userItemUrl,"add"===t?"addResources":"updateResources"),[l,u]=d(e.path),c=new FormData;return l&&"."!==l&&c.append("resourcesPrefix",l),null!=s&&s.compress&&c.append("compress","true"),c.append("fileName",u),c.append("file",r,u),c.append("f","json"),s?.access&&c.append("access",s.access),await a.portal.request(o,{method:"post",body:c,signal:s?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new i.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const s=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(s,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function c(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,s.Z)(e.url,{responseType:"blob"})).data}function p(e,t){if(!e.hasPath())return null;const[r,,s]=function(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[s,i]=d(t);return[s,i,r]}(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+s))}},12259:(e,t,r)=>{var s;r.d(t,{x:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))},35755:(e,t,r)=>{r.d(t,{Hn:()=>l,Pl:()=>y,bx:()=>u});var s=r(66643),i=r(20102),n=r(95330),a=r(41123),o=r(97873);async function l(e,t,r=null){const s=await d(e,t,r);await c(s,t,r)}async function u(e,t,r,s,i=null){const n=await d(r,s,i);await e.update({data:t}),await c(n,s,i)}async function d(e,t,r=null){if(!t?.resources)return;const s=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const l=new Set(t.resources.toKeep.map((e=>e.resource.path))),u=new Set,d=[];l.forEach((t=>{s.delete(t),e.paths.push(t)}));for(const i of t.resources.toUpdate)if(s.delete(i.resource.path),l.has(i.resource.path)||u.has(i.resource.path)){const{resource:t,content:s,finish:n,error:l}=i,u=(0,o.W7)(t,(0,a.D)());e.paths.push(u.path),d.push(p({resource:u,content:s,compress:i.compress,finish:n,error:l},r))}else e.paths.push(i.resource.path),d.push(h(i,r)),u.add(i.resource.path);for(const i of t.resources.toAdd)e.paths.push(i.resource.path),s.has(i.resource.path)?s.delete(i.resource.path):d.push(p(i,r));if(0===d.length)return s;const c=await(0,n.UO)(d);if((0,n.k_)(r),c.length>0)throw new i.Z("save:resources","Failed to save one or more resources",{errors:c});return s}async function c(e,t,r=null){if(!e||!t.portalItem)return;const s=[];for(const i of e){const e=t.portalItem.resourceFromPath(i);s.push(e.portalItem.removeResource(e,r))}await(0,n.as)(s)}async function p(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,s.q6)(e.resource.portalItem.addResource(e.resource,await(0,o.FO)(e.content),r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function h(e,t){const r=await(0,s.q6)(e.resource.update(await(0,o.FO)(e.content),t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}async function y(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}}}]);
|