chunk-EMJ4ZSM2.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import {
  2. c,
  3. m,
  4. n,
  5. t
  6. } from "./chunk-IKP3YN53.js";
  7. import {
  8. r
  9. } from "./chunk-GZT4BVFP.js";
  10. // node_modules/@arcgis/core/config.js
  11. var r2 = { apiKey: void 0, 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", portalUrl: "https://www.arcgis.com", 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: [], maxUrlLength: 2e3, priority: "high", proxyRules: [], proxyUrl: null, timeout: 6e4, trustedServers: [], useIdentity: true }, log: { interceptors: [], level: null } };
  12. if (globalThis.esriConfig && (n(r2, globalThis.esriConfig, true), delete r2.has), !r2.assetsPath) {
  13. const e2 = "4.24.7";
  14. r2.assetsPath = `https://js.arcgis.com/${e2.slice(0, -2)}/@arcgis/core/assets`;
  15. }
  16. r2.baseUrl && console.warn("[esri.config]", "baseUrl has been replaced by assetsPath"), Object.defineProperty(r2, "baseUrl", { set() {
  17. console.warn("[esri.config]", "baseUrl has been replaced by assetsPath");
  18. } }), r2.request.corsEnabledServers = [], r2.request.corsEnabledServers.push = function() {
  19. return console.warn("[esri.config]", "request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"), 0;
  20. };
  21. // node_modules/@arcgis/core/core/Logger.js
  22. var o = { info: 0, warn: 1, error: 2, none: 3 };
  23. var s = class {
  24. constructor(e2) {
  25. this.level = null, this._module = "", this._parent = null, this.writer = null, this._loggedMessages = { error: new Map(), warn: new Map(), info: new Map() }, e2.level != null && (this.level = e2.level), e2.writer != null && (this.writer = e2.writer), this._module = e2.module, s._loggers[this.module] = this;
  26. const t2 = this.module.lastIndexOf(".");
  27. t2 !== -1 && (this._parent = s.getLogger(this.module.slice(0, t2)));
  28. }
  29. get module() {
  30. return this._module;
  31. }
  32. get parent() {
  33. return this._parent;
  34. }
  35. error(...e2) {
  36. this._log("error", "always", ...e2);
  37. }
  38. warn(...e2) {
  39. this._log("warn", "always", ...e2);
  40. }
  41. info(...e2) {
  42. this._log("info", "always", ...e2);
  43. }
  44. errorOnce(...e2) {
  45. this._log("error", "once", ...e2);
  46. }
  47. warnOnce(...e2) {
  48. this._log("warn", "once", ...e2);
  49. }
  50. infoOnce(...e2) {
  51. this._log("info", "once", ...e2);
  52. }
  53. errorOncePerTick(...e2) {
  54. this._log("error", "oncePerTick", ...e2);
  55. }
  56. warnOncePerTick(...e2) {
  57. this._log("warn", "oncePerTick", ...e2);
  58. }
  59. infoOncePerTick(...e2) {
  60. this._log("info", "oncePerTick", ...e2);
  61. }
  62. get test() {
  63. const e2 = this;
  64. return { loggedMessages: e2._loggedMessages, clearLoggedWarnings: () => e2._loggedMessages.warn.clear() };
  65. }
  66. static get testSingleton() {
  67. return { resetLoggers(e2 = {}) {
  68. const t2 = s._loggers;
  69. return s._loggers = e2, t2;
  70. }, set throttlingDisabled(e2) {
  71. s._throttlingDisabled = e2;
  72. } };
  73. }
  74. static getLogger(e2) {
  75. let t2 = s._loggers[e2];
  76. return t2 || (t2 = new s({ module: e2 })), t2;
  77. }
  78. _log(t2, r3, ...o2) {
  79. if (!this._matchLevel(t2))
  80. return;
  81. if (r3 !== "always" && !s._throttlingDisabled) {
  82. const e2 = this._argsToKey(o2), n2 = this._loggedMessages[t2].get(e2);
  83. if (r3 === "once" && n2 != null || r3 === "oncePerTick" && n2 && n2 >= s._tickCounter)
  84. return;
  85. this._loggedMessages[t2].set(e2, s._tickCounter), s._scheduleTickCounterIncrement();
  86. }
  87. for (const s4 of r2.log.interceptors)
  88. if (s4(t2, this.module, ...o2))
  89. return;
  90. this._inheritedWriter()(t2, this.module, ...o2);
  91. }
  92. _parentWithMember(e2, r3) {
  93. let o2 = this;
  94. for (; r(o2); ) {
  95. const r4 = o2[e2];
  96. if (r(r4))
  97. return r4;
  98. o2 = o2.parent;
  99. }
  100. return r3;
  101. }
  102. _inheritedWriter() {
  103. return this._parentWithMember("writer", this._consoleWriter);
  104. }
  105. _consoleWriter(e2, t2, ...r3) {
  106. console[e2](`[${t2}]`, ...r3);
  107. }
  108. _matchLevel(t2) {
  109. const r3 = r2.log.level ? r2.log.level : "warn";
  110. return o[this._parentWithMember("level", r3)] <= o[t2];
  111. }
  112. _argsToKey(...e2) {
  113. const t2 = (e3, t3) => typeof t3 != "object" || Array.isArray(t3) ? t3 : "[Object]";
  114. return c(JSON.stringify(e2, t2));
  115. }
  116. static _scheduleTickCounterIncrement() {
  117. s._tickCounterScheduled || (s._tickCounterScheduled = true, Promise.resolve().then(() => {
  118. s._tickCounter++, s._tickCounterScheduled = false;
  119. }));
  120. }
  121. };
  122. s._loggers = {}, s._tickCounter = 0, s._tickCounterScheduled = false, s._throttlingDisabled = false;
  123. // node_modules/@arcgis/core/core/Message.js
  124. function e(e2, s4) {
  125. return e2.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g, (e3, r3) => {
  126. if (r3 === "")
  127. return "$";
  128. const i = t(r3, s4), n2 = i == null ? "" : i;
  129. if (n2 === void 0)
  130. throw new Error(`could not find key "${r3}" in template`);
  131. return n2.toString();
  132. });
  133. }
  134. var s2 = class {
  135. constructor(t2, r3, i) {
  136. this.name = t2, this.details = i, this.message = void 0, this instanceof s2 && (this.message = r3 && e(r3, i) || "");
  137. }
  138. toString() {
  139. return "[" + this.name + "]: " + this.message;
  140. }
  141. };
  142. // node_modules/@arcgis/core/core/Error.js
  143. var s3 = class extends s2 {
  144. constructor(e2, t2, r3) {
  145. if (super(e2, t2, r3), !(this instanceof s3))
  146. return new s3(e2, t2, r3);
  147. }
  148. toJSON() {
  149. if (this.details != null)
  150. try {
  151. return { name: this.name, message: this.message, details: JSON.parse(JSON.stringify(this.details, (t2, r3) => {
  152. if (r3 && typeof r3 == "object" && typeof r3.toJSON == "function")
  153. return r3;
  154. try {
  155. return m(r3);
  156. } catch (s4) {
  157. return "[object]";
  158. }
  159. })) };
  160. } catch (r3) {
  161. throw s.getLogger("esri.core.Error").error(r3), r3;
  162. }
  163. return { name: this.name, message: this.message, details: this.details };
  164. }
  165. static fromJSON(e2) {
  166. return new s3(e2.name, e2.message, e2.details);
  167. }
  168. };
  169. s3.prototype.type = "error";
  170. export {
  171. r2 as r,
  172. s,
  173. s2,
  174. s3
  175. };
  176. //# sourceMappingURL=chunk-EMJ4ZSM2.js.map