/*
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","../../../../../core/ArrayPool","../../../../../geometry/Extent","../../../../../geometry/support/aaBoundingRect","../../../../../rest/support/QuantizationParameters","../../../tiling/TileKey"],(function(e,t,i,n,s,o,r){"use strict";let l=function(){function e(e,t){this.key=new r(0,0,0,0),this.bounds=s.create(),this.objectIds=new Set,this.key.set(t);const i=e.getLODInfoAt(this.key);this.tileInfoView=e,this.tileInfoView.getTileBounds(this.bounds,this.key,!0),this.resolution=i.resolution,this.scale=i.scale,this.level=i.level}var l=e.prototype;return l.createChildTiles=function(){const t=this.key.getChildKeys(),n=i.acquire();for(let i=0;i<t.length;i++)n[i]=new e(this.tileInfoView,t[i]);return n},l.getQuantizationParameters=function(){return o.fromJSON({mode:"view",originPosition:"upperLeft",tolerance:this.resolution,extent:{xmin:this.bounds[0],ymin:this.bounds[1],xmax:this.bounds[2],ymax:this.bounds[3],spatialReference:this.tileInfoView.tileInfo.spatialReference}})},t._createClass(e,[{key:"id",get:function(){return this.key.id}},{key:"extent",get:function(){return n.fromBounds(this.bounds,this.tileInfoView.tileInfo.spatialReference)}},{key:"transform",get:function(){return{originPosition:"upperLeft",scale:[this.resolution,this.resolution],translate:[this.bounds[0],this.bounds[3]]}}}]),e}();e.Tile=l,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
