// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("./chunks/tslib.es6 ./Map ./core/Loadable ./core/loadAll ./core/Logger ./core/MultiOriginJSONSupport ./core/Promise ./core/Version ./core/accessorSupport/decorators/property ./core/has ./core/RandomLCG ./core/accessorSupport/decorators/reader ./core/accessorSupport/decorators/subclass ./core/accessorSupport/decorators/writer ./core/accessorSupport/read ./linkchart/InitialViewProperties ./portal/PortalItem ./webdoc/support/webdocLoadUtils".split(" "),function(d,b,l,m,n,p,q,f,e,z,A,r,t,u,v,h, w,x){const g=new f.Version(2,28),y={currentVersion:g,createInitialViewProperties:()=>new h,parseVersion:f.Version.parse,itemType:"Link Chart",name:"linkchart",origin:"link-chart"};b=class extends p.MultiOriginJSONMixin(l.LoadableMixin(q.EsriPromiseMixin(b))){constructor(a){super(a);this.resourceReferences={portalItem:null,paths:[]};this.initialViewProperties=new h;this.sourceVersion=this.portalItem=null}load(a){this.addResolvingPromise(x.loadFromSource(y,this));return Promise.resolve(this)}destroy(){const a= this.portalItem;this.portalItem=null;a?.destroy()}initialize(){this.when().catch(a=>{n.getLogger(this).error("#load()","Failed to load link chart",a)});if(this.resourceInfo){let a;try{a=this._validateJSON(this.resourceInfo)}catch(c){this.addResolvingPromise(Promise.reject(c));return}this.read(a)}}readSourceVersion(a,c){return f.Version.parse(c.version,"linkchart")}writeSourceVersion(a,c,k){c[k]=`${g.major}.${g.minor}`}loadAll(){return m.loadAll(this,a=>{a(this.ground,this.basemap,this.layers,this.tables)})}read(a, c){c={...c,origin:"link-chart"};v.readLoadable(this,a,k=>super.read(a,k),c)}_validateJSON(a){const c=f.Version.parse(a.version||"","link-chart");g.validate(c);a.version=`${c.major}.${c.minor}`;return a}};d.__decorate([e.property({type:h,nonNullable:!0,json:{read:{source:["background","initialState.viewpoint","mapRangeInfo","spatialReference"]}}})],b.prototype,"initialViewProperties",void 0);d.__decorate([e.property({json:{read:!1}})],b.prototype,"layers",void 0);d.__decorate([e.property()],b.prototype, "linkChartProperties",void 0);d.__decorate([e.property({type:w})],b.prototype,"portalItem",void 0);d.__decorate([e.property()],b.prototype,"resourceInfo",void 0);d.__decorate([e.property({readOnly:!0,type:f.Version,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],b.prototype,"sourceVersion",void 0);d.__decorate([r.reader("sourceVersion")],b.prototype,"readSourceVersion",null);d.__decorate([u.writer("sourceVersion")],b.prototype,"writeSourceVersion", null);d.__decorate([e.property({json:{read:!1}})],b.prototype,"tables",void 0);return b=d.__decorate([t.subclass("esri.LinkChart")],b)});