123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- import {
- i as i2
- } from "./chunk-ZLQP3WDC.js";
- import {
- a as a2
- } from "./chunk-YZVAB3DF.js";
- import {
- a,
- l as l2,
- w
- } from "./chunk-TJV6ODRM.js";
- import {
- n as n3
- } from "./chunk-ZAY3CMAZ.js";
- import {
- s as s3
- } from "./chunk-3GZSQU56.js";
- import {
- v as v2
- } from "./chunk-RMDDCMKS.js";
- import {
- v2 as v
- } from "./chunk-VCH45Q2I.js";
- import {
- j
- } from "./chunk-LBW34VZ2.js";
- import {
- n as n2
- } from "./chunk-IM3LVQXV.js";
- import {
- m as m2
- } from "./chunk-55RWC67C.js";
- import {
- p,
- w2
- } from "./chunk-6T6G6LCQ.js";
- import {
- e,
- l3 as l,
- m,
- n5 as n,
- y3 as y
- } from "./chunk-2Z2TG5CU.js";
- import {
- s2 as s,
- s3 as s2
- } from "./chunk-E5O6P5I2.js";
- import {
- i
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/views/layers/support/ClipArea.js
- var t = class extends l {
- get version() {
- return this.commitVersionProperties(), (this._get("version") || 0) + 1;
- }
- };
- e([y({ readOnly: true })], t.prototype, "version", null), t = e([n("esri.views.layers.support.ClipArea")], t);
- var p2 = t;
- // node_modules/@arcgis/core/views/layers/support/ClipRect.js
- var s4;
- var i3 = s4 = class extends p2 {
- constructor(t2) {
- super(t2), this.type = "rect", this.left = null, this.right = null, this.top = null, this.bottom = null;
- }
- clone() {
- return new s4({ left: this.left, right: this.right, top: this.top, bottom: this.bottom });
- }
- commitVersionProperties() {
- this.commitProperty("left"), this.commitProperty("right"), this.commitProperty("top"), this.commitProperty("bottom");
- }
- };
- e([y({ type: [Number, String], json: { write: true } })], i3.prototype, "left", void 0), e([y({ type: [Number, String], json: { write: true } })], i3.prototype, "right", void 0), e([y({ type: [Number, String], json: { write: true } })], i3.prototype, "top", void 0), e([y({ type: [Number, String], json: { write: true } })], i3.prototype, "bottom", void 0), i3 = s4 = e([n("esri.views.layers.support.ClipRect")], i3);
- var p3 = i3;
- // node_modules/@arcgis/core/views/layers/support/Geometry.js
- var y2;
- var c = { base: p, key: "type", typeMap: { extent: w2, polygon: v } };
- var n4 = y2 = class extends p2 {
- constructor(r) {
- super(r), this.type = "geometry", this.geometry = null;
- }
- clone() {
- var _a, _b;
- return new y2({ geometry: (_b = (_a = this.geometry) == null ? void 0 : _a.clone()) != null ? _b : null });
- }
- commitVersionProperties() {
- this.commitProperty("geometry");
- }
- };
- e([y({ types: c, json: { read: v2, write: true } })], n4.prototype, "geometry", void 0), n4 = y2 = e([n("esri.views.layers.support.Geometry")], n4);
- var a3 = n4;
- // node_modules/@arcgis/core/views/layers/support/Path.js
- var e2 = class extends p2 {
- constructor(r) {
- super(r), this.type = "path", this.path = [];
- }
- commitVersionProperties() {
- this.commitProperty("path");
- }
- };
- e([y({ type: [[[Number]]], json: { write: true } })], e2.prototype, "path", void 0), e2 = e([n("esri.views.layers.support.Path")], e2);
- var p4 = e2;
- // node_modules/@arcgis/core/views/2d/layers/LayerView2D.js
- var u = j.ofType({ key: "type", base: null, typeMap: { rect: p3, path: p4, geometry: a3 } });
- var y3 = (t2) => {
- let h = class extends t2 {
- constructor() {
- super(...arguments), this.attached = false, this.clips = new u(), this.lastUpdateId = -1, this.moving = false, this.updateRequested = false, this.visibleAtCurrentScale = false;
- }
- initialize() {
- var _a, _b, _c, _d;
- const e3 = (_b = (_a = this.view) == null ? void 0 : _a.spatialReferenceLocked) != null ? _b : true, t3 = (_c = this.view) == null ? void 0 : _c.spatialReference;
- t3 && e3 && !this.spatialReferenceSupported ? this.addResolvingPromise(Promise.reject(new s2("layerview:spatial-reference-incompatible", "The spatial reference of this layer does not meet the requirements of the view", { layer: this.layer }))) : (this.container || (this.container = new i2()), this.container.fadeTransitionEnabled = true, this.container.visible = false, this.container.endTransitions(), this.handles.add([l2(() => this.suspended, (e4) => {
- this.container && (this.container.visible = !e4), this.view && !e4 && this.updateRequested && this.view.requestUpdate();
- }, w), l2(() => {
- var _a2, _b2;
- return (_b2 = (_a2 = this.layer) == null ? void 0 : _a2.opacity) != null ? _b2 : 1;
- }, (e4) => {
- this.container && (this.container.opacity = e4);
- }, w), l2(() => this.layer && "blendMode" in this.layer ? this.layer.blendMode : "normal", (e4) => {
- this.container && (this.container.blendMode = e4);
- }, w), l2(() => this.layer && "effect" in this.layer ? this.layer.effect : null, (e4) => {
- this.container && (this.container.effect = e4);
- }, w), a(() => this.clips, "change", () => {
- this.container && (this.container.clips = this.clips);
- }, w), l2(() => {
- var _a2;
- return { scale: (_a2 = this.view) == null ? void 0 : _a2.scale, scaleRange: this.layer && "effectiveScaleRange" in this.layer ? this.layer.effectiveScaleRange : null };
- }, ({ scale: e4 }) => {
- const t4 = e4 && this.isVisibleAtScale(e4);
- t4 !== this.visibleAtCurrentScale && this._set("visibleAtCurrentScale", t4);
- }, w)]), ((_d = this.view) == null ? void 0 : _d.whenLayerView) ? this.view.whenLayerView(this.layer).then((e4) => {
- e4 === this && this.processAttach();
- }, () => {
- }) : this.when().then(() => {
- this.processAttach();
- }, () => {
- }));
- }
- destroy() {
- this.processDetach(), this.updateRequested = false;
- }
- get spatialReferenceSupported() {
- var _a;
- const e3 = (_a = this.view) == null ? void 0 : _a.spatialReference;
- return null == e3 || this.supportsSpatialReference(e3);
- }
- get updating() {
- var _a;
- return this.spatialReferenceSupported && (!this.attached || !this.suspended && (this.updateRequested || this.isUpdating()) || !!((_a = this.updatingHandles) == null ? void 0 : _a.updating));
- }
- processAttach() {
- this.isResolved() && !this.attached && !this.destroyed && this.spatialReferenceSupported && (this.attach(), this.attached = true, this.requestUpdate());
- }
- processDetach() {
- this.attached && (this.attached = false, this.detach(), this.updateRequested = false);
- }
- isVisibleAtScale(e3) {
- const t3 = this.layer && "effectiveScaleRange" in this.layer ? this.layer.effectiveScaleRange : null;
- if (!t3)
- return true;
- const { minScale: s5, maxScale: i4 } = t3;
- return (0 === s5 || e3 <= s5) && (0 === i4 || e3 >= i4);
- }
- requestUpdate() {
- this.destroyed || this.updateRequested || (this.updateRequested = true, this.suspended || this.view.requestUpdate());
- }
- processUpdate(e3) {
- !this.isFulfilled() || this.isResolved() ? (this._set("updateParameters", e3), this.updateRequested && !this.suspended && (this.updateRequested = false, this.update(e3))) : this.updateRequested = false;
- }
- hitTest(e3, t3) {
- return Promise.resolve(null);
- }
- supportsSpatialReference(e3) {
- return true;
- }
- canResume() {
- return !!this.spatialReferenceSupported && (!!super.canResume() && this.visibleAtCurrentScale);
- }
- getSuspendInfo() {
- const e3 = super.getSuspendInfo(), t3 = !this.spatialReferenceSupported, s5 = this.visibleAtCurrentScale;
- return t3 && (e3.spatialReferenceNotSupported = t3), s5 && (e3.outsideScaleRange = s5), e3;
- }
- };
- return e([y()], h.prototype, "attached", void 0), e([y({ type: u, set(e3) {
- const t3 = n3(e3, this._get("clips"), u);
- this._set("clips", t3);
- } })], h.prototype, "clips", void 0), e([y()], h.prototype, "container", void 0), e([y()], h.prototype, "moving", void 0), e([y({ readOnly: true })], h.prototype, "spatialReferenceSupported", null), e([y({ readOnly: true })], h.prototype, "updateParameters", void 0), e([y()], h.prototype, "updateRequested", void 0), e([y()], h.prototype, "updating", null), e([y()], h.prototype, "view", void 0), e([y({ readOnly: true })], h.prototype, "visibleAtCurrentScale", void 0), h = e([n("esri.views.2d.layers.LayerView2D")], h), h;
- };
- // node_modules/@arcgis/core/views/layers/LayerView.js
- var d = class extends a2(s3(m2(n2.EventedMixin(m)))) {
- constructor(e3) {
- super(e3), this.layer = null, this.parent = null;
- }
- initialize() {
- this.when().catch((e3) => {
- if ("layerview:create-error" !== e3.name) {
- const t2 = this.layer && this.layer.id || "no id", r = this.layer && this.layer.title || "no title";
- s.getLogger(this.declaredClass).error("#resolve()", `Failed to resolve layer view (layer title: '${r}', id: '${t2}')`, e3);
- }
- });
- }
- get fullOpacity() {
- return i(this.get("layer.opacity"), 1) * i(this.get("parent.fullOpacity"), 1);
- }
- get suspended() {
- return !this.canResume();
- }
- get suspendInfo() {
- return this.getSuspendInfo();
- }
- get legendEnabled() {
- var _a;
- return !this.suspended && true === ((_a = this.layer) == null ? void 0 : _a.legendEnabled);
- }
- get updating() {
- var _a;
- return !(!((_a = this.updatingHandles) == null ? void 0 : _a.updating) && !this.isUpdating());
- }
- get updatingProgress() {
- return this.updating ? 0 : 1;
- }
- get visible() {
- var _a;
- return true === ((_a = this.layer) == null ? void 0 : _a.visible);
- }
- set visible(e3) {
- this._overrideIfSome("visible", e3);
- }
- canResume() {
- var _a, _b, _c;
- return this.visible && ((_a = this.layer) == null ? void 0 : _a.loaded) && !((_b = this.parent) == null ? void 0 : _b.suspended) && ((_c = this.view) == null ? void 0 : _c.ready) || false;
- }
- getSuspendInfo() {
- const e3 = this.parent && this.parent.suspended ? this.parent.suspendInfo : {}, t2 = this;
- return t2.view && t2.view.ready || (e3.viewNotReady = true), this.layer && this.layer.loaded || (e3.layerNotLoaded = true), this.visible || (e3.layerInvisible = true), e3;
- }
- isUpdating() {
- return false;
- }
- };
- e([y()], d.prototype, "fullOpacity", null), e([y()], d.prototype, "layer", void 0), e([y()], d.prototype, "parent", void 0), e([y({ readOnly: true })], d.prototype, "suspended", null), e([y({ readOnly: true })], d.prototype, "suspendInfo", null), e([y({ readOnly: true })], d.prototype, "legendEnabled", null), e([y({ type: Boolean, readOnly: true })], d.prototype, "updating", null), e([y({ readOnly: true })], d.prototype, "updatingProgress", null), e([y()], d.prototype, "visible", null), e([y()], d.prototype, "view", void 0), d = e([n("esri.views.layers.LayerView")], d);
- var u2 = d;
- export {
- y3 as y,
- u2 as u
- };
- //# sourceMappingURL=chunk-KUAEOLV3.js.map
|