// 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 ../Color ../core/lang ../core/screenUtils ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/accessorSupport/decorators/enumeration ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ./Font ./Symbol ./support/textUtils".split(" "),function(b,l,k,h,d,r,t,u,p,q,a,m){var n;a=n=class extends a{constructor(...c){super(...c);this.borderLineSize=this.borderLineColor=this.backgroundColor=null;this.font= new q;this.horizontalAlignment="center";this.kerning=!0;this.rightToLeft=this.haloSize=this.haloColor=null;this.rotated=!1;this.text="";this.type="text";this.verticalAlignment="baseline";this.angle=this.yoffset=this.xoffset=0;this.width=null;this.lineWidth=192;this.lineHeight=1}normalizeCtorArgs(c,f,g){if(c&&"string"!==typeof c)return c;const e={};c&&(e.text=c);f&&(e.font=f);g&&(e.color=g);return e}writeLineWidth(c,f,g,e){e&&"string"!==typeof e||(f[g]=c)}castLineWidth(c){return h.toPt(c)}writeLineHeight(c, f,g,e){e&&"string"!==typeof e||(f[g]=c)}clone(){return new n({angle:this.angle,backgroundColor:k.clone(this.backgroundColor),borderLineColor:k.clone(this.borderLineColor),borderLineSize:this.borderLineSize,color:k.clone(this.color),font:this.font&&this.font.clone(),haloColor:k.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text, verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor?.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color?.hash()}.${this.font&&this.font.hash()}.${this.haloColor?.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}}; b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype,"backgroundColor",void 0);b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype,"borderLineColor",void 0);b.__decorate([d.property({type:Number,json:{write:!0},cast:h.toPt})],a.prototype,"borderLineSize",void 0);b.__decorate([d.property({type:q,json:{write:!0}})],a.prototype,"font",void 0);b.__decorate([d.property({...m.horizontalAlignmentProperty,json:{write:!0}})],a.prototype,"horizontalAlignment",void 0);b.__decorate([d.property({type:Boolean, json:{write:!0}})],a.prototype,"kerning",void 0);b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype,"haloColor",void 0);b.__decorate([d.property({type:Number,cast:h.toPt,json:{write:!0}})],a.prototype,"haloSize",void 0);b.__decorate([d.property({type:Boolean,json:{write:!0}})],a.prototype,"rightToLeft",void 0);b.__decorate([d.property({type:Boolean,json:{write:!0}})],a.prototype,"rotated",void 0);b.__decorate([d.property({type:String,json:{write:!0}})],a.prototype,"text",void 0);b.__decorate([t.enumeration({esriTS:"text"}, {readOnly:!0})],a.prototype,"type",void 0);b.__decorate([d.property({...m.verticalAlignmentProperty,json:{write:!0}})],a.prototype,"verticalAlignment",void 0);b.__decorate([d.property({type:Number,cast:h.toPt,json:{write:!0}})],a.prototype,"xoffset",void 0);b.__decorate([d.property({type:Number,cast:h.toPt,json:{write:!0}})],a.prototype,"yoffset",void 0);b.__decorate([d.property({type:Number,json:{read:c=>c&&-1*c,write:(c,f)=>f.angle=c&&-1*c}})],a.prototype,"angle",void 0);b.__decorate([d.property({type:Number, json:{write:!0}})],a.prototype,"width",void 0);b.__decorate([d.property({type:Number})],a.prototype,"lineWidth",void 0);b.__decorate([p.writer("lineWidth")],a.prototype,"writeLineWidth",null);b.__decorate([r.cast("lineWidth")],a.prototype,"castLineWidth",null);b.__decorate([d.property(m.lineHeightProperty)],a.prototype,"lineHeight",void 0);b.__decorate([p.writer("lineHeight")],a.prototype,"writeLineHeight",null);return a=n=b.__decorate([u.subclass("esri.symbols.TextSymbol")],a)});