/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.25/esri/copyright.txt for details. */ import{_ as o}from"./chunks/tslib.es6.js";import{ClonableMixin as r}from"./core/Clonable.js";import{cyclicalDegrees as t}from"./core/Cyclical.js";import{JSONSupport as e}from"./core/JSONSupport.js";import{clamp as s}from"./core/mathUtils.js";import{isNone as i}from"./core/maybe.js";import{property as p}from"./core/accessorSupport/decorators/property.js";import"./core/arrayUtils.js";import{cast as n}from"./core/accessorSupport/decorators/cast.js";import{reader as a}from"./core/accessorSupport/decorators/reader.js";import{subclass as c}from"./core/accessorSupport/decorators/subclass.js";import{writer as l}from"./core/accessorSupport/decorators/writer.js";import{ensureNumber as m}from"./core/accessorSupport/ensureType.js";import u from"./geometry/Point.js";let d=class extends(r(e)){constructor(...o){super(...o),this.position=new u([0,0,0]),this.heading=0,this.tilt=0,this.fov=55}normalizeCtorArgs(o,r,t,e){if(o&&"object"==typeof o&&("x"in o||Array.isArray(o))){const s={position:o};return null!=r&&(s.heading=r),null!=t&&(s.tilt=t),null!=e&&(s.fov=e),s}return o}writePosition(o,r,t,e){const s=o.clone();s.x=m(o.x||0),s.y=m(o.y||0),s.z=o.hasZ?m(o.z||0):o.z,r[t]=s.write({},e)}readPosition(o,r){const t=new u;return t.read(o,r),t.x=m(t.x||0),t.y=m(t.y||0),t.z=t.hasZ?m(t.z||0):t.z,t}equals(o){return!i(o)&&(this.tilt===o.tilt&&this.heading===o.heading&&this.fov===o.fov&&this.position.equals(o.position))}};o([p({type:u,json:{write:{isRequired:!0}}})],d.prototype,"position",void 0),o([l("position")],d.prototype,"writePosition",null),o([a("position")],d.prototype,"readPosition",null),o([p({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),n((o=>t.normalize(m(o))))],d.prototype,"heading",void 0),o([p({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),n((o=>s(m(o),-180,180)))],d.prototype,"tilt",void 0),o([p({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],d.prototype,"fov",void 0),d=o([c("esri.Camera")],d);const y=d;export{y as default};