123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- import {
- l
- } from "./chunk-A6WD5XTM.js";
- import "./chunk-OP2HNSVZ.js";
- import {
- Ze
- } from "./chunk-WM52QDLS.js";
- import "./chunk-MEZ7BUMM.js";
- import "./chunk-7B57NUGF.js";
- import "./chunk-AOQ55JXI.js";
- import "./chunk-X42TFXOU.js";
- import "./chunk-JFSMKLAQ.js";
- import "./chunk-LXOC7SMQ.js";
- import "./chunk-DN6W4TJU.js";
- import {
- u
- } from "./chunk-OUUXJOLT.js";
- import "./chunk-PLQUCCQV.js";
- import "./chunk-JZAS4TIG.js";
- import "./chunk-VBR5BOXI.js";
- import "./chunk-NBKUI76A.js";
- import "./chunk-6334AFGG.js";
- import {
- x as x3
- } from "./chunk-NLLFSKB2.js";
- import "./chunk-LC3GBQ56.js";
- import "./chunk-5GYJGY4C.js";
- import "./chunk-OXF7W4BJ.js";
- import "./chunk-SAJAEMIJ.js";
- import "./chunk-S6EFEKAU.js";
- import "./chunk-2RHPWGZL.js";
- import "./chunk-XEQ4FTFC.js";
- import "./chunk-JM5OVQAD.js";
- import "./chunk-S3GK7VUF.js";
- import "./chunk-TU7WVKU4.js";
- import "./chunk-WWXZOC2Y.js";
- import "./chunk-ZOKNWEG3.js";
- import "./chunk-NQA5XJGK.js";
- import "./chunk-EKYSPJO6.js";
- import "./chunk-JAUFBT5U.js";
- import "./chunk-W6U6FKJ3.js";
- import "./chunk-7C2KDOAI.js";
- import "./chunk-RHFU6KWO.js";
- import "./chunk-3FNKD2EB.js";
- import "./chunk-ZOO4I2U4.js";
- import "./chunk-JPUFJK2B.js";
- import "./chunk-HZ2WKB3G.js";
- import "./chunk-3HCJD762.js";
- import "./chunk-RVCE264D.js";
- import "./chunk-HKJ7X3BD.js";
- import "./chunk-Y74D3LKQ.js";
- import "./chunk-PK4W65H4.js";
- import "./chunk-7C23ILQ4.js";
- import "./chunk-P6VVVEX6.js";
- import "./chunk-3Z755LKF.js";
- import "./chunk-LTZ5XXDV.js";
- import "./chunk-IEU3AM37.js";
- import "./chunk-SKKBVHTF.js";
- import "./chunk-DLMAGHHC.js";
- import {
- x as x2
- } from "./chunk-WD4J43GZ.js";
- import "./chunk-JOYXMSKE.js";
- import "./chunk-SZFMKPVM.js";
- import "./chunk-YZVAB3DF.js";
- import "./chunk-JLYTER4T.js";
- import "./chunk-CRHRHOXH.js";
- import "./chunk-ZSW35JPD.js";
- import "./chunk-JLSNMUQJ.js";
- import "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import "./chunk-JGBXYDGB.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-PJNBFKPF.js";
- import "./chunk-C7742RNZ.js";
- import "./chunk-FNA5GLRW.js";
- import "./chunk-MCWCB5IY.js";
- import "./chunk-TV3CFJQR.js";
- import "./chunk-TJV6ODRM.js";
- import "./chunk-JUWKPBLS.js";
- import "./chunk-WLSB4F4I.js";
- import "./chunk-GLSWDDR3.js";
- import "./chunk-MIQGEDET.js";
- import "./chunk-DUEMJ5XS.js";
- import "./chunk-VRLXUHP2.js";
- import "./chunk-3LVSQLWJ.js";
- import {
- f,
- p
- } from "./chunk-4ONPMX2F.js";
- import "./chunk-CRGY2SDS.js";
- import "./chunk-4T5ZGMEN.js";
- import "./chunk-GN35O2ZO.js";
- import "./chunk-XTVKPAWY.js";
- import "./chunk-3OSQ6GXO.js";
- import "./chunk-3WQOA5CB.js";
- import "./chunk-PLWDAYK7.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-2H5MD622.js";
- import "./chunk-3RSFVUKZ.js";
- import "./chunk-UVVU4UUO.js";
- import "./chunk-HWSWTWZD.js";
- import "./chunk-O6VYMEIX.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-5N7JLUJJ.js";
- import "./chunk-ZAY3CMAZ.js";
- import "./chunk-P3XKUGLS.js";
- import "./chunk-2ZSOO377.js";
- import "./chunk-YUA3AHKR.js";
- import "./chunk-LU5IJZB4.js";
- import "./chunk-7IBV2TRE.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-5UVJ64RB.js";
- import "./chunk-SFEFRQCL.js";
- import "./chunk-DXVOOCG4.js";
- import "./chunk-3GZSQU56.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-OSHI574D.js";
- import "./chunk-ETGAZ7LF.js";
- import "./chunk-75U5LM2V.js";
- import "./chunk-RMDDCMKS.js";
- import "./chunk-VCH45Q2I.js";
- import "./chunk-LBW34VZ2.js";
- import "./chunk-GSSTTHIT.js";
- import {
- m
- } from "./chunk-YFSLJIO4.js";
- import "./chunk-IM3LVQXV.js";
- import "./chunk-55RWC67C.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import {
- j
- } from "./chunk-VEGAOVMY.js";
- import {
- o,
- w2
- } from "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- k2 as k
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- n5 as n,
- y3 as y
- } from "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import {
- w,
- x
- } from "./chunk-V6P2MAQQ.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- has
- } from "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/graphics/sources/CSVSource.js
- var u2 = class extends m {
- constructor(t) {
- super(t), this.type = "csv", this.refresh = x(async (t2) => {
- await this.load();
- const { extent: e2, timeExtent: o2 } = await this._connection.invoke("refresh", t2);
- return this.sourceJSON.extent = e2, o2 && (this.sourceJSON.timeInfo.timeExtent = [o2.start, o2.end]), { dataChanged: true, updates: { extent: this.sourceJSON.extent, timeInfo: this.sourceJSON.timeInfo } };
- });
- }
- load(t) {
- const e2 = r(t) ? t.signal : null;
- return this.addResolvingPromise(this._startWorker(e2)), Promise.resolve(this);
- }
- destroy() {
- var _a;
- (_a = this._connection) == null ? void 0 : _a.close(), this._connection = null;
- }
- async openPorts() {
- return await this.load(), this._connection.openPorts();
- }
- async queryFeatures(t, e2 = {}) {
- await this.load(e2);
- const o2 = await this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
- return x3.fromJSON(o2);
- }
- async queryFeaturesJSON(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
- }
- async queryFeatureCount(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryFeatureCount", t ? t.toJSON() : null, e2);
- }
- async queryObjectIds(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryObjectIds", t ? t.toJSON() : null, e2);
- }
- async queryExtent(t, e2 = {}) {
- await this.load(e2);
- const o2 = await this._connection.invoke("queryExtent", t ? t.toJSON() : null, e2);
- return { count: o2.count, extent: w2.fromJSON(o2.extent) };
- }
- async querySnapping(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("querySnapping", t, e2);
- }
- async _startWorker(t) {
- this._connection = await u("CSVSourceWorker", { strategy: has("feature-layers-workers") ? "dedicated" : "local", signal: t });
- const { url: e2, delimiter: o2, fields: r2, latitudeField: i, longitudeField: n2, spatialReference: a, timeInfo: c } = this.loadOptions, u3 = await this._connection.invoke("load", { url: e2, customParameters: this.customParameters, parsingOptions: { delimiter: o2, fields: r2 == null ? void 0 : r2.map((t2) => t2.toJSON()), latitudeField: i, longitudeField: n2, spatialReference: a == null ? void 0 : a.toJSON(), timeInfo: c == null ? void 0 : c.toJSON() } }, { signal: t });
- this.locationInfo = u3.locationInfo, this.sourceJSON = u3.layerDefinition, this.delimiter = u3.delimiter;
- }
- };
- e([y()], u2.prototype, "type", void 0), e([y()], u2.prototype, "loadOptions", void 0), e([y()], u2.prototype, "customParameters", void 0), e([y()], u2.prototype, "locationInfo", void 0), e([y()], u2.prototype, "sourceJSON", void 0), e([y()], u2.prototype, "delimiter", void 0), u2 = e([n("esri.layers.graphics.sources.CSVSource")], u2);
- // node_modules/@arcgis/core/layers/CSVLayer.js
- function m2(e2, r2) {
- throw new s(r2, `CSVLayer (title: ${e2.title}, id: ${e2.id}) cannot be saved to a portal item`);
- }
- var f2 = class extends Ze {
- constructor(...e2) {
- super(...e2), this.geometryType = "point", this.capabilities = l(false, false), this.delimiter = null, this.editingEnabled = false, this.fields = null, this.latitudeField = null, this.locationType = "coordinates", this.longitudeField = null, this.operationalLayerType = "CSV", this.outFields = ["*"], this.path = null, this.spatialReference = k.WGS84, this.source = null, this.type = "csv";
- }
- normalizeCtorArgs(e2, t) {
- return "string" == typeof e2 ? { url: e2, ...t } : e2;
- }
- load(e2) {
- const t = r(e2) ? e2.signal : null, o2 = this.loadFromPortal({ supportedTypes: ["CSV"], supportsData: false }, e2).catch(w).then(async () => this.initLayerProperties(await this.createGraphicsSource(t)));
- return this.addResolvingPromise(o2), Promise.resolve(this);
- }
- get isTable() {
- return this.loaded && null == this.geometryType;
- }
- readWebMapLabelsVisible(e2, t) {
- return null != t.showLabels ? t.showLabels : !!(t.layerDefinition && t.layerDefinition.drawingInfo && t.layerDefinition.drawingInfo.labelingInfo);
- }
- set url(e2) {
- if (!e2)
- return void this._set("url", e2);
- const t = j(e2);
- this._set("url", t.path), t.query && (this.customParameters = { ...this.customParameters, ...t.query });
- }
- async createGraphicsSource(e2) {
- const t = new u2({ loadOptions: { delimiter: this.delimiter, fields: this.fields, latitudeField: this.latitudeField, longitudeField: this.longitudeField, spatialReference: this.spatialReference, timeInfo: this.timeInfo, url: this.url }, customParameters: this.customParameters });
- return this._set("source", t), await t.load({ signal: e2 }), this.read({ locationInfo: t.locationInfo, columnDelimiter: t.delimiter }, { origin: "service", url: this.parsedUrl }), t;
- }
- queryFeatures(e2, t) {
- return this.load().then(() => this.source.queryFeatures(x2.from(e2) || this.createQuery())).then((e3) => {
- if (e3 == null ? void 0 : e3.features)
- for (const t2 of e3.features)
- t2.layer = t2.sourceLayer = this;
- return e3;
- });
- }
- queryObjectIds(e2, t) {
- return this.load().then(() => this.source.queryObjectIds(x2.from(e2) || this.createQuery()));
- }
- queryFeatureCount(e2, t) {
- return this.load().then(() => this.source.queryFeatureCount(x2.from(e2) || this.createQuery()));
- }
- queryExtent(e2, t) {
- return this.load().then(() => this.source.queryExtent(x2.from(e2) || this.createQuery()));
- }
- read(e2, t) {
- super.read(e2, t), t && "service" === t.origin && this.revert(["latitudeField", "longitudeField"], "service");
- }
- write(e2, t) {
- return super.write(e2, { ...t, writeLayerSchema: true });
- }
- clone() {
- throw new s("csv-layer:clone", `CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`);
- }
- async save(e2) {
- return m2(this, "csv-layer:save");
- }
- async saveAs(e2, t) {
- return m2(this, "csv-layer:save-as");
- }
- async hasDataChanged() {
- try {
- const { dataChanged: e2, updates: t } = await this.source.refresh(this.customParameters);
- return r(t) && this.read(t, { origin: "service", url: this.parsedUrl, ignoreDefaults: true }), e2;
- } catch {
- }
- return false;
- }
- _verifyFields() {
- }
- _verifySource() {
- }
- _hasMemorySource() {
- return false;
- }
- };
- e([y({ readOnly: true, json: { read: false, write: false } })], f2.prototype, "capabilities", void 0), e([y({ type: [",", " ", ";", "|", " "], json: { read: { source: "columnDelimiter" }, write: { target: "columnDelimiter", ignoreOrigin: true } } })], f2.prototype, "delimiter", void 0), e([y({ readOnly: true, type: Boolean, json: { origins: { "web-scene": { read: false, write: false } } } })], f2.prototype, "editingEnabled", void 0), e([y({ json: { read: { source: "layerDefinition.fields" }, write: { target: "layerDefinition.fields" } } })], f2.prototype, "fields", void 0), e([y({ type: Boolean, readOnly: true })], f2.prototype, "isTable", null), e([o("web-map", "labelsVisible", ["layerDefinition.drawingInfo.labelingInfo", "showLabels"])], f2.prototype, "readWebMapLabelsVisible", null), e([y({ type: String, json: { read: { source: "locationInfo.latitudeFieldName" }, write: { target: "locationInfo.latitudeFieldName", ignoreOrigin: true } } })], f2.prototype, "latitudeField", void 0), e([y({ type: ["show", "hide"] })], f2.prototype, "listMode", void 0), e([y({ type: ["coordinates"], json: { read: { source: "locationInfo.locationType" }, write: { target: "locationInfo.locationType", ignoreOrigin: true, isRequired: true } } })], f2.prototype, "locationType", void 0), e([y({ type: String, json: { read: { source: "locationInfo.longitudeFieldName" }, write: { target: "locationInfo.longitudeFieldName", ignoreOrigin: true } } })], f2.prototype, "longitudeField", void 0), e([y({ type: ["CSV"] })], f2.prototype, "operationalLayerType", void 0), e([y()], f2.prototype, "outFields", void 0), e([y({ type: String, json: { origins: { "web-scene": { read: false, write: false } }, read: false, write: false } })], f2.prototype, "path", void 0), e([y({ json: { read: false }, cast: null, type: u2, readOnly: true })], f2.prototype, "source", void 0), e([y({ json: { read: false }, value: "csv", readOnly: true })], f2.prototype, "type", void 0), e([y({ json: { read: p, write: { isRequired: true, ignoreOrigin: true, writer: f } } })], f2.prototype, "url", null), f2 = e([n("esri.layers.CSVLayer")], f2);
- var g = f2;
- export {
- g as default
- };
- //# sourceMappingURL=CSVLayer-6YW6DGCE.js.map
|