@arcgis/core 4.34.0-next.45 → 4.34.0-next.46

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.
Files changed (148) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/arcade/featureSetUtils.js +1 -1
  4. package/arcade/functions/featuresetbase.js +1 -1
  5. package/arcade/geometry/wkt.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/04cbd3aa9965b2eb71ea.js +1 -0
  8. package/assets/esri/core/workers/chunks/{787d281b2fe1edf6cf30.js → 2bb61f80473b495163e3.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2cda605c302176905e84.js +1 -0
  10. package/assets/esri/core/workers/chunks/{78de16f65ea297452a65.js → 31c6e951b99315e8e68a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3610357c8fa9bec9e0dc.js +1 -0
  12. package/assets/esri/core/workers/chunks/{d547b27ac750953a998f.js → 46a470bea2a3601182dc.js} +1 -1
  13. package/assets/esri/core/workers/chunks/47f2e905ef42e36897aa.js +1 -0
  14. package/assets/esri/core/workers/chunks/4f5e72993a4f5180d703.js +1 -0
  15. package/assets/esri/core/workers/chunks/50d526a16bc86a481055.js +1 -0
  16. package/assets/esri/core/workers/chunks/516b30778cd54d29e362.js +1 -0
  17. package/assets/esri/core/workers/chunks/54b1a960bb8c3fe05976.js +1 -0
  18. package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +1 -0
  19. package/assets/esri/core/workers/chunks/{dd0f1e06b7df953ea223.js → 576792b5e1e13084adba.js} +1 -1
  20. package/assets/esri/core/workers/chunks/5d331f7628514a572f82.js +1 -0
  21. package/assets/esri/core/workers/chunks/65e1f5b20a585e04655a.js +1 -0
  22. package/assets/esri/core/workers/chunks/66db5f77e09d25e33951.js +1 -0
  23. package/assets/esri/core/workers/chunks/{863e87ac982d7727b435.js → 69e37365c17e7cc4168f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/6fe738748ce837811ff4.js +1 -0
  25. package/assets/esri/core/workers/chunks/719450ccd455f503d81a.js +1 -0
  26. package/assets/esri/core/workers/chunks/790e97ddbe318bc75415.js +1 -0
  27. package/assets/esri/core/workers/chunks/7df8c78e36b04ad657d2.js +1 -0
  28. package/assets/esri/core/workers/chunks/838c7fd37b2e78b1d582.js +1 -0
  29. package/assets/esri/core/workers/chunks/8736b78256037b145f8b.js +1 -0
  30. package/assets/esri/core/workers/chunks/8c6119dde0eead8d90d9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{4f3c187a7cb2b1444281.js → 8c81156b1605a16acc29.js} +1 -1
  32. package/assets/esri/core/workers/chunks/8f70650aba8e55eb7a96.js +1 -0
  33. package/assets/esri/core/workers/chunks/{44116cf0bd4d6a127c96.js → 99b9392946d776a62997.js} +1 -1
  34. package/assets/esri/core/workers/chunks/9affcf990ea810fa426b.js +1 -0
  35. package/assets/esri/core/workers/chunks/9b7fee0adffeee8d45ae.js +1 -0
  36. package/assets/esri/core/workers/chunks/9cbec2ffa445a72d4c33.js +1 -0
  37. package/assets/esri/core/workers/chunks/9f178cf73c63caaea190.js +1 -0
  38. package/assets/esri/core/workers/chunks/a6493607b98783bf1ef2.js +1 -0
  39. package/assets/esri/core/workers/chunks/a69258f34a5eb5a1954f.js +1 -0
  40. package/assets/esri/core/workers/chunks/a7ff44157b8cf19de37e.js +1 -0
  41. package/assets/esri/core/workers/chunks/{48514235c32917e43a3f.js → b3e2e826295620b1a9dd.js} +2 -2
  42. package/assets/esri/core/workers/chunks/bd1c2afaf491d1c79a9e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{f34739daceab54a280ad.js → beb77cdae0b1b6ad73da.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{a638f1688ac9525a52a7.js → c2f184e9f579152aa29a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/c483d2149d9d0099bfdb.js +1 -0
  46. package/assets/esri/core/workers/chunks/{349da65a8793f7873366.js → c5a0976de958b3b01c70.js} +1 -1
  47. package/assets/esri/core/workers/chunks/cf6330f721c6910d25ff.js +1 -0
  48. package/assets/esri/core/workers/chunks/{0faec78b2dd6990a5da0.js → d09ded9fb621491e2466.js} +1 -1
  49. package/assets/esri/core/workers/chunks/d1842745a7699879a1e1.js +1 -0
  50. package/assets/esri/core/workers/chunks/d62d41091f7ac5f77f16.js +1 -0
  51. package/assets/esri/core/workers/chunks/d8d17e3ecccec7e99f0b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{01ae7d36bda6b6186786.js → eb61b47df99a54a364c8.js} +1 -1
  53. package/assets/esri/core/workers/chunks/ef02e33ea53b46b566cb.js +1 -0
  54. package/assets/esri/core/workers/chunks/f0ccd7ac83d94cbf40a5.js +1 -0
  55. package/assets/esri/core/workers/chunks/fc6408208c850eec4019.js +1 -0
  56. package/assets/esri/core/workers/chunks/ff79a8df1b1941ae350d.js +1 -0
  57. package/chunks/NativeLine.glsl.js +5 -14
  58. package/chunks/languageUtils.js +1 -1
  59. package/chunks/persistableUrlUtils.js +1 -1
  60. package/colorUtils.js +1 -1
  61. package/config.js +1 -1
  62. package/core/BidiEngine.js +1 -1
  63. package/core/accessorSupport/get.js +1 -1
  64. package/core/accessorSupport/read.js +1 -1
  65. package/core/accessorSupport/tracking.js +1 -1
  66. package/core/screenUtils.js +1 -1
  67. package/core/sql/DateOnly.js +1 -1
  68. package/core/urlUtils.js +1 -1
  69. package/core/uuid.js +1 -1
  70. package/identity/IdentityManagerBase.js +1 -1
  71. package/kernel.js +1 -1
  72. package/layers/graphics/sources/ParquetSource.js +1 -1
  73. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  74. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  75. package/layers/support/TitleCreator.js +1 -1
  76. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  77. package/libs/maquette-advanced-projector/utils.js +1 -1
  78. package/package.json +1 -1
  79. package/rest/generateRenderer.js +1 -1
  80. package/rest/networks/support/TraceResult.js +1 -1
  81. package/smartMapping/statistics/support/utils.js +1 -1
  82. package/support/revision.js +1 -1
  83. package/symbols/cim/cimAnalyzer.js +1 -1
  84. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  85. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  86. package/views/3d/terrain/TerrainRenderer.js +1 -1
  87. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  88. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  89. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  90. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  91. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  92. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  93. package/views/draw/DrawOperation.js +1 -1
  94. package/views/draw/{DrawManipulator.js → LegacyDrawManipulator.js} +1 -1
  95. package/views/draw/{DrawTool.js → LegacyDrawTool.js} +1 -1
  96. package/views/draw/PointDrawAction.js +1 -1
  97. package/views/draw/PolygonDrawAction.js +1 -1
  98. package/views/draw/PolylineDrawAction.js +1 -1
  99. package/views/draw/SegmentDrawAction.js +1 -1
  100. package/views/draw/support/Box.js +1 -1
  101. package/views/draw/support/Reshape.js +1 -1
  102. package/webscene/spec-certification/spec.js +1 -1
  103. package/widgets/Feature/support/featureUtils.js +1 -1
  104. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  105. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  106. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  107. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +5 -0
  108. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  109. package/widgets/OrientedImageryViewer.js +1 -1
  110. package/widgets/Track/TrackViewModel.js +1 -1
  111. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  112. package/assets/esri/core/workers/chunks/0494e1212dd94d927287.js +0 -1
  113. package/assets/esri/core/workers/chunks/092cb42b88ecfb9c4a07.js +0 -1
  114. package/assets/esri/core/workers/chunks/129144cbdb3fcbb87baf.js +0 -1
  115. package/assets/esri/core/workers/chunks/2370ff6c3006691ac688.js +0 -1
  116. package/assets/esri/core/workers/chunks/2c816d3a737e39e6eb84.js +0 -1
  117. package/assets/esri/core/workers/chunks/2f54776ff86f397adc55.js +0 -1
  118. package/assets/esri/core/workers/chunks/3af4a410ff0bca7ba2e3.js +0 -1
  119. package/assets/esri/core/workers/chunks/4970d439d9648e97fd5a.js +0 -1
  120. package/assets/esri/core/workers/chunks/7c7338af011b8f0d7218.js +0 -1
  121. package/assets/esri/core/workers/chunks/838998bfda90f099c6e9.js +0 -1
  122. package/assets/esri/core/workers/chunks/84f3e1ce25c36e46fd2a.js +0 -1
  123. package/assets/esri/core/workers/chunks/8e36693e5213c20158d7.js +0 -1
  124. package/assets/esri/core/workers/chunks/8f3ce10eacb5bc14a641.js +0 -1
  125. package/assets/esri/core/workers/chunks/8fae35af98c29bef8500.js +0 -1
  126. package/assets/esri/core/workers/chunks/91be247f868ce6596c9e.js +0 -1
  127. package/assets/esri/core/workers/chunks/a2a13dd95238bb144479.js +0 -1
  128. package/assets/esri/core/workers/chunks/b45772b72f2b8f4fd53f.js +0 -1
  129. package/assets/esri/core/workers/chunks/b5f6a0607b620b027cdd.js +0 -1
  130. package/assets/esri/core/workers/chunks/c645009f3d2576494bfc.js +0 -1
  131. package/assets/esri/core/workers/chunks/c6e3d4c6bb02d58d5cfe.js +0 -1
  132. package/assets/esri/core/workers/chunks/cd6398a2951922e13b86.js +0 -1
  133. package/assets/esri/core/workers/chunks/ceb63ca9ad473c3f1820.js +0 -1
  134. package/assets/esri/core/workers/chunks/d392fbbcfac2a1b54bd6.js +0 -1
  135. package/assets/esri/core/workers/chunks/da396fdbd6f213042aa7.js +0 -1
  136. package/assets/esri/core/workers/chunks/dd79d3aa6e1a8aee6881.js +0 -1
  137. package/assets/esri/core/workers/chunks/e1272db232194cbe102c.js +0 -1
  138. package/assets/esri/core/workers/chunks/e5aeb34d918dee539694.js +0 -1
  139. package/assets/esri/core/workers/chunks/e65fc26f4384a328a753.js +0 -1
  140. package/assets/esri/core/workers/chunks/e7806a57d29bca385f1d.js +0 -1
  141. package/assets/esri/core/workers/chunks/e799433770e4303fcd9c.js +0 -1
  142. package/assets/esri/core/workers/chunks/ea262087938335fed19f.js +0 -1
  143. package/assets/esri/core/workers/chunks/ec9fd49e0252797f7f6a.js +0 -1
  144. package/assets/esri/core/workers/chunks/f1b02c4bd5fde235212b.js +0 -1
  145. package/assets/esri/core/workers/chunks/f65b2d3a91a0c726fee4.js +0 -1
  146. package/assets/esri/core/workers/chunks/f67997250569069ee2ef.js +0 -1
  147. package/assets/esri/core/workers/chunks/fc3a6f2f99629e57dbbd.js +0 -1
  148. package/assets/esri/core/workers/chunks/ff9eef1940eaa3406223.js +0 -1
@@ -2,19 +2,10 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isColorOrColorEmission as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{addProjViewLocalOrigin as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as c}from"../webscene/support/AlphaCutoff.js";function g(g){const m=new d,{vertex:p,fragment:u,varyings:f}=m;return m.include(r,g),m.include(i,g),t(p,g),m.attributes.add("position","vec3"),f.add("vpos","vec3",{invariant:!0}),p.main.add(n`vpos = position;
5
+ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{VertexColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{addProjViewLocalOrigin as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOID as t}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";function a(a){const d=new n,{vertex:g,fragment:c,varyings:m}=d;return d.fragment.include(e,a),d.include(o,a),d.include(r,a),d.include(t,a),i(g,a),d.attributes.add("position","vec3"),m.add("vpos","vec3",{invariant:!0}),g.main.add(l`vpos = position;
6
6
  forwardNormalizedVertexColor();
7
- gl_Position = transformPosition(proj, view, vpos);`),m.include(s,g),m.fragment.include(o,g),u.uniforms.add(new a("alphaCoverage",(e,o)=>Math.min(1,e.width*o.camera.pixelRatio))),g.hasVertexColors||u.uniforms.add(new l("constantColor",e=>e.color)),u.main.add(n`
7
+ gl_Position = transformPosition(proj, view, vpos);`),a.hasVertexColors||c.uniforms.add(new s("constantColor",e=>e.color)),c.main.add(l`
8
8
  discardBySlice(vpos);
9
-
10
- vec4 color = ${g.hasVertexColors?"vColor":"constantColor"};
11
-
12
- ${9===g.output?"color.a = 1.0;":""}
13
-
14
- if (color.a < ${n.float(c)}) {
15
- discard;
16
- }
17
-
18
- ${e(g.output)?n`fragColor = applySlice(color, vpos);`:""}
19
- calculateOcclusionAndOutputHighlight();
20
- `),m}const m=Object.freeze(Object.defineProperty({__proto__:null,build:g},Symbol.toStringTag,{value:"Module"}));export{m as N,g as b};
9
+ vec4 color = ${a.hasVertexColors?"vColor":"constantColor"};
10
+ outputColorHighlightOID(color, vpos, color.rgb);
11
+ `),d}const d=Object.freeze(Object.defineProperty({__proto__:null,build:a},Symbol.toStringTag,{value:"Module"}));export{d as N,a as b};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../config.js";import{version as t}from"../kernel.js";import{ArcadeDate as n,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as i}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as o}from"../arcade/executionError.js";import{ArcadeFunction as a}from"../arcade/FunctionWrapper.js";import u from"../arcade/ImmutableArray.js";import s from"../arcade/ImmutablePathArray.js";import l from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as f,layerGeometryEsriRestConstants as c}from"../arcade/featureset/support/shared.js";import{format as m,parse as d}from"../core/number.js";import{DateOnly as y}from"../core/sql/DateOnly.js";import{TimeOnly as p}from"../core/sql/TimeOnly.js";import g from"../geometry/Extent.js";import h from"../geometry/Geometry.js";import b from"../geometry/Multipoint.js";import N from"../geometry/Point.js";import S from"../geometry/Polygon.js";import Z from"../geometry/Polyline.js";import T from"../geometry/SpatialReference.js";import{isClockwise as A}from"../geometry/support/coordsUtils.js";import{fromJSON as k}from"../geometry/support/jsonUtils.js";import{getLocale as j}from"../intl/locale.js";import{isBoolean as D,isNumber as O,isString as C,isArray as x,isDate as F,isGraphic as w,isInteger as J}from"../support/guards.js";import{DateTime as M}from"luxon";class R{constructor(e){this.value=e}}class v{constructor(e){this.value=e}}const _={type:"VOID"},I=Symbol("BREAK"),P=Symbol("CONTINUE");function Y(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function L(e){return e instanceof a}function G(e){return e instanceof i}function V(e){return!!C(e)||(!!O(e)||(!!te(e)||(!!ne(e)||(!!re(e)||(!!D(e)||(null===e||(e===_||"number"==typeof e)))))))}function z(e,t){return void 0===e?t:e}function q(e){return null==e?"":x(e)||ee(e)?"Array":te(e)?"Date":re(e)?"Time":ne(e)?"DateOnly":C(e)?"String":D(e)?"Boolean":O(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof i?"Module":H(e)?"Feature":e instanceof N?"Point":e instanceof S?"Polygon":e instanceof Z?"Polyline":e instanceof b?"Multipoint":e instanceof g?"Extent":L(e)?"Function":B(e)?"FeatureSet":Q(e)?"FeatureSetCollection":$(e)?"Voxel":e===_?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function E(e){return e===_}function U(e){return e instanceof h}function H(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function $(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function B(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function K(e){return"esri.arcade.Dictionary"===e?.declaredClass}function W(e){return K(e)||H(e)||$(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof u}function te(e){return e instanceof n}function ne(e){return e instanceof y}function re(e){return e instanceof p}function ie(e){return null!=e&&"object"==typeof e}function oe(e,t,n,r,i){if(e.length<t||e.length>n)throw new o(r,"WrongNumberOfParameters",i)}function ae(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=Y(t,"‰",""),t=Y(t,"¤",""),m(e,{pattern:t}))}function se(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(le(t),{locale:j(),numberingSystem:"latn"})}function le(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|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?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function fe(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function ce(e,t,r){if(null===e){if(null===t||t===_)return fe(null,null,r);if(O(t))return fe(0,t,r);if(C(t))return fe(0,be(t),r);if(D(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}if(e===_){if(null===t||t===_)return fe(null,null,r);if(O(t))return fe(0,t,r);if(C(t))return fe(0,be(t),r);if(D(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(O(e)){if(O(t))return fe(e,t,r);if(D(t))return fe(e,be(t),r);if(null===t||t===_)return fe(e,0,r);if(C(t))return fe(e,be(t),r);if(te(t))return fe(e,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(C(e)){if(C(t))return fe(ye(e),ye(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(O(t))return fe(be(e),t,r);if(null===t||t===_)return fe(be(e),0,r);if(D(t))return fe(be(e),be(t),r)}else if(te(e)){if(te(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=n.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=n.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),fe(e.toNumber(),t.toNumber(),r);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,"CannotCompareDateAndTime",null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(D(e)){if(D(t))return fe(e,t,r);if(O(t))return fe(be(e),be(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(null===t||t===_)return fe(be(e),0,r);if(C(t))return fe(be(e),be(t),r)}else if(ne(e)){if(te(t))return fe(e.toNumber(),t.toNumber(),r);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,"CannotCompareDateAndTime",null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(re(e)){if(te(t))throw new o(null,"CannotCompareDateAndTime",null);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))return fe(e.toNumber(),t.toNumber(),r);if(ne(t))throw new o(null,"CannotCompareDateAndTime",null)}return!!me(e,t)&&("<="===r||">="===r)}function me(e,t){if(e===t)return!0;if(null===e&&t===_||null===t&&e===_)return!0;if(te(e)&&te(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof l)return e.equalityTest(t);if(e instanceof N&&t instanceof N){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function de(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":D(i)||O(i)||C(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):U(i)?n+=JSON.stringify(r)+":"+ge(i):re(i)||ne(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+ge(i,null,t):te(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function ye(e,t){if(C(e))return e;if(null===e)return"";if(O(e))return ue(e,t);if(D(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof h)return JSON.stringify(e.toJSON());if(x(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=he(e[n]);return"["+t.join(",")+"]"}if(e instanceof u){const t=[];for(let n=0;n<e.length();n++)t[n]=he(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():L(e)?"object, Function":e===_?"":G(e)?"object, Module":""}function pe(e){const t=[];if(e instanceof u){for(let n=0;n<e.length();n++)t[n]=be(e.get(n));return t}if(!x(e))return null;for(let n=0;n<e.length;n++)t[n]=be(e[n]);return t}function ge(e,t,n=!1){if(C(e))return e;if(null===e)return"";if(O(e))return ue(e,t);if(D(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof h)return e instanceof g?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+xe(e.spatialReference)+"}":xe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(x(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=he(e[r],n);return"["+t.join(",")+"]"}if(e instanceof u){const t=[];for(let r=0;r<e.length();r++)t[r]=he(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):L(e)?"object, Function":e===_?"":G(e)?"object, Module":""}function he(e,t=!1){if(null===e)return"null";if(D(e)||C(e))return JSON.stringify(e);if(O(e))return e.toString();if(e instanceof h)return ge(e,null,t);if(e instanceof u)return ge(e,null,t);if(Array.isArray(e))return ge(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(se(e,""));if(re(e))return JSON.stringify(e.toString());if(ne(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===_)return"null";return"null"}function be(e,t){return O(e)?e:null===e||""===e?0:te(e)||ne(e)||re(e)?NaN:D(e)?e?1:0:x(e)||""===e||void 0===e?NaN:void 0!==t&&C(e)?(t=Y(t,"‰",""),t=Y(t,"¤",""),d(e,{pattern:t})):e===_?0:Number(e)}function Ne(e,t){if(te(e))return e;if(C(e)){const r=Se(e,t);if(r)return n.dateTimeToArcadeDate(r)}return null}function Se(e,t){const n=/ (\d\d)/,i=r(t);let o=M.fromISO(e,{zone:i});return o.isValid||n.test(e)&&(e=e.replace(n,"T$1"),o=M.fromISO(e,{zone:t}),o.isValid)?o:null}function Ze(e){return D(e)?e:C(e)?"true"===(e=e.toLowerCase()):!!O(e)&&(0!==e&&!isNaN(e))}function Te(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),k(n)}function Ae(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof N)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof S){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof Z){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof b?0===e.points.length?null:e:e instanceof g?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function je(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(te(t))n=t.toNumber();else if(ne(t))n=t.toString();else if(re(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=ye(t);else{if(null==t)return null;if(""===t)return t;n=be(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===n&&(r=t)}return null===r?ye(t):r.name}function De(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=ye(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===r&&(n=t)}return null===n?t:n.code}function Oe(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,a,u=null;for(let o=0;o<t.fields.length;o++){const n=t.fields[o];n.name.toLowerCase()===e.toString().toLowerCase()&&(u=n)}if(null===u)throw new o(null,"FieldNotFound",null,{key:e});let s=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(s=t.subtypeField,l="code",f=t.subtypes??[]),null===r&&n&&s)r=n.hasField(s)?n.field(s):null;else if(s&&null!==r){let e=!1;for(const t of f||[])if(r===t[l]){e=!0;break}if(!e)for(const t of f||[])if(r===t.name){r=t[l],e=!0;break}e||(r=null,n&&s&&(r=n.hasField(s)?n.field(s):null))}return null!=r&&f.some(e=>e[l]===r&&(i=e.domains?.[u.name],i&&"inherited"===i.type&&(i=Ce(u.name,t),a=!0),!0)),a||i||(i=Ce(e,t)),{field:u,domain:i}}function Ce(e,t){let n;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n)),n}function xe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},o={key:n,value:e[n]};return i(r,o)}});var i;const o=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,a;if(Array.isArray(t)){for(a="[",i=0;i<t.length;i++)i&&(a+=","),a+=e(t[i])||"null";return a+"]"}if(null===t)return"null";if(o.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const u=o.push(t)-1,s=Object.keys(t).sort(r?.(t));for(a="",i=0;i<s.length;i++){const n=s[i],r=e(t[n]);r&&(a&&(a+=","),a+=JSON.stringify(n)+":"+r)}return o.splice(u,1),"{"+a+"}"}(e)}function Fe(e){if(null===e)return null;const t=[];for(const n of e)H(n)?t.push(n.geometry()):t.push(n);return t}function we(e,t){if(!(t instanceof N))throw new o(null,"InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Je(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],a=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(a=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,a=e.get(0).spatialReference);else{if(!ee(e))throw new o(null,"InvalidParameter",null);for(const t of e.toArray())we(i,t);i.length>0&&(a=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}if(0===i.length)return null;return A(i)||(i=i.slice().reverse()),new S({rings:[i],spatialReference:a,hasZ:n,hasM:r})}return e}function Me(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new Z({paths:[i],spatialReference:o,hasZ:n,hasM:r})}return e}function Re(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new b({points:i,spatialReference:o,hasZ:n,hasM:r})}return e}function ve(e,t=!0){if(null==e)return[];if(x(e)){const n=[];for(const r of e){const e=ye(r);(t||""!==e)&&n.push(e)}return n}if(ee(e)){const n=[];for(let r=0;r<e.length();r++){const i=ye(e.get(r));(t||""!==i)&&n.push(i)}return n}if(V(e)){const n=ye(e);if(t||""!==n)return[n]}return[]}let _e=0;function Ie(e){return _e++,_e%100==0?(_e=0,new Promise(t=>{setTimeout(()=>{t(e)},0)})):e}function Pe(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Ye(e,t=null){return null==e?null:D(e)||O(e)||C(e)?e:e instanceof h?!0===t?.keepGeometryType?e:e.toJSON():e instanceof u?e.toArray().map(e=>Ye(e,t)):Array.isArray(e)?e.map(e=>Ye(e,t)):F(e)?e:te(e)?e.toJSDate():re(e)?e.toString():ne(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Le(e,t,n,r,i){const o=await Ge(e,t,n);i[r]=o}async function Ge(e,t=null,n=null){if(e instanceof u&&(e=e.toArray()),null==e)return null;if(V(e)||e instanceof h||F(e)||te(e))return Ye(e,n);if(Array.isArray(e)){const r=[],i=[];for(const o of e)null===o||V(o)||o instanceof h||F(o)||te(o)?i.push(Ye(o,n)):(i.push(null),r.push(Le(o,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,n){const r=Ve(e.fullSchema());if(null===r)return null;if(!r.fields)return null;return Oe(t,r,e,n)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const o=Oe(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(a){return null}return je(o,n)}function $e(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(o){return null}return n}return De(Oe(t,i,e,r),n)}function Be(e){return e?.timeZone??"system"}function Ke(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(f(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===c[t.geometryType]?"":c[t.geometryType],fields:n}}function We(r,i){const o=n.systemTimeZoneCanonicalName;return"system"===r&&(r=o),{version:Qe,engineVersion:t,timeZone:r,userTimeZone:o,spatialReference:i instanceof T?i.toJSON():i,application:e.applicationName??"",engine:"web",locale:j()}}const Qe="1.32",Xe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:v,ReturnResult:R,absRound:ae,arcadeVersion:Qe,autoCastArrayOfPointsToMultiPoint:Re,autoCastArrayOfPointsToPolygon:Je,autoCastArrayOfPointsToPolyline:Me,autoCastFeatureToGeometry:Fe,binaryOperator:Pe,breakResult:I,castAsJson:Ye,castAsJsonAsync:Ge,castRecordToText:de,continueResult:P,defaultExecutingContext:We,defaultTimeZone:Be,defaultUndefined:z,equalityTest:me,featureDomainCodeLookup:$e,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Ke,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:Ae,formatDate:se,formatNumber:ue,getDomain:Oe,getDomainCode:De,getDomainValue:je,getType:q,greaterThanLessThan:ce,isArray:x,isBoolean:D,isDate:te,isDateOnly:ne,isDictionary:K,isDictionaryLike:W,isFeature:H,isFeatureSet:B,isFeatureSetCollection:Q,isFunctionParameter:L,isGeometry:U,isGraphic:w,isImmutableArray:ee,isInteger:J,isJsDate:F,isKnowledgeGraph:X,isModule:G,isNumber:O,isObject:ie,isSimpleType:V,isString:C,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:re,isVoid:E,isVoxel:$,multiReplace:Y,parseGeometryFromJson:Te,pcCheck:oe,stableStringify:xe,standardiseDateFormat:le,tick:Ie,toBoolean:Ze,toDate:Ne,toNumber:be,toNumberArray:pe,toString:ye,toStringArray:ve,toStringExplicit:ge,voidOperation:_},Symbol.toStringTag,{value:"Module"}));export{ze as $,P as A,oe as B,Fe as C,Ae as D,Je as E,Me as F,Re as G,Ze as H,v as I,z as J,Be as K,ve as L,q as M,Ne as N,le as O,ae as P,Ee as Q,R,$e as S,He as T,Ke as U,Ue as V,ke as W,$ as X,Y,We as Z,pe as _,Ye as a,Ie as a0,Oe as a1,je as a2,De as a3,G as a4,ie as a5,ue as a6,se as a7,Te as a8,xe as a9,qe as aa,Qe as ab,Ge as b,de as c,V as d,te as e,ne as f,re as g,U as h,L as i,ee as j,H as k,Q as l,B as m,K as n,X as o,Xe as p,E as q,W as r,be as s,ge as t,ye as u,_ as v,ce as w,me as x,Pe as y,I as z};
5
+ import e from"../config.js";import{version as t}from"../kernel.js";import{ArcadeDate as n,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as i}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as o}from"../arcade/executionError.js";import{ArcadeFunction as a}from"../arcade/FunctionWrapper.js";import u from"../arcade/ImmutableArray.js";import s from"../arcade/ImmutablePathArray.js";import l from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as f,layerGeometryEsriRestConstants as c}from"../arcade/featureset/support/shared.js";import{format as m,parse as d}from"../core/number.js";import{DateOnly as y}from"../core/sql/DateOnly.js";import{TimeOnly as p}from"../core/sql/TimeOnly.js";import g from"../geometry/Extent.js";import h from"../geometry/Geometry.js";import b from"../geometry/Multipoint.js";import N from"../geometry/Point.js";import S from"../geometry/Polygon.js";import Z from"../geometry/Polyline.js";import T from"../geometry/SpatialReference.js";import{isClockwise as A}from"../geometry/support/coordsUtils.js";import{fromJSON as k}from"../geometry/support/jsonUtils.js";import{getLocale as j}from"../intl/locale.js";import{isBoolean as D,isNumber as O,isString as C,isArray as x,isDate as F,isGraphic as w,isInteger as J}from"../support/guards.js";import{DateTime as M}from"luxon";class R{constructor(e){this.value=e}}class v{constructor(e){this.value=e}}const _={type:"VOID"},I=Symbol("BREAK"),P=Symbol("CONTINUE");function Y(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function L(e){return e instanceof a}function G(e){return e instanceof i}function V(e){return!!C(e)||(!!O(e)||(!!te(e)||(!!ne(e)||(!!re(e)||(!!D(e)||(null===e||(e===_||"number"==typeof e)))))))}function z(e,t){return void 0===e?t:e}function q(e){return null==e?"":x(e)||ee(e)?"Array":te(e)?"Date":re(e)?"Time":ne(e)?"DateOnly":C(e)?"String":D(e)?"Boolean":O(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof i?"Module":H(e)?"Feature":e instanceof N?"Point":e instanceof S?"Polygon":e instanceof Z?"Polyline":e instanceof b?"Multipoint":e instanceof g?"Extent":L(e)?"Function":$(e)?"FeatureSet":Q(e)?"FeatureSetCollection":W(e)?"Voxel":e===_?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function E(e){return e===_}function U(e){return e instanceof h}function H(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function W(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function $(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function B(e){return"esri.arcade.Dictionary"===e?.declaredClass}function K(e){return B(e)||H(e)||W(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof u}function te(e){return e instanceof n}function ne(e){return e instanceof y}function re(e){return e instanceof p}function ie(e){return null!=e&&"object"==typeof e}function oe(e,t,n,r,i){if(e.length<t||e.length>n)throw new o(r,"WrongNumberOfParameters",i)}function ae(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=Y(t,"‰",""),t=Y(t,"¤",""),m(e,{pattern:t}))}function se(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(le(t),{locale:j(),numberingSystem:"latn"})}function le(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|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?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function fe(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function ce(e,t,r){if(null===e){if(null===t||t===_)return fe(null,null,r);if(O(t))return fe(0,t,r);if(C(t))return fe(0,be(t),r);if(D(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}if(e===_){if(null===t||t===_)return fe(null,null,r);if(O(t))return fe(0,t,r);if(C(t))return fe(0,be(t),r);if(D(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(O(e)){if(O(t))return fe(e,t,r);if(D(t))return fe(e,be(t),r);if(null===t||t===_)return fe(e,0,r);if(C(t))return fe(e,be(t),r);if(te(t))return fe(e,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(C(e)){if(C(t))return fe(ye(e),ye(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(O(t))return fe(be(e),t,r);if(null===t||t===_)return fe(be(e),0,r);if(D(t))return fe(be(e),be(t),r)}else if(te(e)){if(te(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=n.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=n.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),fe(e.toNumber(),t.toNumber(),r);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,"CannotCompareDateAndTime",null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(D(e)){if(D(t))return fe(e,t,r);if(O(t))return fe(be(e),be(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(null===t||t===_)return fe(be(e),0,r);if(C(t))return fe(be(e),be(t),r)}else if(ne(e)){if(te(t))return fe(e.toNumber(),t.toNumber(),r);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,"CannotCompareDateAndTime",null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(re(e)){if(te(t))throw new o(null,"CannotCompareDateAndTime",null);if(null===t||t===_)return fe(e.toNumber(),0,r);if(O(t))return fe(e.toNumber(),t,r);if(D(t))return fe(e.toNumber(),be(t),r);if(C(t))return fe(e.toNumber(),be(t),r);if(re(t))return fe(e.toNumber(),t.toNumber(),r);if(ne(t))throw new o(null,"CannotCompareDateAndTime",null)}return!!me(e,t)&&("<="===r||">="===r)}function me(e,t){if(e===t)return!0;if(null===e&&t===_||null===t&&e===_)return!0;if(te(e)&&te(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof l)return e.equalityTest(t);if(e instanceof N&&t instanceof N){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function de(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":D(i)||O(i)||C(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):U(i)?n+=JSON.stringify(r)+":"+ge(i):re(i)||ne(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+ge(i,null,t):te(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function ye(e,t){if(C(e))return e;if(null===e)return"";if(O(e))return ue(e,t);if(D(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof h)return JSON.stringify(e.toJSON());if(x(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=he(e[n]);return"["+t.join(",")+"]"}if(e instanceof u){const t=[];for(let n=0;n<e.length();n++)t[n]=he(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():L(e)?"object, Function":e===_?"":G(e)?"object, Module":""}function pe(e){const t=[];if(e instanceof u){for(let n=0;n<e.length();n++)t[n]=be(e.get(n));return t}if(!x(e))return null;for(let n=0;n<e.length;n++)t[n]=be(e[n]);return t}function ge(e,t,n=!1){if(C(e))return e;if(null===e)return"";if(O(e))return ue(e,t);if(D(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof h)return e instanceof g?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+xe(e.spatialReference)+"}":xe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(x(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=he(e[r],n);return"["+t.join(",")+"]"}if(e instanceof u){const t=[];for(let r=0;r<e.length();r++)t[r]=he(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):L(e)?"object, Function":e===_?"":G(e)?"object, Module":""}function he(e,t=!1){if(null===e)return"null";if(D(e)||C(e))return JSON.stringify(e);if(O(e))return e.toString();if(e instanceof h)return ge(e,null,t);if(e instanceof u)return ge(e,null,t);if(Array.isArray(e))return ge(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(se(e,""));if(re(e))return JSON.stringify(e.toString());if(ne(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===_)return"null";return"null"}function be(e,t){return O(e)?e:null===e||""===e?0:te(e)||ne(e)||re(e)?NaN:D(e)?e?1:0:x(e)||""===e||void 0===e?NaN:void 0!==t&&C(e)?(t=Y(t,"‰",""),t=Y(t,"¤",""),d(e,{pattern:t})):e===_?0:Number(e)}function Ne(e,t){if(te(e))return e;if(C(e)){const r=Se(e,t);if(r)return n.dateTimeToArcadeDate(r)}return null}function Se(e,t){const n=/ (\d\d)/,i=r(t);let o=M.fromISO(e,{zone:i});return o.isValid||n.test(e)&&(e=e.replace(n,"T$1"),o=M.fromISO(e,{zone:t}),o.isValid)?o:null}function Ze(e){return D(e)?e:C(e)?"true"===(e=e.toLowerCase()):!!O(e)&&(0!==e&&!isNaN(e))}function Te(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),k(n)}function Ae(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof N)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof S){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof Z){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof b?0===e.points.length?null:e:e instanceof g?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function je(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(te(t))n=t.toNumber();else if(ne(t))n=t.toString();else if(re(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=ye(t);else{if(null==t)return null;if(""===t)return t;n=be(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===n&&(r=t)}return null===r?ye(t):r.name}function De(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=ye(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===r&&(n=t)}return null===n?t:n.code}function Oe(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,a,u=null;for(let o=0;o<t.fields.length;o++){const n=t.fields[o];n.name.toLowerCase()===e.toString().toLowerCase()&&(u=n)}if(null===u)throw new o(null,"FieldNotFound",null,{key:e});let s=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(s=t.subtypeField,l="code",f=t.subtypes??[]),null===r&&n&&s)r=n.hasField(s)?n.field(s):null;else if(s&&null!==r){let e=!1;for(const t of f||[])if(r===t[l]){e=!0;break}if(!e)for(const t of f||[])if(r===t.name){r=t[l],e=!0;break}e||(r=null,n&&s&&(r=n.hasField(s)?n.field(s):null))}return null!=r&&f.some(e=>e[l]===r&&(i=e.domains?.[u.name],i&&"inherited"===i.type&&(i=Ce(u.name,t),a=!0),!0)),a||i||(i=Ce(e,t)),{field:u,domain:i}}function Ce(e,t){let n;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n)),n}function xe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},o={key:n,value:e[n]};return i(r,o)}});var i;const o=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,a;if(Array.isArray(t)){for(a="[",i=0;i<t.length;i++)i&&(a+=","),a+=e(t[i])||"null";return a+"]"}if(null===t)return"null";if(o.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const u=o.push(t)-1,s=Object.keys(t).sort(r?.(t));for(a="",i=0;i<s.length;i++){const n=s[i],r=e(t[n]);r&&(a&&(a+=","),a+=JSON.stringify(n)+":"+r)}return o.splice(u,1),"{"+a+"}"}(e)}function Fe(e){if(null===e)return null;const t=[];for(const n of e)H(n)?t.push(n.geometry()):t.push(n);return t}function we(e,t){if(!(t instanceof N))throw new o(null,"InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Je(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],a=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(a=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,a=e.get(0).spatialReference);else{if(!ee(e))throw new o(null,"InvalidParameter",null);for(const t of e.toArray())we(i,t);i.length>0&&(a=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}if(0===i.length)return null;return A(i)||(i=i.slice().reverse()),new S({rings:[i],spatialReference:a,hasZ:n,hasM:r})}return e}function Me(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new Z({paths:[i],spatialReference:o,hasZ:n,hasM:r})}return e}function Re(e,t){if(x(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(x(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof l)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new b({points:i,spatialReference:o,hasZ:n,hasM:r})}return e}function ve(e,t=!0){if(null==e)return[];if(x(e)){const n=[];for(const r of e){const e=ye(r);(t||""!==e)&&n.push(e)}return n}if(ee(e)){const n=[];for(let r=0;r<e.length();r++){const i=ye(e.get(r));(t||""!==i)&&n.push(i)}return n}if(V(e)){const n=ye(e);if(t||""!==n)return[n]}return[]}let _e=0;function Ie(e){return _e++,_e%100==0?(_e=0,new Promise(t=>{setTimeout(()=>{t(e)},0)})):e}function Pe(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Ye(e,t=null){return null==e?null:D(e)||O(e)||C(e)?e:e instanceof h?!0===t?.keepGeometryType?e:e.toJSON():e instanceof u?e.toArray().map(e=>Ye(e,t)):Array.isArray(e)?e.map(e=>Ye(e,t)):F(e)?e:te(e)?e.toJSDate():re(e)?e.toString():ne(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Le(e,t,n,r,i){const o=await Ge(e,t,n);i[r]=o}async function Ge(e,t=null,n=null){if(e instanceof u&&(e=e.toArray()),null==e)return null;if(V(e)||e instanceof h||F(e)||te(e))return Ye(e,n);if(Array.isArray(e)){const r=[],i=[];for(const o of e)null===o||V(o)||o instanceof h||F(o)||te(o)?i.push(Ye(o,n)):(i.push(null),r.push(Le(o,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,n){const r=Ve(e.fullSchema());if(null===r)return null;if(!r.fields)return null;return Oe(t,r,e,n)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const o=Oe(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(a){return null}return je(o,n)}function We(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(o){return null}return n}return De(Oe(t,i,e,r),n)}function $e(e){return e?.timeZone??"system"}function Be(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(f(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===c[t.geometryType]?"":c[t.geometryType],fields:n}}function Ke(r,i){const o=n.systemTimeZoneCanonicalName;return"system"===r&&(r=o),{version:Qe,engineVersion:t,timeZone:r,userTimeZone:o,spatialReference:i instanceof T?i.toJSON():i,application:e.applicationName??"",engine:"web",locale:j()}}const Qe="1.32",Xe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:v,ReturnResult:R,absRound:ae,arcadeVersion:Qe,autoCastArrayOfPointsToMultiPoint:Re,autoCastArrayOfPointsToPolygon:Je,autoCastArrayOfPointsToPolyline:Me,autoCastFeatureToGeometry:Fe,binaryOperator:Pe,breakResult:I,castAsJson:Ye,castAsJsonAsync:Ge,castRecordToText:de,continueResult:P,defaultExecutingContext:Ke,defaultTimeZone:$e,defaultUndefined:z,equalityTest:me,featureDomainCodeLookup:We,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Be,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:Ae,formatDate:se,formatNumber:ue,getDomain:Oe,getDomainCode:De,getDomainValue:je,getType:q,greaterThanLessThan:ce,isArray:x,isBoolean:D,isDate:te,isDateOnly:ne,isDictionary:B,isDictionaryLike:K,isFeature:H,isFeatureSet:$,isFeatureSetCollection:Q,isFunctionParameter:L,isGeometry:U,isGraphic:w,isImmutableArray:ee,isInteger:J,isJsDate:F,isKnowledgeGraph:X,isModule:G,isNumber:O,isObject:ie,isSimpleType:V,isString:C,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:re,isVoid:E,isVoxel:W,multiReplace:Y,parseGeometryFromJson:Te,pcCheck:oe,stableStringify:xe,standardiseDateFormat:le,tick:Ie,toBoolean:Ze,toDate:Ne,toNumber:be,toNumberArray:pe,toString:ye,toStringArray:ve,toStringExplicit:ge,voidOperation:_},Symbol.toStringTag,{value:"Module"}));export{ze as $,P as A,oe as B,Fe as C,Ae as D,Je as E,Me as F,Re as G,Ze as H,v as I,z as J,$e as K,ve as L,q as M,Ne as N,le as O,ae as P,Ee as Q,R,We as S,He as T,Be as U,Ue as V,ke as W,W as X,Y,Ke as Z,pe as _,Ye as a,Ie as a0,Oe as a1,je as a2,De as a3,G as a4,ie as a5,ue as a6,se as a7,Te as a8,xe as a9,qe as aa,Qe as ab,Ge as b,de as c,V as d,te as e,ne as f,re as g,U as h,L as i,ee as j,H as k,Q as l,$ as m,B as n,X as o,Xe as p,E as q,K as r,be as s,ge as t,ye as u,_ as v,ce as w,me as x,Pe as y,I as z};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{id as e}from"../kernel.js";import{makeAbsolute as t,makeRelative as r,isAbsolute as s,normalize as o,isDataProtocol as l,changeDomain as n,hasSameOrigin as c,getAppUrl as a,splitPathExtension as i}from"../core/urlUtils.js";import{normalizeArcGISOnlineOrgDomain as u}from"../portal/support/urlUtils.js";function p(e,s){const o=s?.url?.path;if(e&&o&&(e=t(e,o,{preserveProtocolRelative:!0}),s.portalItem&&s.readResourcePaths)){const t=r(e,s.portalItem.itemUrl);null!=t&&U.test(t)&&s.readResourcePaths.push(s.portalItem.resourceFromPath(t).path)}return(e=I(e,s?.portal))&&d.test(e)?R(e):e}function m(e,n,c=0){if(null==(e=e&&d.test(e)?w(e):e))return e;!s(e)&&n?.blockedRelativeUrls&&n.blockedRelativeUrls.push(e);let a=t(e);if(n){const t=n.verifyItemRelativeUrls?.rootPath||n.url?.path;if(t){const s=I(t,n.portal),o=I(a,n.portal);a=r(o,s,s);null!=a&&a!==o&&a!==e&&n.verifyItemRelativeUrls&&n.verifyItemRelativeUrls.writtenUrls.push(a)}}return a=x(a,n?.portal),s(a)&&(a=o(a)),n?.resources&&n?.portalItem&&!s(a)&&!l(a)&&0===c&&n.resources.toKeep.push({resource:n.portalItem.resourceFromPath(a),compress:!1}),a}function f(e,t,r){return p(e,r)}function h(e,t,r,s){const o=m(e,s);void 0!==o&&(t[r]=o)}const d=/\/items\/([^/]+)\/resources\/(.*)/,U=/^\.\/resources\//;function v(e){const t=e?.match(d)??null;return t?.[1]??null}function g(e){const t=e?.match(d)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=i(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:l}=i(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:l}}function x(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?n(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function I(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=a();return c(s,`${s.scheme}://${r}`)?n(e,t.portalHostname,r):n(e,r,t.portalHostname)}function R(t){if(!t)return t||null;let r=t;return r&&e&&!e.findCredential(r)&&(r=u(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(t){if(!t)return t||null;let r=t;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&e&&!e.findCredential(r)&&(r=u(r)),r}const y=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:x,fromCDNUrl:w,fromJSON:p,itemIdFromResourceUrl:v,prefixAndFilenameFromResourceUrl:g,read:f,toCDNUrl:R,toJSON:m,write:h},Symbol.toStringTag,{value:"Module"}));export{R as a,y as b,w as c,x as e,p as f,v as i,g as p,f as r,m as t,h as w};
5
+ import{id as e}from"../kernel.js";import{makeAbsolute as t,makeRelative as r,isAbsolute as s,normalize as o,isDataProtocol as l,changeDomain as n,hasSameOrigin as a,getAppUrl as c,splitPathExtension as i}from"../core/urlUtils.js";import{normalizeArcGISOnlineOrgDomain as u}from"../portal/support/urlUtils.js";function p(e,s){const o=s?.url?.path;if(e&&o&&(e=t(e,o,{preserveProtocolRelative:!0}),s.portalItem&&s.readResourcePaths)){const t=r(e,s.portalItem.itemUrl);null!=t&&t.startsWith(U)&&s.readResourcePaths.push(s.portalItem.resourceFromPath(t).path)}return(e=I(e,s?.portal))&&d.test(e)?R(e):e}function m(e,n,a=0){if(null==(e=e&&d.test(e)?w(e):e))return e;!s(e)&&n?.blockedRelativeUrls&&n.blockedRelativeUrls.push(e);let c=t(e);if(n){const t=n.verifyItemRelativeUrls?.rootPath||n.url?.path;if(t){const s=I(t,n.portal),o=I(c,n.portal);c=r(o,s,s);null!=c&&c!==o&&c!==e&&n.verifyItemRelativeUrls&&n.verifyItemRelativeUrls.writtenUrls.push(c)}}return c=x(c,n?.portal),s(c)&&(c=o(c)),n?.resources&&n?.portalItem&&!s(c)&&!l(c)&&0===a&&n.resources.toKeep.push({resource:n.portalItem.resourceFromPath(c),compress:!1}),c}function f(e,t,r){return p(e,r)}function h(e,t,r,s){const o=m(e,s);void 0!==o&&(t[r]=o)}const d=/\/items\/([^/]+)\/resources\/(.*)/,U="./resources/";function v(e){const t=e?.match(d)??null;return t?.[1]??null}function g(e){const t=e?.match(d)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=i(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:l}=i(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:l}}function x(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?n(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function I(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=c();return a(s,`${s.scheme}://${r}`)?n(e,t.portalHostname,r):n(e,r,t.portalHostname)}function R(t){if(!t)return t||null;let r=t;return r&&e&&!e.findCredential(r)&&(r=u(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(t){if(!t)return t||null;let r=t;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&e&&!e.findCredential(r)&&(r=u(r)),r}const y=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:x,fromCDNUrl:w,fromJSON:p,itemIdFromResourceUrl:v,prefixAndFilenameFromResourceUrl:g,read:f,toCDNUrl:R,toJSON:m,write:h},Symbol.toStringTag,{value:"Module"}));export{R as a,y as b,w as c,x as e,p as f,v as i,g as p,f as r,m as t,h as w};
package/colorUtils.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const e={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(r){return!!e[r]||!!e[r.toLowerCase()]}function n(r){return e[r]??e[r.toLowerCase()]}function l(e){return[...n(e)]}function a(e,r,n){n<0&&++n,n>1&&--n;const l=6*n;return l<1?e+(r-e)*l:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e}function t(e,r,n,l=1){const t=(e%360+360)%360/360,i=n<=.5?n*(r+1):n+r-n*r,o=2*n-i;return[Math.round(255*a(o,i,t+1/3)),Math.round(255*a(o,i,t)),Math.round(255*a(o,i,t-1/3)),l]}function i(e){const r=e.length>5,n=r?8:4,l=(1<<n)-1,a=r?1:17,t=r?9===e.length:5===e.length;let i=Number("0x"+e.slice(1));if(isNaN(i))return null;const o=[0,0,0,1];let s;return t&&(s=i&l,i>>=n,o[3]=a*s/255),s=i&l,i>>=n,o[2]=a*s,s=i&l,i>>=n,o[1]=a*s,s=i&l,i>>=n,o[0]=a*s,o}function o(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),l=parseInt(e.slice(3,4),16),a=4===e.length?15:parseInt(e.slice(4),16);return[r+16*r,n+16*n,l+16*l,(a+16*a)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function s(e){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(r[3]=parseFloat(e[3])),u(r)}return u(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return t(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function u(e){return e[0]=h(e[0]),e[1]=h(e[1]),e[2]=h(e[2]),e[3]=4===e.length?c(e[3]):1,e}function g(e){let l=r(e)?n(e):null;return l??=s(e),l??=o(e),l}function d(e){const r=g(e);return null!=r?[r[0]/255,r[1]/255,r[2]/255,r[3]]:null}function c(e){return m(e,0,1)}function h(e){return Math.round(m(e,0,255))}function m(e,r,n){return e=Number(e),isNaN(e)?n:e<r?r:e>n?n:e}const p=2.2;export{p as colorGamma,o as cssHexToRgba,s as cssToRgba,n as getNamedColor,l as getNamedColorCopy,i as hexToRgba,t as hslaToRgba,r as isNamedColor,g as parseRgba,d as parseToUnitRgba,c as sanitizeAlpha,h as sanitizeRgbComponent};
5
+ const e={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(r){return!!e[r]||!!e[r.toLowerCase()]}function n(r){return e[r]??e[r.toLowerCase()]}function l(e){return[...n(e)]}function t(e,r,n){n<0&&++n,n>1&&--n;const l=6*n;return l<1?e+(r-e)*l:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e}function a(e,r,n,l=1){const a=(e%360+360)%360/360,i=n<=.5?n*(r+1):n+r-n*r,o=2*n-i;return[Math.round(255*t(o,i,a+1/3)),Math.round(255*t(o,i,a)),Math.round(255*t(o,i,a-1/3)),l]}function i(e){const r=e.length>5,n=r?8:4,l=(1<<n)-1,t=r?1:17,a=r?9===e.length:5===e.length;let i=Number("0x"+e.slice(1));if(isNaN(i))return null;const o=[0,0,0,1];let s;return a&&(s=i&l,i>>=n,o[3]=t*s/255),s=i&l,i>>=n,o[2]=t*s,s=i&l,i>>=n,o[1]=t*s,s=i&l,i>>=n,o[0]=t*s,o}function o(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),l=parseInt(e.slice(3,4),16),t=4===e.length?15:parseInt(e.slice(4),16);return[r+16*r,n+16*n,l+16*l,(t+16*t)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function s(e){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const r=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(r[3]=parseFloat(e[3])),u(r)}return u(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function u(e){return e[0]=h(e[0]),e[1]=h(e[1]),e[2]=h(e[2]),e[3]=4===e.length?c(e[3]):1,e}function g(e){let l=r(e)?n(e):null;return l??=s(e),l??=o(e),l}function d(e){const r=g(e);return null!=r?[r[0]/255,r[1]/255,r[2]/255,r[3]]:null}function c(e){return m(e,0,1)}function h(e){return Math.round(m(e,0,255))}function m(e,r,n){return e=Number(e),isNaN(e)?n:e<r?r:e>n?n:e}const p=2.2;export{p as colorGamma,o as cssHexToRgba,s as cssToRgba,n as getNamedColor,l as getNamedColorCopy,i as hexToRgba,a as hslaToRgba,r as isNamedColor,g as parseRgba,d as parseToUnitRgba,c as sanitizeAlpha,h as sanitizeRgbComponent};
package/config.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/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&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.45";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/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&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.46";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{aLefTable as t,feTo06Table as r,impTabRtl as e,impTabLtr as n,ubatB as o,arabicAlefBetIntervalsBegine as i,arabicAlefBetIntervalsEnd as a,baseForm as u,medialForm as s,standAlonForm as c,primaryTable as f,unicodeTable as l,tbbase as h,ubatOn as T,ubatAn as L,ubatEn as A,typesNames as d,ubatS as g,ubatWs as m,swapTable as F,ubatR as p,ubatAl as R,ubatL as b,lamAlefInialTableFE as U,lamAlefMedialTableFE as B,finalForm as S,initialForm as w,isolatedForm as _,ubatNsm as v,ubatEt as N}from"./bidiEngineTables.js";class C{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,r,e){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(ot(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(r,e))return t;r=this.inputFormat,e=this.outputFormat;let n=t;const o=ft,i=rt(r.charAt(1)),a=rt(e.charAt(1)),u=("I"===r.charAt(0)?"L":r.charAt(0))+i,s=("I"===e.charAt(0)?"L":e.charAt(0))+a,c=r.charAt(2)+e.charAt(2);o.defInFormat=u,o.defOutFormat=s,o.defSwap=c;const f=V(t,u,s,c,o);let l=!1;return"R"===e.charAt(1)?l=!0:"C"!==e.charAt(1)&&"D"!==e.charAt(1)||(l="rtl"===this.checkContextual(f)),this.sourceToTarget=ut,this.targetToSource=it(this.sourceToTarget),st=this.targetToSource,n=r.charAt(3)===e.charAt(3)?f:"S"===e.charAt(3)?I(l,f):k(f,l,!0),this.sourceToTarget=ut,this.targetToSource=st,this.levels=ct,n}_inputFormatSetter(t){if(!At.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!At.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,r){return t?this._inputFormatSetter(t):t=this.inputFormat,r?this._outputFormatSetter(r):r=this.outputFormat,t!==r}checkContextual(t){let r=x(t);if("ltr"!==r&&"rtl"!==r){try{r=document.dir.toLowerCase()}catch(e){}"ltr"!==r&&"rtl"!==r&&(r="ltr")}return r}hasBidiChar(t){return dt.test(t)}}function V(t,r,e,n,o){const i=E(t,{inFormat:r,outFormat:e,swap:n},o);if(i.inFormat===i.outFormat)return t;r=i.inFormat,e=i.outFormat,n=i.swap;const a=r.slice(0,1),u=r.slice(1,4),s=e.slice(0,1),c=e.slice(1,4);if(o.inFormat=r,o.outFormat=e,o.swap=n,"L"===a&&"VLTR"===e){if("LTR"===u)return o.dir=Tt,y(t,o);if("RTL"===u)return o.dir=Lt,y(t,o)}if("V"===a&&"V"===s)return o.dir="RTL"===u?Lt:Tt,M(t,o);if("L"===a&&"VRTL"===e)return"LTR"===u?(o.dir=Tt,t=y(t,o)):(o.dir=Lt,t=y(t,o)),M(t);if("VLTR"===r&&"LLTR"===e)return o.dir=Tt,y(t,o);if("V"===a&&"L"===s&&u!==c)return t=M(t),"RTL"===u?V(t,"LLTR","VLTR",n,o):V(t,"LRTL","VRTL",n,o);if("VRTL"===r&&"LRTL"===e)return V(t,"LRTL","VRTL",n,o);if("L"===a&&"L"===s){const r=o.swap;return o.swap=r.slice(0,1)+"N","RTL"===u?(o.dir=Lt,t=y(t,o),o.swap="N"+r.slice(1,3),o.dir=Tt,t=y(t,o)):(o.dir=Tt,t=y(t,o),o.swap="N"+r.slice(1,3),t=V(t,"VLTR","LRTL",o.swap,o)),t}return t}function E(t,r,e){if(void 0===r.inFormat&&(r.inFormat=e.defInFormat),void 0===r.outFormat&&(r.outFormat=e.defOutFormat),void 0===r.swap&&(r.swap=e.defSwap),r.inFormat===r.outFormat)return r;const n=r.inFormat.slice(0,1),o=r.outFormat.slice(0,1);let i,a=r.inFormat.slice(1,4),u=r.outFormat.slice(1,4);return"C"===a.charAt(0)&&(i=x(t),a="ltr"===i||"rtl"===i?i.toUpperCase():"L"===r.inFormat.charAt(2)?"LTR":"RTL",r.inFormat=n+a),"C"===u.charAt(0)&&(i=x(t),"rtl"===i?u="RTL":"ltr"===i?(i=O(t),u=i.toUpperCase()):u="L"===r.outFormat.charAt(2)?"LTR":"RTL",r.outFormat=o+u),r}function I(t,r,e){if(0===r.length)return"";void 0===t&&(t=!0);const n=(r=String(r)).split("");let o=0,i=1,a=n.length;t||(o=n.length-1,i=-1,a=1);const u=j(n,o,i,a);let s="";for(let c=0;c<n.length;c++)W(u,u.length,c)>-1?(at(st,c,!t,-1),ut.splice(c,1)):s+=n[c];return s}function j(t,r,e,n,o){let i=0;const a=[];let u=0;for(let s=r;s*e<n;s+=e)if(Z(t[s])||tt(t[s])){if("ل"===t[s]&&q(t,s+e,e,n)){t[s]=nt(t[s+e],0===i?U:B),s+=e,et(t,s,e,n),a[u]=s,u++,i=0;continue}const r=t[s];1===i?t[s]=$(t,s+e,e,n)?Q(t[s]):X(t[s],S):!0===$(t,s+e,e,n)?t[s]=X(t[s],w):t[s]=X(t[s],_),tt(r)||(i=1),!0===K(r)&&(i=0)}else i=0;return a}function x(t){const r=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return r?r[0]<="z"?"ltr":"rtl":""}function O(t){const r=t.split("");return r.reverse(),x(r.join(""))}function k(e,n,o){if(0===e.length)return"";void 0===n&&(n=!0);let i="";const a=(e=String(e)).split("");for(let u=0;u<e.length;u++){let s=!1;if(a[u]>="ﹰ"&&a[u]<"\ufeff"){const c=e.charCodeAt(u);a[u]>="ﻵ"&&a[u]<="ﻼ"?(n?(u>0&&o&&" "===a[u-1]?i=i.slice(0,-1)+"ل":(i+="ل",s=!0),i+=t[(c-65269)/2]):(i+=t[(c-65269)/2],i+="ل",u+1<e.length&&o&&" "===a[u+1]?u++:s=!0),s&&(at(st,u,!0,1),ut.splice(u,0,ut[u]))):i+=r[c-65136]}else i+=a[u]}return i}function y(t,r){const e=t.split(""),n=[];return D(e,n,r),P(e,n,r),G(2,e,n,r),G(1,e,n,r),ct=n,e.join("")}function D(t,r,i){const a=t.length,u=i.dir?e:n;let s=0,c=-1;const f=[],l=[];i.hiLevel=i.dir,i.lastArabic=!1,i.hasUbatAl=!1,i.hasUbatB=!1,i.hasUbatS=!1;for(let e=0;e<a;e++)f[e]=z(t[e]);for(let e=0;e<a;e++){const n=s,a=H(t,f,l,e,i);l[e]=a,s=u[n][a];const h=240&s;s&=15;const T=u[s][lt];if(r[e]=T,h>0)if(16===h){for(let t=c;t<e;t++)r[t]=1;c=-1}else c=-1;if(u[s][ht])-1===c&&(c=e);else if(c>-1){for(let t=c;t<e;t++)r[t]=T;c=-1}f[e]===o&&(r[e]=0),i.hiLevel|=T}i.hasUbatS&&Y(f,r,a,i)}function Y(t,r,e,n){for(let o=0;o<e;o++)if(t[o]===g){r[o]=n.dir;for(let e=o-1;e>=0&&t[e]===m;e--)r[e]=n.dir}}function P(t,r,e){if(0!==e.hiLevel&&e.swap[0]!==e.swap[1])for(let n=0;n<t.length;n++)1===r[n]&&(t[n]=J(t[n]))}function z(t){const r=t.charCodeAt(0),e=f[r>>8];return e<h?e:l[e-h][255&r]}function M(t,r){const e=t.split("");if(r){const t=[];D(e,t,r),ct=t}return e.reverse(),ut.reverse(),e.join("")}function W(t,r,e){for(let n=0;n<r;n++)if(t[n]===e)return n;return-1}function Z(t){for(let r=0;r<i.length;r++)if(t>=i[r]&&t<=a[r])return!0;return!1}function $(t,r,e,n){for(;r*e<n&&tt(t[r]);)r+=e;return!!(r*e<n&&Z(t[r]))}function q(r,e,n,o){for(;e*n<o&&tt(r[e]);)e+=n;let i=" ";if(!(e*n<o))return!1;i=r[e];for(let a=0;a<t.length;a++)if(t[a]===i)return!0;return!1}function G(t,r,e,n){if(n.hiLevel<t)return;if(1===t&&n.dir===Lt&&!n.hasUbatB)return r.reverse(),void ut.reverse();const o=r.length;let i,a,u,s,c,f=0;for(;f<o;){if(e[f]>=t){for(i=f+1;i<o&&e[i]>=t;)i++;for(a=f,u=i-1;a<u;a++,u--)s=r[a],r[a]=r[u],r[u]=s,c=ut[a],ut[a]=ut[u],ut[u]=c;f=i}f++}}function H(t,r,e,n,i){const a=r[n];return{UBAT_L:()=>(i.lastArabic=!1,b),UBAT_R:()=>(i.lastArabic=!1,p),UBAT_ON:()=>T,UBAT_AN:()=>L,UBAT_EN:()=>i.lastArabic?L:A,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,p),UBAT_WS:()=>T,UBAT_CS:()=>{let t,o;return n<1||n+1>=r.length||(t=e[n-1])!==A&&t!==L||(o=r[n+1])!==A&&o!==L?T:(i.lastArabic&&(o=L),o===t?o:T)},UBAT_ES:()=>(n>0?e[n-1]:o)===A&&n+1<r.length&&r[n+1]===A?A:T,UBAT_ET:()=>{if(n>0&&e[n-1]===A)return A;if(i.lastArabic)return T;let t=n+1;const o=r.length;for(;t<o&&r[t]===N;)t++;return t<o&&r[t]===A?A:T},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const e=r.length;let o=n+1;for(;o<e&&r[o]===v;)o++;if(o<e){const e=t[n].charCodeAt(0),i=e>=1425&&e<=2303||64286===e,a=r[o];if(i&&(a===p||a===R))return p}}return n<1||r[n-1]===o?T:e[n-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,T),UBAT_LRE:()=>(i.lastArabic=!1,T),UBAT_RLE:()=>(i.lastArabic=!1,T),UBAT_LRO:()=>(i.lastArabic=!1,T),UBAT_RLO:()=>(i.lastArabic=!1,T),UBAT_PDF:()=>(i.lastArabic=!1,T),UBAT_BN:()=>T}[d[a]]()}function J(t){let r,e=0,n=F.length-1;for(;e<=n;)if(r=Math.floor((e+n)/2),t<F[r][0])n=r-1;else{if(!(t>F[r][0]))return F[r][1];e=r+1}return t}function K(t){for(let r=0;r<c.length;r++)if(c[r]===t)return!0;return!1}function Q(t){for(let r=0;r<u.length;r++)if(t===u[r])return s[r];return t}function X(t,r){for(let e=0;e<u.length;e++)if(t===u[e])return r[e];return t}function tt(t){return t>="ً"&&t<="ٕ"}function rt(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function et(t,r,e,n){for(;r*e<n&&tt(t[r]);)r+=e;return r*e<n&&(t[r]=" ",!0)}function nt(r,e){for(let n=0;n<t.length;n++)if(r===t[n])return e[n];return r}function ot(t,r,e){ut=[],ct=[];for(let n=0;n<e;n++)t[n]=n,r[n]=n,ut[n]=n}function it(t){const r=new Array(t.length);for(let e=0;e<t.length;e++)r[t[e]]=e;return r}function at(t,r,e,n){for(let o=0;o<t.length;o++)(t[o]>r||!e&&t[o]===r)&&(t[o]+=n)}let ut=[],st=[],ct=[];const ft={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},lt=5,ht=6,Tt=0,Lt=1,At=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,dt=/[\u0591-\u06ff\ufb1d-\ufefc]/;export{C as default};
5
+ import{aLefTable as t,feTo06Table as r,impTabRtl as e,impTabLtr as n,ubatB as i,arabicAlefBetIntervalsBegine as o,arabicAlefBetIntervalsEnd as a,baseForm as s,medialForm as u,standAlonForm as f,primaryTable as c,unicodeTable as l,tbbase as h,ubatOn as T,ubatAn as L,ubatEn as A,typesNames as d,ubatS as g,ubatWs as m,swapTable as F,ubatR as p,ubatAl as R,ubatL as b,lamAlefInialTableFE as U,lamAlefMedialTableFE as B,finalForm as S,initialForm as w,isolatedForm as _,ubatNsm as v,ubatEt as N}from"./bidiEngineTables.js";class C{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,r,e){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(it(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(r,e))return t;r=this.inputFormat,e=this.outputFormat;let n=t;const i=ct,o=rt(r.charAt(1)),a=rt(e.charAt(1)),s=(r.startsWith("I")?"L":r.charAt(0))+o,u=(e.startsWith("I")?"L":e.charAt(0))+a,f=r.charAt(2)+e.charAt(2);i.defInFormat=s,i.defOutFormat=u,i.defSwap=f;const c=V(t,s,u,f,i);let l=!1;return"R"===e.charAt(1)?l=!0:"C"!==e.charAt(1)&&"D"!==e.charAt(1)||(l="rtl"===this.checkContextual(c)),this.sourceToTarget=st,this.targetToSource=ot(this.sourceToTarget),ut=this.targetToSource,n=r.charAt(3)===e.charAt(3)?c:"S"===e.charAt(3)?I(l,c):W(c,l,!0),this.sourceToTarget=st,this.targetToSource=ut,this.levels=ft,n}_inputFormatSetter(t){if(!At.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!At.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,r){return t?this._inputFormatSetter(t):t=this.inputFormat,r?this._outputFormatSetter(r):r=this.outputFormat,t!==r}checkContextual(t){let r=x(t);if("ltr"!==r&&"rtl"!==r){try{r=document.dir.toLowerCase()}catch(e){}"ltr"!==r&&"rtl"!==r&&(r="ltr")}return r}hasBidiChar(t){return dt.test(t)}}function V(t,r,e,n,i){const o=E(t,{inFormat:r,outFormat:e,swap:n},i);if(o.inFormat===o.outFormat)return t;r=o.inFormat,e=o.outFormat,n=o.swap;const a=r.slice(0,1),s=r.slice(1,4),u=e.slice(0,1),f=e.slice(1,4);if(i.inFormat=r,i.outFormat=e,i.swap=n,"L"===a&&"VLTR"===e){if("LTR"===s)return i.dir=Tt,k(t,i);if("RTL"===s)return i.dir=Lt,k(t,i)}if("V"===a&&"V"===u)return i.dir="RTL"===s?Lt:Tt,z(t,i);if("L"===a&&"VRTL"===e)return"LTR"===s?(i.dir=Tt,t=k(t,i)):(i.dir=Lt,t=k(t,i)),z(t);if("VLTR"===r&&"LLTR"===e)return i.dir=Tt,k(t,i);if("V"===a&&"L"===u&&s!==f)return t=z(t),"RTL"===s?V(t,"LLTR","VLTR",n,i):V(t,"LRTL","VRTL",n,i);if("VRTL"===r&&"LRTL"===e)return V(t,"LRTL","VRTL",n,i);if("L"===a&&"L"===u){const r=i.swap;return i.swap=r.slice(0,1)+"N","RTL"===s?(i.dir=Lt,t=k(t,i),i.swap="N"+r.slice(1,3),i.dir=Tt,t=k(t,i)):(i.dir=Tt,t=k(t,i),i.swap="N"+r.slice(1,3),t=V(t,"VLTR","LRTL",i.swap,i)),t}return t}function E(t,r,e){if(void 0===r.inFormat&&(r.inFormat=e.defInFormat),void 0===r.outFormat&&(r.outFormat=e.defOutFormat),void 0===r.swap&&(r.swap=e.defSwap),r.inFormat===r.outFormat)return r;const n=r.inFormat.slice(0,1),i=r.outFormat.slice(0,1);let o,a=r.inFormat.slice(1,4),s=r.outFormat.slice(1,4);return a.startsWith("C")&&(o=x(t),a="ltr"===o||"rtl"===o?o.toUpperCase():"L"===r.inFormat.charAt(2)?"LTR":"RTL",r.inFormat=n+a),s.startsWith("C")&&(o=x(t),"rtl"===o?s="RTL":"ltr"===o?(o=O(t),s=o.toUpperCase()):s="L"===r.outFormat.charAt(2)?"LTR":"RTL",r.outFormat=i+s),r}function I(t,r,e){if(0===r.length)return"";void 0===t&&(t=!0);const n=(r=String(r)).split("");let i=0,o=1,a=n.length;t||(i=n.length-1,o=-1,a=1);const s=j(n,i,o,a);let u="";for(let f=0;f<n.length;f++)M(s,s.length,f)>-1?(at(ut,f,!t,-1),st.splice(f,1)):u+=n[f];return u}function j(t,r,e,n,i){let o=0;const a=[];let s=0;for(let u=r;u*e<n;u+=e)if(Z(t[u])||tt(t[u])){if("ل"===t[u]&&q(t,u+e,e,n)){t[u]=nt(t[u+e],0===o?U:B),u+=e,et(t,u,e,n),a[s]=u,s++,o=0;continue}const r=t[u];1===o?t[u]=$(t,u+e,e,n)?Q(t[u]):X(t[u],S):!0===$(t,u+e,e,n)?t[u]=X(t[u],w):t[u]=X(t[u],_),tt(r)||(o=1),!0===K(r)&&(o=0)}else o=0;return a}function x(t){const r=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return r?r[0]<="z"?"ltr":"rtl":""}function O(t){const r=t.split("");return r.reverse(),x(r.join(""))}function W(e,n,i){if(0===e.length)return"";void 0===n&&(n=!0);let o="";const a=(e=String(e)).split("");for(let s=0;s<e.length;s++){let u=!1;if(a[s]>="ﹰ"&&a[s]<"\ufeff"){const f=e.charCodeAt(s);a[s]>="ﻵ"&&a[s]<="ﻼ"?(n?(s>0&&i&&" "===a[s-1]?o=o.slice(0,-1)+"ل":(o+="ل",u=!0),o+=t[(f-65269)/2]):(o+=t[(f-65269)/2],o+="ل",s+1<e.length&&i&&" "===a[s+1]?s++:u=!0),u&&(at(ut,s,!0,1),st.splice(s,0,st[s]))):o+=r[f-65136]}else o+=a[s]}return o}function k(t,r){const e=t.split(""),n=[];return y(e,n,r),Y(e,n,r),G(2,e,n,r),G(1,e,n,r),ft=n,e.join("")}function y(t,r,o){const a=t.length,s=o.dir?e:n;let u=0,f=-1;const c=[],l=[];o.hiLevel=o.dir,o.lastArabic=!1,o.hasUbatAl=!1,o.hasUbatB=!1,o.hasUbatS=!1;for(let e=0;e<a;e++)c[e]=P(t[e]);for(let e=0;e<a;e++){const n=u,a=H(t,c,l,e,o);l[e]=a,u=s[n][a];const h=240&u;u&=15;const T=s[u][lt];if(r[e]=T,h>0)if(16===h){for(let t=f;t<e;t++)r[t]=1;f=-1}else f=-1;if(s[u][ht])-1===f&&(f=e);else if(f>-1){for(let t=f;t<e;t++)r[t]=T;f=-1}c[e]===i&&(r[e]=0),o.hiLevel|=T}o.hasUbatS&&D(c,r,a,o)}function D(t,r,e,n){for(let i=0;i<e;i++)if(t[i]===g){r[i]=n.dir;for(let e=i-1;e>=0&&t[e]===m;e--)r[e]=n.dir}}function Y(t,r,e){if(0!==e.hiLevel&&e.swap[0]!==e.swap[1])for(let n=0;n<t.length;n++)1===r[n]&&(t[n]=J(t[n]))}function P(t){const r=t.charCodeAt(0),e=c[r>>8];return e<h?e:l[e-h][255&r]}function z(t,r){const e=t.split("");if(r){const t=[];y(e,t,r),ft=t}return e.reverse(),st.reverse(),e.join("")}function M(t,r,e){for(let n=0;n<r;n++)if(t[n]===e)return n;return-1}function Z(t){for(let r=0;r<o.length;r++)if(t>=o[r]&&t<=a[r])return!0;return!1}function $(t,r,e,n){for(;r*e<n&&tt(t[r]);)r+=e;return!!(r*e<n&&Z(t[r]))}function q(r,e,n,i){for(;e*n<i&&tt(r[e]);)e+=n;let o=" ";if(!(e*n<i))return!1;o=r[e];for(let a=0;a<t.length;a++)if(t[a]===o)return!0;return!1}function G(t,r,e,n){if(n.hiLevel<t)return;if(1===t&&n.dir===Lt&&!n.hasUbatB)return r.reverse(),void st.reverse();const i=r.length;let o,a,s,u,f,c=0;for(;c<i;){if(e[c]>=t){for(o=c+1;o<i&&e[o]>=t;)o++;for(a=c,s=o-1;a<s;a++,s--)u=r[a],r[a]=r[s],r[s]=u,f=st[a],st[a]=st[s],st[s]=f;c=o}c++}}function H(t,r,e,n,o){const a=r[n];return{UBAT_L:()=>(o.lastArabic=!1,b),UBAT_R:()=>(o.lastArabic=!1,p),UBAT_ON:()=>T,UBAT_AN:()=>L,UBAT_EN:()=>o.lastArabic?L:A,UBAT_AL:()=>(o.lastArabic=!0,o.hasUbatAl=!0,p),UBAT_WS:()=>T,UBAT_CS:()=>{let t,i;return n<1||n+1>=r.length||(t=e[n-1])!==A&&t!==L||(i=r[n+1])!==A&&i!==L?T:(o.lastArabic&&(i=L),i===t?i:T)},UBAT_ES:()=>(n>0?e[n-1]:i)===A&&n+1<r.length&&r[n+1]===A?A:T,UBAT_ET:()=>{if(n>0&&e[n-1]===A)return A;if(o.lastArabic)return T;let t=n+1;const i=r.length;for(;t<i&&r[t]===N;)t++;return t<i&&r[t]===A?A:T},UBAT_NSM:()=>{if("VLTR"===o.inFormat){const e=r.length;let i=n+1;for(;i<e&&r[i]===v;)i++;if(i<e){const e=t[n].charCodeAt(0),o=e>=1425&&e<=2303||64286===e,a=r[i];if(o&&(a===p||a===R))return p}}return n<1||r[n-1]===i?T:e[n-1]},UBAT_B:()=>(o.lastArabic=!0,o.hasUbatB=!0,o.dir),UBAT_S:()=>(o.hasUbatS=!0,T),UBAT_LRE:()=>(o.lastArabic=!1,T),UBAT_RLE:()=>(o.lastArabic=!1,T),UBAT_LRO:()=>(o.lastArabic=!1,T),UBAT_RLO:()=>(o.lastArabic=!1,T),UBAT_PDF:()=>(o.lastArabic=!1,T),UBAT_BN:()=>T}[d[a]]()}function J(t){let r,e=0,n=F.length-1;for(;e<=n;)if(r=Math.floor((e+n)/2),t<F[r][0])n=r-1;else{if(!(t>F[r][0]))return F[r][1];e=r+1}return t}function K(t){for(let r=0;r<f.length;r++)if(f[r]===t)return!0;return!1}function Q(t){for(let r=0;r<s.length;r++)if(t===s[r])return u[r];return t}function X(t,r){for(let e=0;e<s.length;e++)if(t===s[e])return r[e];return t}function tt(t){return t>="ً"&&t<="ٕ"}function rt(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function et(t,r,e,n){for(;r*e<n&&tt(t[r]);)r+=e;return r*e<n&&(t[r]=" ",!0)}function nt(r,e){for(let n=0;n<t.length;n++)if(r===t[n])return e[n];return r}function it(t,r,e){st=[],ft=[];for(let n=0;n<e;n++)t[n]=n,r[n]=n,st[n]=n}function ot(t){const r=new Array(t.length);for(let e=0;e<t.length;e++)r[t[e]]=e;return r}function at(t,r,e,n){for(let i=0;i<t.length;i++)(t[i]>r||!e&&t[i]===r)&&(t[i]+=n)}let st=[],ut=[],ft=[];const ct={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},lt=5,ht=6,Tt=0,Lt=1,At=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,dt=/[\u0591-\u06ff\ufb1d-\ufefc]/;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{pathToArray as t,getProperties as n,isPropertyDeclared as r}from"./utils.js";function e(t,e){const i="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(i,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const u=n(e);return r(u,i)?u.get(i):e[i]}function i(t,n,r){if(null==t)return t;const u=e(n[r],t);return!u&&r<n.length-1?void 0:r===n.length-1?u:i(u,n,r+1)}function u(n,r,u=0){return"string"!=typeof r||r.includes(".")?i(n,t(r),u):e(r,n)}function o(t,n){return u(t,n)}function s(t,n){return void 0!==u(n,t)}export{s as exists,o as get,u as valueOf};
5
+ import{pathToArray as t,getProperties as n,isPropertyDeclared as r}from"./utils.js";function i(t,i){const e=t.endsWith("?")?t.slice(0,-1):t;if(null!=i.getItemAt||Array.isArray(i)){const t=parseInt(e,10);if(!isNaN(t))return Array.isArray(i)?i[t]:i.at(t)}const u=n(i);return r(u,e)?u.get(e):i[e]}function e(t,n,r){if(null==t)return t;const u=i(n[r],t);return!u&&r<n.length-1?void 0:r===n.length-1?u:e(u,n,r+1)}function u(n,r,u=0){return"string"!=typeof r||r.includes(".")?e(n,t(r),u):i(r,n)}function o(t,n){return u(t,n)}function s(t,n){return void 0!==u(n,t)}export{s as exists,o as get,u as valueOf};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{valueOf as e,exists as t}from"./get.js";import{getProperties as r}from"./utils.js";import{originSpecificReadPropertyDefinition as o,originSpecificPropertyDefinition as n}from"./extensions/serializableProperty.js";function s(e,r,o){if(!e?.read||!1===e.read.enabled||!e.read.source)return!1;const n=e.read.source;if("string"==typeof n){if(n===r)return!0;if(n.includes(".")&&0===n.indexOf(r)&&t(n,o))return!0}else for(const s of n){if(s===r)return!0;if(s.includes(".")&&0===s.indexOf(r)&&t(s,o))return!0}return!1}function i(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)}function f(e,t,r,n,f){let a=o(t[r],f);i(a)&&(e[r]=!0);for(const i of Object.getOwnPropertyNames(t))a=o(t[i],f),s(a,r,n)&&(e[i]=!0)}function a(e,t,r,o){const s=r.metadata,i=n(s[t],o),f=i?.default;if(void 0===f)return;const a="function"==typeof f?f.call(e,t,o):f;void 0!==a&&r.set(t,a)}const c={origin:"service"};function u(t,n,s=c){if(!n||"object"!=typeof n)return;const i=r(t),u=i.metadata,d={};for(const e of Object.getOwnPropertyNames(n))f(d,u,e,n,s);i.setDefaultOrigin(s.origin);for(const r of Object.getOwnPropertyNames(d)){const f=o(u[r],s).read,a=f?.source;let c;c=a&&"string"==typeof a?e(n,a):n[r],f?.reader&&(c=f.reader.call(t,c,n,s)),void 0!==c&&i.set(r,c)}if(!s||!s.ignoreDefaults){i.setDefaultOrigin("defaults");for(const e of Object.getOwnPropertyNames(u))d[e]||a(t,e,i,s)}i.setDefaultOrigin("user")}function d(e,t,r,o=c){const n={...o,messages:[]};r(n),n.messages?.forEach(t=>{"warning"!==t.type||e.loaded?o?.messages&&o.messages.push(t):e.loadWarnings.push(t)})}export{u as read,d as readLoadable};
5
+ import{valueOf as e,exists as t}from"./get.js";import{getProperties as r}from"./utils.js";import{originSpecificReadPropertyDefinition as o,originSpecificPropertyDefinition as s}from"./extensions/serializableProperty.js";function n(e,r,o){if(!e?.read||!1===e.read.enabled||!e.read.source)return!1;const s=e.read.source;if("string"==typeof s){if(s===r)return!0;if(s.includes(".")&&s.startsWith(r)&&t(s,o))return!0}else for(const n of s){if(n===r)return!0;if(n.includes(".")&&n.startsWith(r)&&t(n,o))return!0}return!1}function i(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)}function a(e,t,r,s,a){let f=o(t[r],a);i(f)&&(e[r]=!0);for(const i of Object.getOwnPropertyNames(t))f=o(t[i],a),n(f,r,s)&&(e[i]=!0)}function f(e,t,r,o){const n=r.metadata,i=s(n[t],o),a=i?.default;if(void 0===a)return;const f="function"==typeof a?a.call(e,t,o):a;void 0!==f&&r.set(t,f)}const c={origin:"service"};function u(t,s,n=c){if(!s||"object"!=typeof s)return;const i=r(t),u=i.metadata,d={};for(const e of Object.getOwnPropertyNames(s))a(d,u,e,s,n);i.setDefaultOrigin(n.origin);for(const r of Object.getOwnPropertyNames(d)){const a=o(u[r],n).read,f=a?.source;let c;c=f&&"string"==typeof f?e(s,f):s[r],a?.reader&&(c=a.reader.call(t,c,s,n)),void 0!==c&&i.set(r,c)}if(!n||!n.ignoreDefaults){i.setDefaultOrigin("defaults");for(const e of Object.getOwnPropertyNames(u))d[e]||f(t,e,i,n)}i.setDefaultOrigin("user")}function d(e,t,r,o=c){const s={...o,messages:[]};r(s),s.messages?.forEach(t=>{"warning"!==t.type||e.loaded?o?.messages&&o.messages.push(t):e.loadWarnings.push(t)})}export{u as read,d as readLoadable};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../has.js";import t from"../Logger.js";import{pathToArray as n,getProperties as r}from"./utils.js";import{Flags as e}from"./tracking/Flags.js";import{TrackingTarget as i}from"./tracking/TrackingTarget.js";const o=new i,c=[];let s=o;function a(t){s.onAccessed(t)}let l=!1,g=!1;function f(t,n,r){if(l)return p(t,n,r);let e=null;return k(t),e=n.call(r),m(),e}function u(t,n){return f(o,t,n)}function p(n,r,e){const i=l;l=!0,k(n);let o=null;try{o=r.call(e)}catch(c){g&&t.getLogger("esri.core.accessorSupport.tracking").error(c)}return m(),l=i,o}function k(t){s=t,c.push(t)}function m(){const t=c.length;if(t>1){const n=c.pop();s=c[t-2],n.onTrackingEnd()}else if(1===t){const t=c.pop();s=o,t.onTrackingEnd()}else s=o}function d(t,n){if(n.flags&e.DepTrackingInitialized)return;n.flags|=e.DepTrackingInitialized;const r=g;g=!1,n.flags&e.AutoTracked?p(n.trackingTarget,n.metadata.get,t):y(t,n),g=r}const T=[];function y(t,r){r.flags&e.ExplicitlyTracking||(r.flags|=e.ExplicitlyTracking,p(r.trackingTarget,()=>{const e=r.metadata.dependsOn||T;for(const r of e)if("string"!=typeof r||r.includes(".")){const e=n(r);for(let n=0,r=t;n<e.length&&null!=r&&"object"==typeof r;++n)r=h(r,e[n],n!==e.length-1)}else h(t,r,!1)}),r.flags&=~e.ExplicitlyTracking)}function h(t,n,e){const i="?"===n[n.length-1]?n.slice(0,-1):n;if(null!=t.getItemAt||Array.isArray(t)){const n=parseInt(i,10);if(!isNaN(n))return Array.isArray(t)?t[n]:t.at(n)}const o=r(t);if(o){const n=o.propertiesByName.get(i);n&&(a(n),d(t,n))}return e?t[i]:void 0}export{d as initializeDependencyTracking,f as runTracked,p as runTrackedNoThrow,u as runUntracked,a as trackAccess,y as trackExplicitDependencies};
5
+ import"../has.js";import t from"../Logger.js";import{pathToArray as n,getProperties as r}from"./utils.js";import{Flags as e}from"./tracking/Flags.js";import{TrackingTarget as i}from"./tracking/TrackingTarget.js";const o=new i,c=[];let s=o;function a(t){s.onAccessed(t)}let l=!1,g=!1;function f(t,n,r){if(l)return p(t,n,r);let e=null;return k(t),e=n.call(r),d(),e}function u(t,n){return f(o,t,n)}function p(n,r,e){const i=l;l=!0,k(n);let o=null;try{o=r.call(e)}catch(c){g&&t.getLogger("esri.core.accessorSupport.tracking").error(c)}return d(),l=i,o}function k(t){s=t,c.push(t)}function d(){const t=c.length;if(t>1){const n=c.pop();s=c[t-2],n.onTrackingEnd()}else if(1===t){const t=c.pop();s=o,t.onTrackingEnd()}else s=o}function m(t,n){if(n.flags&e.DepTrackingInitialized)return;n.flags|=e.DepTrackingInitialized;const r=g;g=!1,n.flags&e.AutoTracked?p(n.trackingTarget,n.metadata.get,t):y(t,n),g=r}const T=[];function y(t,r){r.flags&e.ExplicitlyTracking||(r.flags|=e.ExplicitlyTracking,p(r.trackingTarget,()=>{const e=r.metadata.dependsOn||T;for(const r of e)if("string"!=typeof r||r.includes(".")){const e=n(r);for(let n=0,r=t;n<e.length&&null!=r&&"object"==typeof r;++n)r=h(r,e[n],n!==e.length-1)}else h(t,r,!1)}),r.flags&=~e.ExplicitlyTracking)}function h(t,n,e){const i=n.endsWith("?")?n.slice(0,-1):n;if(null!=t.getItemAt||Array.isArray(t)){const n=parseInt(i,10);if(!isNaN(n))return Array.isArray(t)?t[n]:t.at(n)}const o=r(t);if(o){const n=o.propertiesByName.get(i);n&&(a(n),m(t,n))}return e?t[i]:void 0}export{m as initializeDependencyTracking,f as runTracked,p as runTrackedNoThrow,u as runUntracked,a as trackAccess,y as trackExplicitDependencies};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,t="screenUtils.toPt: input not recognized!",r=96;function u(n){return n?n/72*r:0}function e(n){return n?72*n/r:0}function o(r){if("string"==typeof r){const u=r.match(n);if(u){const n=Number(u[1]),t=u[3]&&u[3].toLowerCase(),o="-"===r.charAt(0),c="px"===t?e(n):n;return o?-c:c}return console.warn(t),null}return r}function c(n=0,t=0){return{x:n,y:t}}function i(n){return n?c(n.x,n.y):null}function f(n=0,t=0){return[n,t]}function x(n=0,t=0){return{x:n,y:t}}function s(n=0,t=0){return l([n,t])}function y(n=0,t=0,r=0){return p([n,t,r])}function l(n){return n}function p(n){return n}function a(n){return n}function d(n,t){return t?(t.x=n[0],t.y=n[1],t):{x:n[0],y:n[1]}}function g(n,t){return t?(t[0]=n.x,t[1]=n.y,t.length>2&&(t[2]=0),t):[n.x,n.y]}export{l as castRenderScreenPointArray,p as castRenderScreenPointArray3,a as castScreenPointArray,i as cloneScreenPoint,x as createRenderScreenPoint,s as createRenderScreenPointArray,y as createRenderScreenPointArray3,c as createScreenPoint,f as createScreenPointArray,u as pt2px,e as px2pt,d as screenPointArrayToObject,g as screenPointObjectToArray,o as toPt};
5
+ const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,t="screenUtils.toPt: input not recognized!",r=96;function u(n){return n?n/72*r:0}function e(n){return n?72*n/r:0}function o(r){if("string"==typeof r){const u=r.match(n);if(u){const n=Number(u[1]),t=u[3]&&u[3].toLowerCase(),o=r.startsWith("-"),i="px"===t?e(n):n;return o?-i:i}return console.warn(t),null}return r}function i(n=0,t=0){return{x:n,y:t}}function c(n){return n?i(n.x,n.y):null}function f(n=0,t=0){return[n,t]}function s(n=0,t=0){return{x:n,y:t}}function x(n=0,t=0){return l([n,t])}function y(n=0,t=0,r=0){return p([n,t,r])}function l(n){return n}function p(n){return n}function a(n){return n}function d(n,t){return t?(t.x=n[0],t.y=n[1],t):{x:n[0],y:n[1]}}function g(n,t){return t?(t[0]=n.x,t[1]=n.y,t.length>2&&(t[2]=0),t):[n.x,n.y]}export{l as castRenderScreenPointArray,p as castRenderScreenPointArray3,a as castScreenPointArray,c as cloneScreenPoint,s as createRenderScreenPoint,x as createRenderScreenPointArray,y as createRenderScreenPointArray3,i as createScreenPoint,f as createScreenPointArray,u as pt2px,e as px2pt,d as screenPointArrayToObject,g as screenPointObjectToArray,o as toPt};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{createDateTimeZone as t,ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{getLocale as a}from"../../intl/locale.js";import{DateTime as r,FixedOffsetZone as s}from"luxon";function o(t){t=t.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let e="";const a=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|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 t.match(a)||[])switch(r){case"D":e+="d";break;case"DD":e+="dd";break;case"DDD":e+="o";break;case"d":e+="c";break;case"ddd":e+="ccc";break;case"dddd":e+="cccc";break;case"M":e+="L";break;case"MM":e+="LL";break;case"MMM":e+="LLL";break;case"MMMM":e+="LLLL";break;case"YY":e+="yy";break;case"Y":case"YYYY":e+="yyyy";break;case"Q":e+="q";break;case"X":case"x":e+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?e+=`'${r.slice(1,-1)}'`:e+=`'${r}'`}return e}const n="esri.core.sql.dateonly";class i{constructor(t,e,a){this._year=t,this._month=e,this._day=a,this.declaredRootClass=n}static isDateOnly(t){return"object"==typeof t&&null!=t&&"declaredRootClass"in t&&t.declaredRootClass===n}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(t){return i.isDateOnly(t)&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new i(this._year,this._month,this._day)}toDateTime(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toDateTimeLuxon(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(t=null,r=!0){if(null===t||""===t)return this.toString();if(r&&(t=o(t)),!t)return"";const s=this.toDateTime("unknown");return e.dateTimeToArcadeDate(s).toFormat(t,{locale:a(),numberingSystem:"latn"})}toArcadeDate(){const t=this.toDateTime("unknown");return e.dateTimeToArcadeDate(t)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(t,e){return i.fromDateTime(this.toUTCDateTime().plus({[t]:e}))}toUTCDateTime(){return r.utc(this.year,this.month,this.day,0,0,0,0)}difference(t,e){switch(e.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(t.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===e?this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(t.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(t.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(t.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(t.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(t.toUTCDateTime(),"years").years}}static fromMilliseconds(t){const e=r.fromMillis(t,{zone:s.utcInstance});return e.isValid?i.fromParts(e.year,e.month,e.day):null}static fromSeconds(t){const e=r.fromSeconds(t,{zone:s.utcInstance});return e.isValid?i.fromParts(e.year,e.month,e.day):null}static fromReader(t){if(!t)return null;const e=t.split("-");return 3!==e.length?null:new i(parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10))}static fromParts(t,e,a){const r=new i(t,e,a);return!1===r.isValid?null:r}static fromDateJS(t){return i.fromParts(t.getFullYear(),t.getMonth()+1,t.getDay())}static fromDateTime(t){return i.fromParts(t.year,t.month,t.day)}static fromSqlTimeStampOffset(t){return this.fromDateTime(t.toDateTime())}static fromString(t,e=null){if(""===t)return null;if(null===t)return null;const a=[];if(e)(e=o(e))&&a.push(e);else if(null===e||""===e){const e=r.fromISO(t,{setZone:!0});return e.isValid?i.fromParts(e.year,e.month,e.day):null}for(const s of a){const a=r.fromFormat(t,e??s);if(a.isValid)return new i(a.year,a.month,a.day)}return null}static fromNow(e="system"){const a=r.fromJSDate(new Date).setZone(t(e));return new i(a.year,a.month,a.day)}}export{i as DateOnly,o as standardizeDateOnlyFormat};
5
+ import{createDateTimeZone as t,ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{getLocale as a}from"../../intl/locale.js";import{DateTime as r,FixedOffsetZone as s}from"luxon";function o(t){t=t.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let e="";const a=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|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 t.match(a)||[])switch(r){case"D":e+="d";break;case"DD":e+="dd";break;case"DDD":e+="o";break;case"d":e+="c";break;case"ddd":e+="ccc";break;case"dddd":e+="cccc";break;case"M":e+="L";break;case"MM":e+="LL";break;case"MMM":e+="LLL";break;case"MMMM":e+="LLLL";break;case"YY":e+="yy";break;case"Y":case"YYYY":e+="yyyy";break;case"Q":e+="q";break;case"X":case"x":e+=r;break;default:r.length>=2&&r.startsWith("[")&&r.endsWith("]")?e+=`'${r.slice(1,-1)}'`:e+=`'${r}'`}return e}const n="esri.core.sql.dateonly";class i{constructor(t,e,a){this._year=t,this._month=e,this._day=a,this.declaredRootClass=n}static isDateOnly(t){return"object"==typeof t&&null!=t&&"declaredRootClass"in t&&t.declaredRootClass===n}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(t){return i.isDateOnly(t)&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new i(this._year,this._month,this._day)}toDateTime(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toDateTimeLuxon(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(t=null,r=!0){if(null===t||""===t)return this.toString();if(r&&(t=o(t)),!t)return"";const s=this.toDateTime("unknown");return e.dateTimeToArcadeDate(s).toFormat(t,{locale:a(),numberingSystem:"latn"})}toArcadeDate(){const t=this.toDateTime("unknown");return e.dateTimeToArcadeDate(t)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(t,e){return i.fromDateTime(this.toUTCDateTime().plus({[t]:e}))}toUTCDateTime(){return r.utc(this.year,this.month,this.day,0,0,0,0)}difference(t,e){switch(e.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(t.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===e?this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(t.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(t.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(t.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(t.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(t.toUTCDateTime(),"years").years}}static fromMilliseconds(t){const e=r.fromMillis(t,{zone:s.utcInstance});return e.isValid?i.fromParts(e.year,e.month,e.day):null}static fromSeconds(t){const e=r.fromSeconds(t,{zone:s.utcInstance});return e.isValid?i.fromParts(e.year,e.month,e.day):null}static fromReader(t){if(!t)return null;const e=t.split("-");return 3!==e.length?null:new i(parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10))}static fromParts(t,e,a){const r=new i(t,e,a);return!1===r.isValid?null:r}static fromDateJS(t){return i.fromParts(t.getFullYear(),t.getMonth()+1,t.getDay())}static fromDateTime(t){return i.fromParts(t.year,t.month,t.day)}static fromSqlTimeStampOffset(t){return this.fromDateTime(t.toDateTime())}static fromString(t,e=null){if(""===t)return null;if(null===t)return null;const a=[];if(e)(e=o(e))&&a.push(e);else if(null===e||""===e){const e=r.fromISO(t,{setZone:!0});return e.isValid?i.fromParts(e.year,e.month,e.day):null}for(const s of a){const a=r.fromFormat(t,e??s);if(a.isValid)return new i(a.year,a.month,a.day)}return null}static fromNow(e="system"){const a=r.fromJSDate(new Date).setZone(t(e));return new i(a.year,a.month,a.day)}}export{i as DateOnly,o as standardizeDateOnlyFormat};
package/core/urlUtils.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as s}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as i,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let s=e[n];"string"==typeof s&&(s=e[n]=[s]),Array.isArray(s)?s.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e]))).join("&"):Object.keys(t).map(e=>{const r=t[e];if(null==r)return"";const s=encodeURIComponent(e)+"=",i=n?.[e];return i?s+encodeURIComponent(i(r)):Array.isArray(r)?r.map(t=>o(t)?s+encodeURIComponent(JSON.stringify(t)):s+encodeURIComponent(t)).join("&"):o(r)?s+encodeURIComponent(JSON.stringify(r)):s+encodeURIComponent(r)}).filter(t=>t).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=S(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function S(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function B(t){return t=(t=Ut(t=Ct(t=S(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:B(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let s=0;s<e.length;s++){const t=e[s].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=s;break}0===t.indexOf(r)&&(o=s+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=B(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=kt(t),o=kt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=kt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),s=K(n).toLowerCase().replace(/\/+$/,""),i=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===s.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(i&&c<i.length)return t;t=r.slice(c);const f=s.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce((t,n)=>n?t.concat(n.split("/")):t,[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?i(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function st(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function it(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=S(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some(t=>r===t||r.endsWith(`.${t}`))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),s=t.indexOf(":",r+2),i=Math.min(o<0?t.length:o,s<0?t.length:s);if(t.slice(r+2,i).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(i)}`}function vt(t,n){const e=new URL(t);return e.host=n,e.port&&!m.test(n)&&(e.port=""),e.toString()}function Pt(t){return new URL(t).host}function kt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Et(t){return Nt.test(t)}function St(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Bt(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Ht(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[s,i]of Object.entries(n))null!=i&&(r[s]=i);const o=v(r);return o?`${e.path}?${o}`:e.path}function Tt(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Wt(t){if(null==t)return null;const n=t.match(Jt);return n?n[2]:null}function zt(t){if(null==t)return null;const n=t.match(Jt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Dt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)})}const Jt=/([^.]*)\.([^/]*)$/,Nt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Bt as addQueryParameter,Ht as addQueryParameters,et as base64UrlEncode,it as blobUrlToBlob,At as changeDomain,vt as changeHost,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,Pt as getHost,N as getInterceptor,X as getOrigin,Wt as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Et as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,st as makeData,G as makeRelative,K as normalize,v as objectToQuery,Dt as parseData,A as queryToObject,Rt as removeFile,Tt as removeQueryParameter,St as removeQueryParameters,jt as removeTrailingSlash,zt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
5
+ import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as s}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as i,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,h=/^\s*http:/i,p=/^\s*https:/i,m=/^\s*file:/i,d=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=W(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function W(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let s=e[n];"string"==typeof s&&(s=e[n]=[s]),Array.isArray(s)?s.push(o):e[n]=o}return e}function A(t,n){return t?n&&"function"==typeof n?Object.keys(t).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e]))).join("&"):Object.keys(t).map(e=>{const r=t[e];if(null==r)return"";const s=encodeURIComponent(e)+"=",i=n?.[e];return i?s+encodeURIComponent(i(r)):Array.isArray(r)?r.map(t=>o(t)?s+encodeURIComponent(JSON.stringify(t)):s+encodeURIComponent(t)).join("&"):o(r)?s+encodeURIComponent(JSON.stringify(r)):s+encodeURIComponent(r)}).filter(t=>t).join("&"):""}function v(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=mt(t);const e=H(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function P(t,n=!1){const e=H(t);let r,o;if(e){const t=E(e.proxyUrl);r=t.path,o=t.query?W(t.query):null}else if(n){const n=v(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=A({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const k={path:"",query:""};function E(t){const n=t.indexOf("?");return-1!==n?(k.path=t.slice(0,n),k.query=t.slice(n+1)):(k.path=t,k.query=null),k}function S(t){return t=(t=Ut(t=Ct(t=E(t).path),!0)).toLowerCase()}function B(t){const n={proxyUrl:t.proxyUrl,urlPrefix:S(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let s=0;s<e.length;s++){const t=e[s].urlPrefix;if(r.startsWith(t)){if(r.length===t.length)return-1;o=s;break}t.startsWith(r)&&(o=s+1)}return e.splice(o,0,n),o}function H(t){const n=c.proxyRules,e=S(t);for(let r=0;r<n.length;r++)if(e.startsWith(n[r].urlPrefix))return n[r]}function T(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=Pt(t),o=Pt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=Pt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(pt(t)||ht(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return ht(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:pt(t)?t:V(t.startsWith("/")?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),s=K(n).toLowerCase().replace(/\/+$/,""),i=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(i&&!s.startsWith(i))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===s.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(i&&c<i.length)return t;t=r.slice(c);const f=s.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else e[0].startsWith("/")&&r.push("");const o=e.reduce((t,n)=>n?t.concat(n.split("/")):t,[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&ht(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return ht(t)||pt(t)}function Z(t){return null!=t&&t.startsWith("blob:")}function tt(t){return null!=t&&t.startsWith("data:")}function nt(t){const n=ot(t);return n?.isBase64?i(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function st(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function it(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function ht(t){return null!=t&&t.startsWith("/")&&"/"===t[1]}function pt(t){return null!=t&&a.test(t)}function mt(t){return null!=t&&p.test(t)||"https"===O.scheme&&ht(t)}function dt(t){return null!=t&&h.test(t)||"http"===O.scheme&&ht(t)}function yt(t){return null!=t&&m.test(t)}function gt(t){return ht(t)?`http:${t}`:t.replace(p,"http:")}function $t(t){return ht(t)?`https:${t}`:t.replace(h,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return ht(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&t.startsWith("/")&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=E(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!dt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),d.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some(t=>r===t||r.endsWith(`.${t}`))||wt()&&!H(t))&&(t=$t(t)),t}function Wt(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),s=t.indexOf(":",r+2),i=Math.min(o<0?t.length:o,s<0?t.length:s);if(t.slice(r+2,i).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(i)}`}function At(t,n){const e=new URL(t);return e.host=n,e.port&&!d.test(n)&&(e.port=""),e.toString()}function vt(t){return new URL(t).host}function Pt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function kt(t){return Nt.test(t)}function Et(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function St(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${A(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[s,i]of Object.entries(n))null!=i&&(r[s]=i);const o=A(r);return o?`${e.path}?${o}`:e.path}function Ht(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=A(r);return o?`${e}?${o}`:e}function Tt(t){if(null==t)return null;const n=t.match(Jt);return n?n[2]:null}function zt(t){if(null==t)return null;const n=t.match(Jt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Dt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)})}const Jt=/([^.]*)\.([^/]*)$/,Nt=/(^data:image\/svg|\.svg$)/i;export{x as Url,P as addProxy,B as addProxyRule,St as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,it as blobUrlToBlob,Wt as changeDomain,At as changeHost,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,vt as getHost,N as getInterceptor,X as getOrigin,Tt as getPathExtension,H as getProxyRule,v as getProxyUrl,pt as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,T as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,mt as isHTTPSProtocol,ht as isProtocolRelative,kt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,st as makeData,G as makeRelative,K as normalize,A as objectToQuery,Dt as parseData,W as queryToObject,Rt as removeFile,Ht as removeQueryParameter,Et as removeQueryParameters,jt as removeTrailingSlash,zt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
package/core/uuid.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const t="randomUUID"in crypto;function n(){if(t)return crypto.randomUUID();const n=crypto.getRandomValues(new Uint16Array(8));n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;const r=t=>n[t].toString(16).padStart(4,"0");return r(0)+r(1)+"-"+r(2)+"-"+r(3)+"-"+r(4)+"-"+r(5)+r(6)+r(7)}function r(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function e(t){const n=t.toUpperCase();return"{"!==t[0]?`{${n}}`:n}export{r as generateBracedUUID,o as generateLowercaseBracedUUID,n as generateUUID,e as normalizeGlobalID};
5
+ const t="randomUUID"in crypto;function n(){if(t)return crypto.randomUUID();const n=crypto.getRandomValues(new Uint16Array(8));n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;const r=t=>n[t].toString(16).padStart(4,"0");return r(0)+r(1)+"-"+r(2)+"-"+r(3)+"-"+r(4)+"-"+r(5)+r(6)+r(7)}function r(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function e(t){const n=t.toUpperCase();return t.startsWith("{")?n:`{${n}}`}export{r as generateBracedUUID,o as generateLowercaseBracedUUID,n as generateUUID,e as normalizeGlobalID};