chunk-BJHM4JNS.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import {
  2. i
  3. } from "./chunk-F6A2QQ26.js";
  4. import {
  5. r
  6. } from "./chunk-7ZIDBK7B.js";
  7. import {
  8. s
  9. } from "./chunk-PDKDCAAD.js";
  10. import {
  11. o
  12. } from "./chunk-ECW2QABR.js";
  13. import {
  14. d,
  15. e,
  16. l3 as l,
  17. n2 as n
  18. } from "./chunk-Y3WMVFTW.js";
  19. import {
  20. S
  21. } from "./chunk-IHXECKQQ.js";
  22. import {
  23. m
  24. } from "./chunk-IKP3YN53.js";
  25. // node_modules/@arcgis/core/layers/support/CodedValue.js
  26. var t;
  27. var p = t = class extends l {
  28. constructor(r2) {
  29. super(r2), this.name = null, this.code = null;
  30. }
  31. clone() {
  32. return new t({ name: this.name, code: this.code });
  33. }
  34. };
  35. e([d({ type: String, json: { write: true } })], p.prototype, "name", void 0), e([d({ type: [String, Number], json: { write: true } })], p.prototype, "code", void 0), p = t = e([n("esri.layers.support.CodedValue")], p);
  36. // node_modules/@arcgis/core/layers/support/Domain.js
  37. var c = new s({ inherited: "inherited", codedValue: "coded-value", range: "range" });
  38. var a = class extends l {
  39. constructor(r2) {
  40. super(r2), this.name = null, this.type = null;
  41. }
  42. };
  43. e([d({ type: String, json: { write: true } })], a.prototype, "name", void 0), e([r(c)], a.prototype, "type", void 0), a = e([n("esri.layers.support.Domain")], a);
  44. var i2 = a;
  45. // node_modules/@arcgis/core/layers/support/CodedValueDomain.js
  46. var d2;
  47. var p2 = d2 = class extends i2 {
  48. constructor(e2) {
  49. super(e2), this.codedValues = null, this.type = "coded-value";
  50. }
  51. getName(e2) {
  52. let o2 = null;
  53. if (this.codedValues) {
  54. const r2 = String(e2);
  55. this.codedValues.some((e3) => (String(e3.code) === r2 && (o2 = e3.name), !!o2));
  56. }
  57. return o2;
  58. }
  59. clone() {
  60. return new d2({ codedValues: m(this.codedValues), name: this.name });
  61. }
  62. };
  63. e([d({ type: [p], json: { write: true } })], p2.prototype, "codedValues", void 0), e([r({ codedValue: "coded-value" })], p2.prototype, "type", void 0), p2 = d2 = e([n("esri.layers.support.CodedValueDomain")], p2);
  64. var u = p2;
  65. // node_modules/@arcgis/core/layers/support/InheritedDomain.js
  66. var t2;
  67. var p3 = t2 = class extends i2 {
  68. constructor(r2) {
  69. super(r2), this.type = "inherited";
  70. }
  71. clone() {
  72. return new t2();
  73. }
  74. };
  75. e([r({ inherited: "inherited" })], p3.prototype, "type", void 0), p3 = t2 = e([n("esri.layers.support.InheritedDomain")], p3);
  76. var c2 = p3;
  77. // node_modules/@arcgis/core/layers/support/RangeDomain.js
  78. var s2;
  79. var n2 = s2 = class extends i2 {
  80. constructor(e2) {
  81. super(e2), this.maxValue = null, this.minValue = null, this.type = "range";
  82. }
  83. clone() {
  84. return new s2({ maxValue: this.maxValue, minValue: this.minValue, name: this.name });
  85. }
  86. };
  87. e([d({ type: Number, json: { type: [Number], read: { source: "range", reader: (e2, r2) => r2.range && r2.range[1] }, write: { enabled: false, overridePolicy() {
  88. return { enabled: this.maxValue != null && this.minValue == null };
  89. }, target: "range", writer(e2, r2, a2) {
  90. r2[a2] = [this.minValue || 0, e2];
  91. } } } })], n2.prototype, "maxValue", void 0), e([d({ type: Number, json: { type: [Number], read: { source: "range", reader: (e2, r2) => r2.range && r2.range[0] }, write: { target: "range", writer(e2, r2, a2) {
  92. r2[a2] = [e2, this.maxValue || 0];
  93. } } } })], n2.prototype, "minValue", void 0), e([r({ range: "range" })], n2.prototype, "type", void 0), n2 = s2 = e([n("esri.layers.support.RangeDomain")], n2);
  94. var i3 = n2;
  95. // node_modules/@arcgis/core/layers/support/domains.js
  96. var n3 = { key: "type", base: i2, typeMap: { range: i3, "coded-value": u, inherited: c2 } };
  97. function t3(o2) {
  98. if (!o2 || !o2.type)
  99. return null;
  100. switch (o2.type) {
  101. case "range":
  102. return i3.fromJSON(o2);
  103. case "codedValue":
  104. return u.fromJSON(o2);
  105. case "inherited":
  106. return c2.fromJSON(o2);
  107. }
  108. return null;
  109. }
  110. // node_modules/@arcgis/core/layers/support/Field.js
  111. var u2;
  112. var c3 = new s({ binary: "binary", coordinate: "coordinate", countOrAmount: "count-or-amount", dateAndTime: "date-and-time", description: "description", locationOrPlaceName: "location-or-place-name", measurement: "measurement", nameOrTitle: "name-or-title", none: "none", orderedOrRanked: "ordered-or-ranked", percentageOrRatio: "percentage-or-ratio", typeOrCategory: "type-or-category", uniqueIdentifier: "unique-identifier" });
  113. var m2 = u2 = class extends l {
  114. constructor(e2) {
  115. super(e2), this.alias = null, this.defaultValue = void 0, this.description = null, this.domain = null, this.editable = true, this.length = -1, this.name = null, this.nullable = true, this.type = null, this.valueType = null;
  116. }
  117. readDescription(e2, { description: t4 }) {
  118. let o2;
  119. try {
  120. o2 = JSON.parse(t4);
  121. } catch (r2) {
  122. }
  123. return o2 ? o2.value : null;
  124. }
  125. readValueType(e2, { description: t4 }) {
  126. let o2;
  127. try {
  128. o2 = JSON.parse(t4);
  129. } catch (r2) {
  130. }
  131. return o2 ? c3.fromJSON(o2.fieldValueType) : null;
  132. }
  133. clone() {
  134. return new u2({ alias: this.alias, defaultValue: this.defaultValue, description: this.description, domain: this.domain && this.domain.clone() || null, editable: this.editable, length: this.length, name: this.name, nullable: this.nullable, type: this.type, valueType: this.valueType });
  135. }
  136. };
  137. e([d({ type: String, json: { write: true } })], m2.prototype, "alias", void 0), e([d({ type: [String, Number], json: { write: { allowNull: true } } })], m2.prototype, "defaultValue", void 0), e([d()], m2.prototype, "description", void 0), e([o("description")], m2.prototype, "readDescription", null), e([d({ types: n3, json: { read: { reader: t3 }, write: true } })], m2.prototype, "domain", void 0), e([d({ type: Boolean, json: { write: true } })], m2.prototype, "editable", void 0), e([d({ type: S, json: { write: true } })], m2.prototype, "length", void 0), e([d({ type: String, json: { write: true } })], m2.prototype, "name", void 0), e([d({ type: Boolean, json: { write: true } })], m2.prototype, "nullable", void 0), e([r(i)], m2.prototype, "type", void 0), e([d()], m2.prototype, "valueType", void 0), e([o("valueType", ["description"])], m2.prototype, "readValueType", null), m2 = u2 = e([n("esri.layers.support.Field")], m2);
  138. var y = m2;
  139. export {
  140. n3 as n,
  141. t3 as t,
  142. y
  143. };
  144. //# sourceMappingURL=chunk-BJHM4JNS.js.map