/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/Accessor","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/decorators/cast","../../../core/accessorSupport/decorators/subclass"],(function(t,e,r,a,s,o,n,i,c){"use strict";t.ClipDistanceConstraint=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).mode="auto",e}e._inheritsLoose(r,t);var a=r.prototype;return a.castNear=function(t){return Math.max(1e-8,t)},a.castFar=function(t){return Math.max(1e-8,t)},a.autoUpdate=function(t,e){"auto"===this.mode&&(this._get("near")!==t&&this._set("near",t),this._get("far")!==e&&this._set("far",e))},e._createClass(r,[{key:"near",get:function(){return this._get("near")},set:function(t){this._set("near",t),t>=this._get("far")&&(this.far=t+1e-9),this.mode="manual"}},{key:"far",get:function(){return this._get("far")},set:function(t){this._set("far",t),t<=this._get("near")&&(this.near=t-1e-9),this.mode="manual"}}]),r}(a),r.__decorate([s.property({type:Number,value:1e-8})],t.ClipDistanceConstraint.prototype,"near",null),r.__decorate([i.cast("near")],t.ClipDistanceConstraint.prototype,"castNear",null),r.__decorate([s.property({type:Number,value:1e-8})],t.ClipDistanceConstraint.prototype,"far",null),r.__decorate([i.cast("far")],t.ClipDistanceConstraint.prototype,"castFar",null),r.__decorate([s.property({type:["auto","manual"]})],t.ClipDistanceConstraint.prototype,"mode",void 0),t.ClipDistanceConstraint=r.__decorate([c.subclass("esri.views.3d.constraints.ClipDistanceConstraint")],t.ClipDistanceConstraint),Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
